unstale

npm / lint-staged

lint-staged

What changed in lint-staged 9 to 17, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-28.

21 breaking1 deprecations10 new APIs and options15 behavior and defaults29 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

lint-staged 1739 changes

Breaking changes 6

  • lint-staged now stages changes to all tracked files modified by tasks, including files not originally staged or matching configured globs.

    17.6.0release notes

  • Lint-staged refuses to run when files were staged with this flag, because Git stash does not support them.

    17.5.0release notes

  • Failed JS function tasks now kill other tasks unless --continue-on-error is used.

    17.1.0release notes

  • lint-staged now verifies that the installed Git version is at least 2.32.0 before running.

    17.0.0release notes

  • Node.js 20 is no longer supported; lint-staged now requires Node.js 22.22.1 or newer.

    17.0.0release notes

  • On POSIX systems, scripts with the #!/usr/bin/env node shebang now run with the same Node.js version that lint-staged itself was started with.

    17.0.0release notes

New APIs and options 5

  • Use this option to hide unstaged changes while tasks run, preventing edits by a task from staging those changes too.

    17.6.0release notes

  • Task functions receive a log() function for emitting output while the task runs; output is visible by default only when the task fails, and rejected-task errors are shown.

    17.6.0release notes

  • Includes all Git-tracked files instead of only staged files; implies --no-stash and --allow-empty.

    17.4.1release notes

  • Added a helper for type-checking the lint-staged configuration, imported from lint-staged/config.

    17.4.1release notes

  • Hides all unstaged changes and untracked files before running tasks; untracked files are included in the backup stash and restored afterward.

    17.0.0release notes

Behavior and default changes 10

  • Lint-staged now honors the FORCE_COLOR environment variable.

    17.5.0release notes

  • During an in-progress merge, files unchanged from the branch being merged are skipped; files are included only if they have staged changes against both HEAD and MERGE_HEAD.

    17.3.0release notes

  • Nested task arrays let a glob run tasks in parallel within a sequential task list.

    17.3.0release notes

  • Chunking is based on the final generated command string rather than only the staged-file list, making it more precise, especially on Windows.

    17.2.0release notes

  • Native JavaScript/Node.js function tasks are no longer chunked or run multiple times when many files are staged.

    17.2.0release notes

  • Accepts Infinity to disable chunking tasks by the number of staged files; parsing and validation have also been improved.

    17.1.1release notes

  • Output uses fewer interactive spinners and more explicit messages such as “Started…” and “Done!”.

    17.1.0release notes

  • The default value is now set based on the running platform, controlling how very long lists of staged files are split into chunks.

    17.0.5release notes

  • lint-staged runs this command after tasks instead of adding the originally staged files, improving compatibility with non-default indexes and pathspec commits.

    17.0.0release notes

  • The yaml dependency is optional and probably won't be installed by default; install it separately when using a YAML configuration file.

    17.0.0release notes

Fixes and other changes 18

  • The warning about hidden partially-staged changes is displayed only when restoring those changes fails.

    17.6.1release notes

  • Nested arrays of tasks returned by a function now run inner tasks in parallel, consistent with task arrays defined directly.

    17.6.0release notes

  • Partially staged changes are hidden in uniquely named patch files, avoiding overwrites between lint-staged invocations and making concurrent runs in multiple worktrees safer.

    17.6.0release notes

  • Changes the signature from const to a function to fix TypeScript issue TS1254.

    17.5.1release notes

  • Lint-staged does not try to restore untracked files when this flag is used and there is no initial commit.

    17.5.0release notes

  • Local binaries from node_modules/.bin are resolved starting from the directory of each lint-staged configuration file in monorepo setups.

    17.5.0release notes

  • Color support is handled better in non-TTY streams.

    17.5.0release notes

  • Its behavior was improved when lint-staged runs in multiple worktrees in parallel; parallel instances in the same tree should still be avoided.

    17.4.1release notes

  • Parsing was rewritten to avoid inconsistent behavior between CLI flags and Node.js API options.

    17.4.1release notes

  • Parsing and validation of this numeric CLI option have been improved.

    17.1.1release notes

  • Console output colors are enabled or disabled more consistently.

    17.1.0release notes

  • lint-staged tries to restore hidden unstaged changes when --no-revert is used.

    17.1.0release notes

  • Using this option no longer causes lint-staged to discard the ongoing merge conflict status in .git/MERGE_HEAD.

    17.0.8release notes

  • Output on stderr is ignored for successful Git commands, avoiding issues when commands emit warnings despite exiting with code 0.

    17.0.8release notes

  • lint-staged uses git add again to stage task modifications, fixing a performance regression in very large Git repositories.

    17.0.6release notes

  • lint-staged now correctly adds task modifications to the commit when files are explicitly staged, committed with --all, or committed using a pathspec.

    17.0.4release notes

  • Fixes lint-staged behavior when files are implicitly staged by git commit -am or git commit with a pathspec, without using git add.

    17.0.3release notes

  • When Node.js is installed from Ubuntu App Center, scripts with the #!/usr/bin/env node shebang are now spawned with the real Node.js binary instead of the Snap symlink.

    17.0.0release notes

