Created
May 10, 2017 18:24
-
-
Save ptasker/18827dced81c36bae2c75df9d44c5d53 to your computer and use it in GitHub Desktop.
ESLint pre-commit hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
lint=$(./node_modules/eslint/bin/eslint.js src/**.js $a) | |
echo $lint | |
if [[ "$lint" != *""* ]]; then | |
echo "ERROR: ESLint failed, check hints" | |
exit 1 # reject | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment