I want to run JSLint before a commit into either a Mercurial or Git repo is done.
I want this as an automatic step that is set up instead of relying on the developer (ma
JSLint with SpiderMonkey
for js in $(git diff-index --name-only --cached HEAD -- | grep '\.js$'); do if jslint.sh $js 2>&1 | grep 'Lint at line' ; then echo $js exit 1 else echo "js files validated" exit 0 fi done