eslint-pre-commit-hook
v3.0.3
Published
Pre-commit hook for ESLint. Check eslint issues before commit.
Downloads
1,653
Maintainers
Readme
ESLint Pre-Commit Hook
Pre-commit hook for ESLint
npm i eslint-pre-commit-hook -D
or:
yarn add eslint-pre-commit-hook -D
Usage
There is no further requirements after installation. It automatically sets pre-commit
hook after installation.
Check .git/hooks/pre-commit
to sure. Also, make sure it's executable.
You can customize its default behaviour by setting breakOnWarningsToo
field in your package.json
file:
"eslintPreCommit": {
"breakOnWarningsToo": true
}
Then it'll be failed on both errors and warnings (no errors or warnings allowed).