Last active
August 29, 2015 14:17
-
-
Save martinratinaud/a2fa314bffa3617968a8 to your computer and use it in GitHub Desktop.
git alias to display changed file on branch and see if they pass your linter
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
... | |
[alias] | |
changed = "!BASE_REV=`git merge-base master $(git rev-parse --abbrev-ref HEAD)`;git diff --diff-filter=ACMR --name-only $BASE_REV HEAD" | |
check-lint = "!for file in `git changed | grep -e '\\.js$'`;do node_modules/.bin/eslint --config .eslintrc $file;done;" | |
ch = "!git changed" | |
cl = "!git check-lint" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment