lint-staged 5.0.0
v5.0.0 - 11 Nov 2017
Features
BREAKING CHANGES
gitDiroption 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 lint-staged@4.3.0, 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
diff view
@@ -1,5 +1,4 @@
-gitDir: ../..
linters:
- packages/prj/src/*.js:
+ src/*.js:
- eslint --fix
- git add