# lint-staged: 7.9 out of 10

A strong pick. 1st of 10 in [Git hooks and release tools](https://elestia.ai/opensource/git-release/index.md).

lint-staged runs your formatters and linters only on the files staged in Git, usually from a Husky or Lefthook pre-commit hook. It is the standard staged-files runner for JavaScript and TypeScript projects. It is actively maintained, has few dependencies and no known advisories, so it is a strong pick today.

**Best for:** JavaScript and TypeScript projects that want fast pre-commit formatting and linting on staged files only, paired with Husky or another hook runner.

## Scores

- **Overall: 7.9** (likely 7.1 to 8.6)
  - Claude Opus 5.5 (8.0): For Node projects it is the default way to run linters on staged files: well maintained, lean and widely trusted. It only does half of the hook job, and Lefthook now covers hook running and staged-file filtering in one faster tool, so it is not a 9. Pairing it with Husky remains the safe standard choice.
  - GPT-6.2 Sol (7.8): lint-staged is a strong pick for a new Node-based project that wants flexible staged-file checks and has a hook runner in place. Lefthook is a stronger fit when one tool needs to install hooks and run staged-file tasks. Active maintenance and adoption by Vue and Vite+ support the recommendation, while the unresolved commit-selection issue and below-median download growth keep it short of a category default.
- **Needed by many: 6.5** (likely 5.4 to 7.5)
  - Claude Opus 5.5 (6.5): Many JS/TS teams that use pre-commit hooks want linting scoped to staged files, and that is exactly this tool's job. It covers only the pre-commit half of the category, not releases. Solo developers and teams that rely only on CI often skip hooks altogether.
  - GPT-6.2 Sol (6.4): Pre-commit linting and formatting apply across JavaScript and TypeScript frameworks, and State of JavaScript shows broad use of ESLint and Prettier. lint-staged serves the staged-file part of that workflow and requires Node.js for the tooling. The survey measures use of the underlying tools, leaving demand for pre-commit checks less certain.
- **Helps a lot: 8.2** (likely 7.1 to 8.9)
  - Claude Opus 5.5 (8.5): It does its narrow job very well: it handles partial staging, backs up to a stash, chunks long argument lists, and supports function tasks, TS config and parallel groups. The 17.0.x restaging changes and their revert show a few rough edges. Old reports of lost work are mostly from much earlier versions. AI agents know its config format well.
  - GPT-6.2 Sol (7.8): Version 17.6.1 has clear examples, typed configuration, useful task output, and support for partial staging and per-package rules. Its default write workflow can stage changes outside the original selection, and a user reported an unrelated save being included in a path-limited commit. An external no-op benchmark found more startup overhead than Lefthook, but actual commit times depend heavily on the configured commands.
- **Holds up over time: 7.9** (likely 6.9 to 8.9)
  - Claude Opus 5.5 (8.0): The last year saw 291 commits and 24 releases, and only 4 issues and 1 pull request are open, which shows close upkeep. The work rests mostly on one long-time lead maintainer, and I found no clear funding. That keeps the score below 9. Major versions raise the Node minimum quickly, but the upgrades are documented in a migration guide.
  - GPT-6.2 Sol (7.8): The project recorded 291 commits and 24 releases in the past year, and ESLint still sponsors it monthly. The maintainer responded to the commit-selection report the same day and opened a fix that was still pending at review time. One listed maintainer and recent changes to Node.js support and auto-staging make future upgrades less predictable.
- **Used widely: 8.1** (likely 7.2 to 8.8)
  - Claude Opus 5.5 (9.0): About 164M downloads in 4 weeks, 305k dependent repos and 85k dependent packages put it near the top of the category, just behind Husky. Its growth ratio of 2.7 is below the 4.1 median, and Lefthook is growing much faster, so it is slowly losing share. It is still chosen directly in hundreds of thousands of projects.
  - GPT-6.2 Sol (7.2): ecosyste.ms found about 305,000 dependent repositories and 85,000 dependent packages, putting lint-staged behind Husky and ahead of the other listed peers by repository count. Four-week downloads rose from 60.0 million to 164.0 million, a 2.73× increase against the catalog’s 4.1× median. That suggests a loss of relative ground while Lefthook gained ground. CI reinstalls and tooling bundles make downloads a noisy measure of new choices.
- **Vouched for: 7.9** (likely 6.9 to 8.9)
  - Claude Opus 5.5 (7.5): Independent 2026 guides recommend it as the standard staged-files runner, and many large open-source projects use it. It gets almost no attention on Hacker News or Bluesky, and I found no survey data for it. Its validation comes from widespread adoption and comparison write-ups.
  - GPT-6.2 Sol (8.3): Vue uses it in its own pre-commit workflow, Vite+ builds its staged command on it, and Prettier documents it for multi-tool checks and partial staging. ESLint’s ongoing sponsorship adds financial backing. These are concrete endorsements, though comparable satisfaction data for staged-file runners remains sparse.
- **Safe: 8.0** (likely 6.9 to 8.8)
  - Claude Opus 5.5 (8.5): It has no known advisories, only 3 direct dependencies (about 5 packages installed) and an MIT licence. Releases are published from GitHub Actions with signed commits. There is no Scorecard data, and publishing depends on a small group of people, which keeps the range open.
  - GPT-6.2 Sol (7.5): The MIT-licensed package has three direct dependencies and zero recorded OSV advisories. GitHub Actions stages npm releases for approval by a maintainer using two-factor authentication. Unintended staging is a real risk for commit contents in the current version. OpenSSF Scorecard coverage and the number of authorized npm approvers remain unverified.

## Good

- It handles partially staged files correctly, keeps a backup stash, and adds formatter fixes back into the commit.
- It is very active: 24 releases in the last year added parallel task groups, defineConfig, --all and smarter argument chunking.
- Its install is small: v17.1 dropped Listr2, so it now needs only about 5 packages.
- It works with any hook runner (Husky, Lefthook, simple-git-hooks or plain .git/hooks) and accepts JSON, JS or TS config.

## Bad

- It does not install hooks, so you still need Husky or a similar runner. Lefthook covers both jobs in one tool.
- Whole-project checks such as tsc do not fit the staged-files model and belong in pre-push or CI.
- v17 requires Node 22.22.1 or newer and Git 2.32 or newer, and several 17.0.x patches fixed and then reverted the way it restages task changes.
- It works only with Node, and its tasks run one after another unless you set up nested parallel groups.

## The numbers

- Downloads, 4 weeks: 164M
- In a year: ×2.7
- GitHub stars: 15k
- Commits, 12 months: 291
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/lint-staged/lint-staged
- npm: https://www.npmjs.com/package/lint-staged

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
