vue/scripts/git-hooks/pre-commit
2017-12-21 20:17:47 -05:00

8 lines
190 B
Bash
Executable File

#!/usr/bin/env bash
files_to_lint=$(git diff --cached --name-only --diff-filter=ACM | grep '\.js$')
if [ -n "$files_to_lint" ]; then
NODE_ENV=production eslint --quiet $files_to_lint
fi