# lint-staged

> Run tasks like formatters and linters against files staged in Git

Source: https://talira.ai/catalog/lint-staged-p1rk71x0
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / git / hooks](https://talira.ai/categories/developer-tools/git/hooks), [developer tools / linting](https://talira.ai/categories/developer-tools/linting)
- Licence: MIT[^1]
- Pricing: Free[^1]
- Free tier: yes[^1]
- Backed by: [lint-staged](https://talira.ai/orgs/lint-staged-maintainers.md)

lint-staged runs formatters, linters and any other shell tasks on only the files staged in Git, matched by glob patterns, so checks before a commit stay fast and broken code doesn't reach the repository. It backs up the original state with a git stash before running tasks, stages any changes the tasks make, and is usually run from a pre-commit hook set up with [Husky](https://talira.ai/catalog/husky-zpjapvjr.md).

## Links

- GitHub: https://github.com/lint-staged/lint-staged

## Problems it solves

- run ESLint and Prettier only on the files I'm committing
- stop badly formatted code from being committed
- make pre-commit checks fast in a big repository

## Features

- runs tasks on staged files only, filtered by glob
- any shell command: linters, formatters, tests
- backs up the original state before running
- stages changes made by tasks
- JS configuration files

## Trust

Overall: 0.71 out of 1.
Signals: maintenance 1.00, adoption 0.83, momentum 0.62, community 0.89, backing 0.30, extensibility 0.00.

- last commit 8 days ago
- 69 commits in the last 90 days
- latest release v17.6.2 8 days ago
- 14.8k GitHub stars
- 169 contributors
- accepts sponsorship (Open Collective)
- has a company behind it

## Related

- Works with [Husky](https://talira.ai/catalog/husky-zpjapvjr.md)

## Alternatives

- [pretty-quick](https://talira.ai/catalog/pretty-quick-vjah55ap.md): Runs Prettier on only the files you changed, with a pre-commit mode
- [Lefthook](https://talira.ai/catalog/lefthook-882qc1jp.md): Fast and powerful Git hooks manager for any type of projects.
- [commitlint](https://talira.ai/catalog/commitlint-pcb6j4ak.md): Lint commit messages against your team's commit convention
- [pre-commit](https://talira.ai/catalog/pre-commit-ymy35rpp.md): A framework for managing and maintaining multi-language pre-commit hooks.
- [pre-commit (npm)](https://talira.ai/catalog/pre-commit-npm-p7tsxe3k.md): Installs a git pre-commit hook that runs your npm scripts before each commit
- [detect-secrets](https://talira.ai/catalog/detect-secrets-eb4tk1py.md): An enterprise friendly way of detecting and preventing secrets in code.

## Sources

[^1]: https://github.com/lint-staged/lint-staged/blob/main/LICENSE (checked 27 Nov 2026)
[^2]: https://github.com/lint-staged/lint-staged/blob/main/README.md (checked 27 Nov 2026)
