lint-staged
17.6.0 · 26 Sep 2026MIT26.8M / weekRepositoryHomepagenpmAtom feed
Upgrading lint-staged from 15.0.0 to 15.5.2
22 releases in betweenevery note read
Release by release
- fixed
Correctly handle colon (
:) characters in staged filenames.
- fixed
- fixed
Improve listing of staged files so that lint-staged doesn't crash when encountering an uninitialized submodule. This should result in less errors like:
- fixed
- new
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.
- new
- fixed
Adjust TypeScript types for the default export so that it can be used as a value without error TS2693.
- fixed
- fixed
Change lint-staged's dependencies to use caret (
^) ranges instead of tilde (~). This makes it easier for package managers to perform dependency management when minor-level updates are also permitted instead of just patch-level.
- fixed
- new
Add missing conditional exports syntax for TypeScript types.
- fixed
Default TypeScript config filenames match JS equivalents.
- new
- new
Lint-staged now provides TypeScript types for the configuration and main Node.js API. You can use the JSDoc syntax in your JS configuration files:
- fixed
Handle possible failures when logging user shell for debug info.
- new
- new
Added more info to the debug logs so that "environment" info doesn't need to be added separately to GitHub issues.
- new
Added more help messages around the automatic
git stashthat lint-staged creates as a backup (by default). The console output also displays the short git hash of the stash so that it's easier to recover lost files in case some fatal errors are encountered, or the process is killed before completing.
- new
8 other lines we could not sort, mostly version bumps
- 15.5.0
Stage
file.jswith only double quotes"changed to' - 15.5.0
Run
git commit -am "I don't like double quotes" - 15.5.0
Lint-staged runs
prettier --write file.js, converting all the'back to" - 15.5.0
Because there are now no changes, lint-staged fails, cancels the commit, and resets back to the original state
- 15.5.0
Commit was not done, original state is restored and single quotes
'are staged - 15.5.0
Stage
file.jswith only double-quotes"changed to' - 15.5.0
Because there are now no changes, lint-staged fails and cancels the commit
- 15.5.0
Commit was not done, and there are no staged changes
1 internal line (docs, tests, tooling) left out.