diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index adc3ad9..db32a85 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,8 @@ repos: hooks: - id: frontend_checks name: Frontend Checks + files: 'hyperglass/ui/*' + exclude: 'hyperglass/ui/node_modules' stages: - commit entry: ./.tests/pre-commit-frontend.sh diff --git a/.tests/pre-commit-frontend.sh b/.tests/pre-commit-frontend.sh index 4960947..26d1567 100755 --- a/.tests/pre-commit-frontend.sh +++ b/.tests/pre-commit-frontend.sh @@ -2,11 +2,14 @@ UI_DIR="./hyperglass/ui" -if git diff --cached --name-only | grep --quiet $UI_DIR -then - cd $UI_DIR - node_modules/.bin/tsc -else - echo "No frontend files have changed, skipping pre-commit check..." - exit 0 -fi +cd $UI_DIR +node_modules/.bin/tsc + +# if git diff --cached --name-only | grep --quiet $UI_DIR +# then +# cd $UI_DIR +# node_modules/.bin/tsc +# else +# echo "No frontend files have changed, skipping pre-commit check..." +# exit 0 +# fi