lint-staged

lint-staged allows you to run code formatting and error control tools only on prepared (stagged) files prior to the git commit process. Instead of the entire project, it offers a performance work process by targeting only the modified files. It works with configurable command sequences to maintain code quality.

LI

lint-staged · Code Quality & Review

STARS14.8K
FORKS478
COMMITS1.6K
CONTRIBUTORS157
VERSIONv17.5.1
UPDATEDtoday
JavaScriptGit HooksCode QualityAutomationMIT

Common commercial products in this category: SonarCloud, Codacy, DeepSource

What can it do?
  • Before the Git commit process, you just run the linter and formatter on the prepared files.
  • By filtering according to specific file extensions, you process the entire project without scanning it.
  • To maintain code quality, you implement commands that you define in an automatic order.
User reviews
  • • NeutralGitHub Issue

    Add better support for partially staged files

    “Add better support for partially staged files”

  • ↓ NegativeGitHub Issue

    [13.0.0] excessive output when invoked through pre-commit script

    “### Description Not sure if this is a bug, but lint-staged v13.0.0 sure is chatty. :) Running `npx lint-staged` (not through a husky pre-commit script) seems to yield the expected output, though. See both examples below. ### Steps to reproduce 1. Install lint-staged 13.0.0 2.…”

My note

Alternative pages

More in: Code Quality & Review