10310 pre commit yarn (#10315)
* #10310 run yarn pre-commit only if static files changed
This commit is contained in:
parent
3aac62caa7
commit
721cd578bb
|
@ -40,10 +40,13 @@ if [ $? != 0 ]; then
|
|||
EXIT=1
|
||||
fi
|
||||
|
||||
echo "Checking UI ESLint, TypeScript, and Prettier compliance..."
|
||||
yarn --cwd "$PWD/netbox/project-static" validate
|
||||
if [ $? != 0 ]; then
|
||||
EXIT=1
|
||||
git diff --cached --name-only | if grep --quiet 'netbox/project-static/'
|
||||
then
|
||||
echo "Checking UI ESLint, TypeScript, and Prettier compliance..."
|
||||
yarn --cwd "$PWD/netbox/project-static" validate
|
||||
if [ $? != 0 ]; then
|
||||
EXIT=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $EXIT != 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue