Giter Site home page Giter Site logo

thisisrajat / eslint-on-modifications Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 88 KB

Freely lint files by running ESLint on only the changes you have introduced and nothing else ๐Ÿš€

License: MIT License

JavaScript 100.00%
eslint modifications linter lint linting jshint javascript eslintrc changes precise prettier tooling lines

eslint-on-modifications's Introduction

๐Ÿš€ ESLint on modifications only ๐Ÿš€

The problem with linting is that it doesn't work on the lines you have changed or modified. It works on the entire file. This problem is trivial on small codebases but as number of files and their sizes grow, it can become an issue.

Linting becomes irrelevant when every error on the file is reported instead of errors that you introduced by your change. It's hard to find relevant errors in the noisy lint report.

I believe linting should happen only on the changes that you've introduced.

๐Ÿฅ๐Ÿฅ DRUMROLL PLEASE ๐Ÿฅ๐Ÿฅ

Presenting ESLint on modifications only.

The idea behind this library is simple: Lint only what you've changed.

USAGE:

To add it to your already existing codebase, run either npm install eslint-on-modifications --save-dev or yarn add --dev eslint-on-modifications depending on which package manager you use.

After installing, you can add a npm script in your package.json like:

  {
    "scripts": {
      "lint": "eslint-on-modifications"
    }
  }

You can now run yarn lint or npm run lint to check for errors/warnings that you introduced.

Out of the box, eslint on modifications is running on steriods. It will check which javascript files are currently staged and will invoke ESLint for them.

It uses the default formatter that comes bundled with ESLint, which means warnings and errors are properly color coded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.