🚫💩 — Run linters on git staged files (by okonet)

Lint-staged Alternatives

Similar projects and alternatives to lint-staged

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better lint-staged alternative or higher similarity.

lint-staged reviews and mentions

Posts with mentions or reviews of lint-staged. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-26.
  • Set up linting and formatting for code and (S)CSS files in a Next.js project
    6 projects | | 26 Apr 2023
    lint-staged is a package that can be used to run formatting and linting commands on staged files in a Git repo.
  • How do you handle eslint/prettier configs across multiple repos?
    9 projects | /r/typescript | 14 Apr 2023
    To answer your next question: I lint and format on save, and I use Git hooks installed by Husky and executed through Lint-Staged (this tool helps ensure your Git hooks only run on modified files, etc) to ensure there are no lint or formatting errors whenever making a commit or pushing code. This is helpful for teams, as some developers tend to forget to run lint tasks, or don't have the Prettier extension installed in their IDE. If there are lint errors, the commit is rejected until fixed. YMMV - you'll need to fine-tune the strictness of this based on the team's needs.
  • How to create and publish a TypeScript library with ease
    7 projects | | 7 Mar 2023
    Uses Husky Git hooks and Lint-staged pre-commit hooks.
  • How to Contribute on the First Day of a Frontend Project
    5 projects | | 4 Jan 2023
    Something else to consider is applying linting and formatting before every git commit. A package like Lint-staged only lints and formats on staged items, ensuring all pushed code follows the standards in the repo. This allows developers to have their own formatting preferences when developing, while the code homogenizes on push. Linting pre-commit also avoids strict rules like no-console or no-unused-vars restricting a developer when writing code, when it should only apply in production. Imagine not being able to console log anything during development!
  • Commit Like a PRO
    3 projects | | 11 Nov 2022
    Lint-Staged Docs
  • How to beautify your code and make contributions easy?
    3 projects | | 8 Nov 2022
    Additionally, there are pre-commit hooks which can be setup to seamlessly validate and modify the source code before every commit. I followed Prettier documentation to create one. I ran npx mrm@2 lint-staged which installed husky and lint-stagedand added a configuration to the project’s package.json. Then, I modified the commands a little and that's it.
  • Just deployed my first web app. I know it's simple, but any feedback would be greatly appreciated..
    4 projects | /r/webdev | 30 Oct 2022
    I'm noticing a lack of formatting in your JS. Some files have semi-colons, some don't. Some lines are indented more than others. There's inconsistent use of single vs double quotes. You can easily standardize formatting with a Prettier. It's recommend to run it with husky and lint-staged on every commit so you never commit code which is unformatted. (Same with your HTML and CSS which are inconsistently formatted making it harder to read.)
  • 🚀 NodeJS + Ts.ED + TypeScript + Clean Architecture Template
    14 projects | | 5 Oct 2022
    Git hooks with Husky and lint-staged
  • Require commit-msg hook for all users...
    4 projects | /r/github | 19 Sep 2022
  • Streamlining your Tailwind CSS workflow with ESLint + Prettier
    8 projects | | 13 Jul 2022
    To help automate the process, we can use husky to create a pre-commit hook that will run lint-staged, which in turn will run these linting scripts on staged files, before committing them.
  • A note from our sponsor - Sonar | 4 Oct 2023
    Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work. Learn more →


Basic lint-staged repo stats
4 days ago
Write Clean JavaScript Code. Always.
Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.