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
#!/bin/sh | |
# | |
# Pre-commit hook for linting staged javascript files with ESLint | |
# From https://gist.github.com/rashtay/328da46a99a9d7c746636df1cf769675 | |
# | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$\|.vue$") | |
ESLINT="node_modules/.bin/eslint" | |
printf "\nPre-commit hook: ESLint javascript validation\n" |