lint-staged
17.6.0 · 26 Sep 2026MIT26.8M / weekRepositoryHomepagenpmAtom feed
17.6.0 is the newest release of 17.x.
In short
3 breaking1 removed2 new3 fixed1 internal
- breaking
Node.js v20 is no longer supported, and the oldest supported version is now
22.22.1, which is an active LTS version at the time of this release. Node.js 20 will be EOL after April 2026. Please upgrade your Node.js version! - breaking
Lint-staged now tries to verify the installed Git version is at least
2.32.0, released in 2021. If you're using an even older Git version, you need to upgrade it before running lint-staged! - breaking
The dependency
yamlis now marked as optional and probably won't be installed by default. If you're using a YAML configuration file you should install the package separately: - removed
Remove
commanderas a dependency and use the built-inparseArgsfromnode:utilto parse CLI flags.
Release note
Major Changes
- breaking
Node.js v20 is no longer supported, and the oldest supported version is now
22.22.1, which is an active LTS version at the time of this release. Node.js 20 will be EOL after April 2026. Please upgrade your Node.js version! - breaking
Lint-staged now tries to verify the installed Git version is at least
2.32.0, released in 2021. If you're using an even older Git version, you need to upgrade it before running lint-staged! - breaking
The dependency
yamlis now marked as optional and probably won't be installed by default. If you're using a YAML configuration file you should install the package separately:npm install --development yaml
If you're using
.lintstagedrcas the config file name (without a file extension), it will be treated as a YAML file. If the content is JSON, consider renaming it to.lintstagedrc.jsonto avoid needing to installyaml.
Minor Changes
Add new option
--hide-allfor hiding all unstaged changes and untracked files, before running tasks. This makes it easier to run tools like Knip which check for unused code. Untracked files are included in the backup stash and restored automatically after running.Lint-staged now runs
git update-index --againafter running tasks, instead ofgit add <originally staged files>. This should improve compatibility when using non-default indexes, for example when committing with a pathspecgit commit -m "message" .instead of adding files to the index.- removed
Remove
commanderas a dependency and use the built-inparseArgsfromnode:utilto parse CLI flags.
Patch Changes
All tests now pass on the Bun runtime (latest).
Remove manual handling for
git stash --keep-indexresurrecting deleted files, because the issue was fixed in Git2.23.0and lint-staged requires at least Git2.32.0.Fix documentation about multiple config files and the
--cwdoption. When using it, all tasks will be run in the specified directory. For example, to run everything in the actualprocess.cwd(), uselint-staged --cwd=".".