# eslint-on-modifications

> 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.

Latest version **2.0.1** (published 2018-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-on-modifications
pnpm add eslint-on-modifications
yarn add eslint-on-modifications
bun add eslint-on-modifications
```

Provides the command `eslint-on-modifications`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2018-10-05 |
| First published | 2018-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 161.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rajat Jain |
| Maintainers | thisisrajat |
| Keywords | eslint, changes, modifications, lint, jshint, precise, prettier, tooling, javascript, lint changes |

## Links

- npm: https://www.npmjs.com/package/eslint-on-modifications
- Repository: https://github.com/thisisrajat/eslint-on-modifications
- Homepage: https://github.com/thisisrajat/eslint-on-modifications#readme
- Issues: https://github.com/thisisrajat/eslint-on-modifications/issues
- npm.io page: https://npm.io/package/eslint-on-modifications

## Dependencies (1)

- [cross-spawn](https://npm.io/package/cross-spawn.md) ^6.0.5

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2018-10-05
- 2.0.0 — 2018-10-05
- 2.0.0-rc.1 — 2018-10-05
- 1.0.2 — 2018-05-08
- 1.0.1 — 2018-05-08
- 1.0.0 — 2018-05-08

## README

# 🚀 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:

```json
  {
    "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.

---
_Source: https://npm.io/package/eslint-on-modifications · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
