Prevent pre-commit hook from triggering on JSON

This commit is contained in:
squidfunk 2017-01-12 20:20:56 +01:00
parent e5831239e2
commit a4b8bba3e0

View File

@ -41,7 +41,8 @@ git diff > "$PATCH_FILE"
git checkout -- . git checkout -- .
# Filter relevant files for linting # Filter relevant files for linting
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep "\.js\|scss$") FILES=$(git diff --cached --name-only --diff-filter=ACMR | \
grep "\.\(js\|jsx\|scss\)$")
# Run the check and print indicator # Run the check and print indicator
if [ "$FILES" ]; then if [ "$FILES" ]; then