# What changed in lint-staged

> 47 changes in lint-staged 16 to 17 from its official release notes, upgrade guides and advisories: 6 breaking, 5 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/lint-staged/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## lint-staged 17

### Breaking changes

- lint-staged now stages changes to all tracked files modified by tasks, including files not originally staged or matching configured globs. (17.6.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.6.0)
- Lint-staged refuses to run when files were staged with this flag, because Git stash does not support them. (17.5.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.5.0)
- Failed JS function tasks now kill other tasks unless --continue-on-error is used. (17.1.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.1.0)
- lint-staged now verifies that the installed Git version is at least 2.32.0 before running. (17.0.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)
- Node.js 20 is no longer supported; lint-staged now requires Node.js 22.22.1 or newer. (17.0.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)

### New APIs and options

- Use this option to hide unstaged changes while tasks run, preventing edits by a task from staging those changes too. (17.6.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.6.0)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.6.0)
- Includes all Git-tracked files instead of only staged files; implies --no-stash and --allow-empty. (17.4.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.4.1)
- Added a helper for type-checking the lint-staged configuration, imported from lint-staged/config. (17.4.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.4.1)
- Hides all unstaged changes and untracked files before running tasks; untracked files are included in the backup stash and restored afterward. (17.0.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)

### Behavior and default changes

- Lint-staged now honors the FORCE_COLOR environment variable. (17.5.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.5.0)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.3.0)
- Nested task arrays let a glob run tasks in parallel within a sequential task list. (17.3.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.3.0)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.2.0)
- Native JavaScript/Node.js function tasks are no longer chunked or run multiple times when many files are staged. (17.2.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.2.0)
- Accepts Infinity to disable chunking tasks by the number of staged files; parsing and validation have also been improved. (17.1.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.1.1)
- Output uses fewer interactive spinners and more explicit messages such as “Started…” and “Done!”. (17.1.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.1.0)
- 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.5) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.5)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)
- The yaml dependency is optional and probably won't be installed by default; install it separately when using a YAML configuration file. (17.0.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)

### Fixes and other changes

- Nested arrays of tasks returned by a function now run inner tasks in parallel, consistent with task arrays defined directly. (17.6.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.6.0)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.6.0)
- Changes the signature from const to a function to fix TypeScript issue TS1254. (17.5.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.5.1)
- Lint-staged does not try to restore untracked files when this flag is used and there is no initial commit. (17.5.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.5.0)
- Local binaries from node_modules/.bin are resolved starting from the directory of each lint-staged configuration file in monorepo setups. (17.5.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.5.0)
- Color support is handled better in non-TTY streams. (17.5.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.5.0)
- 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.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.4.1)
- Parsing was rewritten to avoid inconsistent behavior between CLI flags and Node.js API options. (17.4.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.4.1)
- Parsing and validation of this numeric CLI option have been improved. (17.1.1) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.1.1)
- Console output colors are enabled or disabled more consistently. (17.1.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.1.0)
- lint-staged tries to restore hidden unstaged changes when --no-revert is used. (17.1.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.1.0)
- Using this option no longer causes lint-staged to discard the ongoing merge conflict status in .git/MERGE_HEAD. (17.0.8) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.8)
- Using this option no longer causes lint-staged to discard the ongoing merge conflict status in .git/MERGE_HEAD. (17.0.8) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.8)
- Output on stderr is ignored for successful Git commands, avoiding issues when commands emit warnings despite exiting with code 0. (17.0.8) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.8)
- lint-staged uses git add again to stage task modifications, fixing a performance regression in very large Git repositories. (17.0.6) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.6)
- 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.4) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.4)
- 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.3) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.3)
- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v17.0.0)

## lint-staged 16

### Behavior and default changes

- 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.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.3.0)

### Fixes and other changes

- Commands prefer local node_modules/.bin locations over global locations. (16.3.4) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.3.4)
- Git's warning about CRLF line endings no longer interferes with creating the initial backup stash. (16.3.3) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.3.3)
- On Windows, tasks are spawned without the detached option to hide the extra cmd window. (16.3.2) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.3.2)
- Incorrect brace expansions like `*.{js}` are detected exhaustively instead of in a single pass. (16.3.0) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.3.0)
- 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.7) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.2.7)
- Fixes problems where tasks might still have been killed with SIGINT when one of them failed. (16.2.6) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.2.6)
- 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.5) — [release notes](https://github.com/lint-staged/lint-staged/releases/tag/v16.2.5)
