Packages

lint-staged

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

Upgrading lint-staged from 8.1.6 to 17.6.0

183 releases in betweennotes for 67

Other targets from 8.1.6Newest 8.x8.2.1
12.0.0, 11.0.0, 10.0.0, 9.0.0 have no release note on GitHub or in the repository's changelog, so their breaking changes are missing from the counts below; the migration guide covers them.
15+
changes to make
0
advisories fixed
33+
new
81+
fixes

Counted from 67 of 183 release notes. Advisories are counted from the advisory database, in full.

Start here

Before you upgrade

Tick each one off as you go
  • breaking17.0.0
  • breaking17.0.0
  • breaking17.0.0
  • breaking17.0.0
  • breaking16.3.0
  • breaking16.2.0
  • breaking16.0.0
  • breaking16.0.0
  • breaking16.0.0
  • breaking16.0.0

Security

  • Return the caret semver range (^) to direct dependencies so that future patch and minor versions are allowed. This enables projects to better maintain and deduplicate their own transitive dependencies while not requiring direct updates to lint-staged. This was changed in 16.2.0 after the vulnerability issues with chalk and debug, which were also removed in the same version.

    16.2.1

Release by release

  1. 17.6.0

    26 Sep 20262 new · 4 fixes
    • new

      Task functions like { title, task } can now use a logger function log() to emit output while the task runs. By default, the output will only be visible if the task fails, unless the --verbose option was used. Additionally, when the task rejects, the error will be shown in the output.

    • new

      lint-staged now stages changes to all tracked files modified by tasks, including files that weren’t originally staged or didn’t match the configured globs. This can happen when your task has side-effects, or it's a function that ignores the staged files like () => "prettier --write .".

    • fixed

      The assignment of staged files to lint-staged configuration files (when using multiple, for example in a monorepo) has been rewritten to be more efficient. As a reminder, each staged file is assigned to exactly one configuration (the closest one), even if that config doesn't match the file in its globs.

    • fixed

      Fix running parallel tasks for a single glob, when tasks are created by a function. Nesting one level of arrays inside an array of tasks will result in the inner tasks running in parallel. This behavior should now be consistent when creating tasks using functions. In the following example eslint and prettier will run in parallel (for all files, when any JS files are staged):

    • fixed

      Various performance improvements from skipping redundant internal Git calls.

    • fixed

      Partially staged changes are hidden in a uniquely-named patch file to avoid multiple invocations of lint-staged overwriting it. This makes it safer to run lint-staged in multiple worktrees at the same time.

  2. 17.5.1

    10 Sep 20261 fix
    • fixed

      Fix TypeScript issue TS1254 from defineConfig() by changing the signature from const to a function:

  3. 17.5.0

    5 Sep 20261 new · 3 fixes
    • new

      Lint-staged now refuses to run when files were staged with --intent-to-add, because Git stash doesn't support them. Previously this was an unhandled error.

    • fixed

      Lint-staged now handles color support better in non-TTY streams, and honors the FORCE_COLOR environment variable.

    • fixed

      Update tinyexec@1.3.1 so that local binaries from node_modules/.bin are resolved starting from the directory of each lint-staged configuration file (in monorepo setups). This behavior was broken in lint-staged@16.3.0 where they were only resolved from the current working directory and up.

    • fixed

      Do not try to restore untracked files when using --hide-all and there is no initial commit yet.

  4. 17.4.1

    27 Aug 20261 fix
    • fixed

      This is a version-bump-only release because the previous version 17.4.0 was not published to npmjs.com due to problems with GitHub Actions and Changesets.

  5. 17.3.0

    31 Jul 20261 new · 1 fix
    • new

      It is now possible to run multiple tasks in parallel for a single glob by configuring it with an array of tasks (which run sequentially), and then placing another array inside it (where the tasks will run in parallel). The following demonstrates the order tasks will start in:

    • fixed

      During an in-progress merge, files that are unchanged from the branch being merged are now skipped. Technically, files are only included if there are staged changes against both HEAD and MERGE_HEAD.

  6. 17.2.0

    23 Jul 20261 new
    • new

      The chunking of tasks based on maximum command line argument length has been re-implemented to be more precise. Now the chunking happens based on the final generated command string, instead of just the list of staged files like previously. This benefits mainly Windows platforms and function commands like:

  7. 17.1.1

    22 Jul 20261 fix
    • fixed

      It's now possible to set --max-arg-length=Infinity to effectively disable chunking of tasks based on the number of staged files. The parsing and validation of the numeric CLI options --max-arg-length and --concurrency has been improved.

  8. 17.1.0

    18 Jul 20261 new · 3 fixes
    • new

      The console output of lint-staged has been simplified so that there's less interactive spinners and more explicit messages like "Started…" -> "Done!". The primary purpose of this was to remove Listr2, a very large dependency.

    • fixed

      Try to restore hidden unstaged changes when using --no-revert.

    • fixed

      Console output colors are enabled/disabled more consistently.

    • fixed

      Failed JS function tasks now properly kill other tasks, unless --continue-on-error is used. Previously their failure didn't affect other tasks.

8 other lines we could not sort, mostly version bumps
  • Stage file.js with 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.js with 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

    15.5.0

5 internal lines (docs, tests, tooling) left out.