Packages

lint-staged

17.6.0 · 26 Sep 2026MIT26.8M / weekRepositoryHomepagenpmAtom feed

Your version

16.2.0

22 Sep 2025Where it was published

16.4.0 is the newest release of 16.x.

In short

1 removed5 new4 fixed

  • removed

    Remove debug as a dependency due to recent malware issue; read more at #1005. Because of this, the DEBUG environment variable is no longer supported — use the --debug to enable debugging

Release note

Minor Changes

  • Added a new option --fail-on-changes to make lint-staged exit with code 1 when tasks modify any files, making the precommit hook fail. This is similar to the git diff --exit-code option. Using this flag also implies the --no-revert flag which means any changes made by tasks will be left in the working tree after failing, so that they can be manually staged and the commit tried again.

  • Added a new option --continue-on-error so that lint-staged will run all tasks to completion even if some of them fail. By default, lint-staded will exit early on the first failure.

  • Internal lint-staged errors are now thrown and visible in the console output. Previously they were caught with the process exit code set to 1, but not logged. This happens when, for example, there's a syntax error in the lint-staged configuration file.

  • removed

    Remove debug as a dependency due to recent malware issue; read more at #1005. Because of this, the DEBUG environment variable is no longer supported — use the --debug to enable debugging

  • Added a new option --hide-unstaged so that lint-staged will hide all unstaged changes to tracked files before running tasks. The changes will be applied back after running the tasks. Note that the combination of flags --hide-unstaged --no-hide-partially-staged isn't meaningful and behaves the same as just --hide-unstaged.

  • Remove lilconfig to reduce reliance on third-party dependencies. It was used to find possible config files outside of those tracked in Git, including from the parent directories. This behavior has been moved directly into lint-staged and should work about the same.

Patch Changes

  • Bumps listr2 from 9.0.3 to 9.0.4.

  • Due to recent phishing attacks, for example chalk@5.6.1 was released with malware. To avoid lint-staged's users being at risk the direct dependencies are pinned to exact versions, instead of allowing future patch versions with the caret (^) range.

  • Increase performance by listing staged files and searching for configuration concurrently.

  • Remove chalk as a dependency due to recent malware issue; read more at #656.

    If you are having trouble with ANSI color codes when using lint-staged, you can try setting either FORCE_COLOR=true or NO_COLOR=true env variables.