
About lint-staged
lint-staged is an open source tool that runs linters and formatters on the files you have staged for a Git commit. Checks stay fast because they skip everything else in the project.
What it does
You describe in a config file which commands should run for which file patterns. When you commit, lint-staged runs those commands only on the matching staged files. It is often paired with a Git hooks tool so that it runs automatically. A failing check stops the commit, which keeps problem code out of the history.
Key features
- Runs tasks on staged files only
- Config file that matches file patterns
- Supports both linters and formatters
- Includes a helper for writing config files
- Fits into the normal Git commit flow
Who it's for
lint-staged suits teams that already run linters or formatters in a project and want them to check only the changed files on commit.
Pricing and good to know
The project is open source under the MIT license. It is an npm package, so the project needs Node.js. Because it only checks staged files, a full lint of the whole project still needs its own command.
Highlights
- Runs commands only on staged files
- Matches commands to file patterns in a config file
- Runs linters and formatters on each commit
- Includes a helper for writing config files
- Stops the commit when a check fails












