# lint-staged/lint-staged

🚫💩 — Run tasks like formatters and linters against staged git files

Repository: https://github.com/lint-staged/lint-staged
Canonical: https://ross.abutalabs.com/products/lint-staged
Homepage: https://www.npmjs.com/package/lint-staged
Language: JavaScript
License: MIT
License Family: permissive
Topics: stage-files, linter, stylelint, eslint, git, developer-experience, workflow
Last push: 2026-08-22T08:42:55+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 95, longevity 100
- inputs: {"age_days": 3883, "days_push": 11, "days_rel": 33, "gap_med": 6, "n_releases_24m": 44}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 14721, forks 472 (observed 2026-08-28T04:11:07.545679+00:00)

## What it is
lint-staged is an npm CLI tool that runs arbitrary shell tasks, such as formatters and linters, against only the files staged in git. It is typically wired into a pre-commit hook so code quality checks run on just the files being committed.

## Use cases
- run prettier only on staged files before commit
- lint changed files in a pre-commit git hook
- prevent unformatted code from being committed
- run eslint on files about to be committed
- speed up linting by checking only staged files
- auto-fix lint errors before each git commit

## When to choose
- you want fast pre-commit checks limited to staged files
- you already use husky or git hooks and want to run formatters/linters on commit
- you want to auto-fix and re-stage files before they enter the repo

## When to avoid
- you need to lint the entire codebase in CI rather than staged files
- your project does not use git
- you only want a simple check script without configuration

## Facets
- artifact type: cli-tool
- maturity: stable
- function: linter, formatter, developer-tools, ci-cd, cli
- domain: developer-tools, version-control, web-development
- platform: cli, cross-platform
- tags: git-hooks, pre-commit, staged-files, code-quality, prettier, eslint, husky, automation, nodejs

## Member repositories
- lint-staged/lint-staged (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:07.545679+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:07:14.458297+00:00, confidence not recorded.
  - readme: https://github.com/lint-staged/lint-staged (fetched 2026-08-28T04:11:07.545679+00:00, sha b896a61036a7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