lint-staged 1613 changes

Breaking changes 4

  • Validation for deprecated advanced configuration has been removed; remaining options may instead be treated as valid globs for staged files.

    16.0.0release notes

  • Processes are spawned using nano-spawn instead of execa. Node.js scripts used as tasks might need to be invoked explicitly with node, especially on Windows.

    16.0.0release notes

  • The lowest supported Node.js version is now 20.18, so developers using an older version need to upgrade.

    16.0.0release notes

  • The flag has been removed, and lint-staged no longer evaluates commands directly via a shell. Use a shell script or function syntax instead.

    16.0.0release notes

New APIs and options 1

  • Function tasks can be configured with a title and task function; lint-staged passes matching staged files to the function and displays the custom title.

    16.0.0release notes

Behavior and default changes 1

  • When a task fails, its subprocesses are killed more efficiently via the process group on Unix systems and the taskkill command on Windows.

    16.3.0release notes

Fixes and other changes 7

  • Commands prefer local node_modules/.bin locations over global locations.

    16.3.4release notes

  • Git's warning about CRLF line endings no longer interferes with creating the initial backup stash.

    16.3.3release notes

  • On Windows, tasks are spawned without the detached option to hide the extra cmd window.

    16.3.2release notes

  • Incorrect brace expansions like *.{js} are detected exhaustively instead of in a single pass.

    16.3.0release notes

  • The “failed to spawn” error message is no longer displayed when a task fails normally; it is reserved for failures to spawn the task.

    16.2.7release notes

  • Fixes problems where tasks might still have been killed with SIGINT when one of them failed.

    16.2.6release notes

  • Fixes unhandled promise rejections when tasks fail to spawn; previously lint-staged could fail and the backup stash might not be automatically restored.

    16.2.5release notes

lint-staged 151 changes

Breaking changes 1

  • Requires Node.js 18.12.0 or later and drops support for Node.js 16.

    15.0.0release notes

lint-staged 141 changes

Breaking changes 1

  • Node.js 14 is no longer supported; upgrade to at least 16.14.0.

    14.0.0release notes

lint-staged 131 changes

Breaking changes 1

  • lint-staged no longer supports Node.js 12, which reached end of life on 30 April 2022.

    13.0.0release notes

lint-staged 122 changes

Breaking changes 2

  • lint-staged is now a pure ESM module; integrations should use an import instead of require.

    12.0.0release notes

  • The required Node.js versions are ^12.20.0, ^14.13.1, or >=16.0.0.

    12.0.0release notes

lint-staged 111 changes

Breaking changes 1

  • Node.js 12 LTS 'Erbium' is now the minimum required version.

    11.0.0release notes

lint-staged 1010 changes

Breaking changes 3

  • Empty commits now cause an error by default; use this option to allow them.

    10.0.0release notes

  • Task modifications are staged automatically; remove git add from task configurations to avoid warnings and race conditions.

    10.0.0release notes

  • Node.js v8 is no longer supported; the Node.js version dependency is at least 10.13.0.

    10.0.0release notes

New APIs and options 1

  • Set allowEmpty to true in the Node.js API to allow empty commits.

    10.0.0release notes

Behavior and default changes 3

  • Tasks can now be async functions.

    10.0.0release notes

  • gitWorkflow uses git stashes to handle changes while tasks run.

    10.0.0release notes

  • Tasks are split into chunks to support shells with limited maximum argument length.

    10.0.0release notes

Fixes and other changes 3

  • Binary files are now supported.

    10.0.0release notes

  • Unstaged changes are restored more reliably, including when restoration fails or applying changes needs a three-way merge.

    10.0.0release notes

  • Untracked files are backed up and restored so they remain around while tasks run.

    10.0.0release notes

lint-staged 98 changes

Breaking changes 2

  • Very long argument strings are no longer chunked on Windows; function linters should be used to customize this behavior.

    9.0.0release notes

  • lint-staged no longer resolves local commands; execa does this instead, so missing commands no longer produce pretty error messages.

    9.0.0release notes

Deprecations 1

  • Advanced configuration options are deprecated in favour of the simple format, and using them produces a deprecation error.

    9.0.0release notes

New APIs and options 3

Behavior and default changes 1

  • Function linters can return an array of commands.

    9.0.0release notes

Fixes and other changes 1