vue/scripts/git-hooks/pre-commit

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
190 B
Plaintext
Raw Normal View History

2016-11-25 18:16:11 +00:00
#!/usr/bin/env bash
files_to_lint=$(git diff --cached --name-only --diff-filter=ACM | grep '\.js$')
if [ -n "$files_to_lint" ]; then
2016-11-26 21:06:54 +00:00
NODE_ENV=production eslint --quiet $files_to_lint
2016-11-25 18:16:11 +00:00
fi