🚫💩 — Run linters on git staged files
MIT License
Bot releases are hidden (Show)
Published by okonet over 6 years ago
Requires Node.js v6 or later.
Remove implicit support for running npm scripts.
Consider example lint-staged
config:
{
"name": "My project",
"version": "0.1.0",
"scripts": {
"my-custom-script": "linter --arg1 --arg2",
"precommit": "lint-staged"
},
"lint-staged": {
"*.js": ["my-custom-script", "git add"]
}
}
The list of commands should be changed to the following:
"*.js": ["npm run my-custom-script --", "git add"]
The following minimatch
options are not supported in micromatch
:
nocomment
: https://github.com/isaacs/minimatch#nocomment
flipnegate
: https://github.com/isaacs/minimatch#flipnegate