Pre-commit hook for ESLint. Check eslint issues before commit.
npm install eslint-pre-commit-hook> Pre-commit hook for ESLint






``bash`
npm i eslint-pre-commit-hook -D
or:
`bash`
yarn add eslint-pre-commit-hook -D
There is no further requirements after installation. It automatically sets pre-commit hook after installation..git/hooks/pre-commit
Check to sure. Also, make sure it's executable.
You can customize its default behaviour by setting breakOnWarningsToopackage.json
field in your file:
`json``
"eslintPreCommit": {
"breakOnWarningsToo": true
}
Then it'll be failed on both errors and warnings (no errors or warnings allowed).