Releases: lint-staged/lint-staged
Releases · lint-staged/lint-staged
v7.0.4
v7.0.3
v7.0.2
v7.0.1
v7.0.0
7.0.0 (2018-02-21)
Bug Fixes
- package: Bump dependencies (267ff0f)
Code Refactoring
Features
Performance Improvements
BREAKING CHANGES
-
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 inmicromatch
:nocomment
: https://github.com/isaacs/minimatch#nocommentflipnegate
: https://github.com/isaacs/minimatch#flipnegate
v6.1.1
v6.1.0
v6.0.1
v6.0.0
v5.0.0
5.0.0 (2017-11-11)
Features
BREAKING CHANGES
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 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