Created
February 15, 2017 23:55
-
-
Save daftAnorak/f5bc2318f10f0fad5415d91956b89b51 to your computer and use it in GitHub Desktop.
Run eslint against a git commit (in this case, `HEAD`). Usually needed when migrating code that doesn't already have a lint.
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 | |
| FILES=`{ git diff --name-only HEAD; \ | |
| git ls-files --others --exclude-standard; } \ | |
| | grep '\.js$' \ | |
| | grep -v '^.*exclude-folder.*$'` | |
| node_modules/.bin/eslint $FILES -f table --color --quiet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment