Elestia Open Source Ratings
7.9

lint-staged

A strong pick. 1st of 10 git hooks and release tools.

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.

WebsiteGitHubnpm

Scores

Overall7.9

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 8.0, likely 7.5 to 8.5

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, likely 6.7 to 8.7

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 many6.5

How many developers need a tool for this job?

Claude Opus 5.5: 6.5, likely 5.5 to 7.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, likely 5.3 to 7.5

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 lot8.2

How well does it do the job for those who need it?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

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, likely 6.7 to 8.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 time7.9

Will it still be a good choice in two years?

Claude Opus 5.5: 8.0, likely 7.0 to 9.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.

  • github.commitsLastYear: 291 commits, 24 releases last year
  • github.openIssues: 4 open issues vs 898 closed
  • unpkg.com/lint-staged@17.5.1/MIGRATION.md: v17 dropped Node 20 and now requires Git 2.32
  • maintainers: Mostly maintained by one lead maintainer, iiroj

GPT-6.2 Sol: 7.8, likely 6.7 to 8.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 widely8.1

How many use it, and is that growing?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

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.

  • npm downloadsLast4Weeks: 164M now vs 60M a year ago (ratio 2.7)
  • dependents.packages: 84,635 dependent packages
  • peers Lefthook downloads: Lefthook ratio about 13x, growing much faster

GPT-6.2 Sol: 7.2, likely 6.3 to 8.1

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.

  • dependents repos and packages: 305,144 repositories and 84,635 npm packages in the collector’s coverage
  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 2.73× year-over-year growth against a 4.1× catalog median
  • peers Husky and Lefthook: Husky leads in dependent repositories and Lefthook downloads grew about 13.4×
  • github.com/voidzero-dev/vite-plus/releases: Vite+ installs lint-staged as part of its tooling
Vouched for7.9

Who stands behind it being good?

Claude Opus 5.5: 7.5, likely 6.5 to 8.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, likely 7.2 to 9.2

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.

Safe8.0

How safe is it to depend on?

Claude Opus 5.5: 8.5, likely 7.5 to 9.0

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.

  • advisories.total: 0 advisories
  • npm dependencies: 3 direct dependencies
  • github.com/lint-staged/lint-staged/releases: Listr2 removal cut node_modules from 29 to 5 packages; releases published via github-actions
  • scorecard: No Scorecard data

GPT-6.2 Sol: 7.5, likely 6.3 to 8.6

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

npm downloads, 4 weeks
164M ×2.7 in a year
GitHub stars
15k
Commits, 12 months
291
npm version
17.6.1 Nov 2026
Versions, 12 months
24
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
None
Licence
MIT

Read on 21 November 2026 from GitHub (lint-staged/lint-staged), npm (lint-staged), OSV and the OpenSSF Scorecard.

Git hooks and release tools

  1. 7.9lint-staged
  2. 7.9commitlint
  3. 7.6Lefthook
  4. 7.6semantic-release
  5. 7.1release-it
  6. 7.1Husky
  7. 7.0release-please
  8. 6.4bumpp
  9. 6.3np
  10. 6.1simple-git-hooks
Compare all 10 on six scores