Skip to content

Instantly share code, notes, and snippets.

@relekang
Last active September 16, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save relekang/402ee4bfe99c377a491e to your computer and use it in GitHub Desktop.
Save relekang/402ee4bfe99c377a491e to your computer and use it in GitHub Desktop.
#!/bin/sh
CHANGED_JS_FILES=$(git diff --cached --name-only --diff-filter=ACMRTUXB -- '*.js')
echo
if [ -n "$CHANGED_JS_FILES" ]; then
eslint $CHANGED_JS_FILES
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment