lint-staged
17.6.0 · 26 Sep 2026MIT26.8M / weekRepositoryHomepagenpmAtom feed
15.5.2 is the newest release of 15.x.
In short
1 new8 changed
Release note
Minor Changes
Lint-staged no longer resets to the original state when preventing an empty git commit. This happens when your configured tasks reset all the staged changes, typically when trying to commit formatting changes which conflict with your linter setup like ESLint or Prettier.
Example with Prettier
By default Prettier prefers double quotes.
Previously
Stage
file.jswith only double quotes"changed to'Run
git commit -am "I don't like double quotes"Lint-staged runs
prettier --write file.js, converting all the'back to"Because there are now no changes, lint-staged fails, cancels the commit, and resets back to the original state
Commit was not done, original state is restored and single quotes
'are staged
Now
Stage
file.jswith only double-quotes"changed to'Run
git commit -am "I don't like double quotes"Lint-staged runs
prettier --write file.js, converting all the'back to"Because there are now no changes, lint-staged fails and cancels the commit
Commit was not done, and there are no staged changes