Created
November 12, 2012 15:33
-
-
Save gish/4059989 to your computer and use it in GitHub Desktop.
JSHint pre-commit hook
This file contains hidden or 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 | |
cd $(git rev-parse --show-toplevel) | |
# JSHINT | |
echo -n "Jshint..." | |
JSHINTRESULT=`jshint .` | |
JSHINT=$? | |
if [ $JSHINT != 0 ] | |
then | |
echo "failed!" | |
echo $JSHINTRESULT | |
exit $JSHINT | |
else | |
echo "lint free!" | |
fi | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment