🚫💩 — Run linters on git staged files
MIT License
Bot releases are hidden (Show)
Published by okonet almost 7 years ago
gitDir
option deprecated and will be ignored. Additionally, glob patterns for linters should not be relative to the git root directory.Consider a project with the following file structure:
`-- packages
|-- prj
| |-- package.json
| |-- src
| | `-- index.js
| `-- yarn.lock
`-- prj-2
`-- file
With [email protected]
, the config would need to be something like this:
gitDir: ../..
linters:
packages/prj/src/*.js:
- eslint --fix
- git add
With lint-staged@5
, this simplifies to:
linters:
src/*.js:
- eslint --fix
- git add
@@ -1,5 +1,4 @@
-gitDir: ../..
linters:
- packages/prj/src/*.js:
+ src/*.js:
- eslint --fix
- git add