# eslint-baseline

> Run ESLint with a baseline.

Latest version **0.4.0** (published 2022-11-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-baseline
pnpm add eslint-baseline
yarn add eslint-baseline
bun add eslint-baseline
```

Provides the command `eslint-baseline`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2022-11-25 |
| First published | 2022-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=18.0.0 |
| Dependencies | 2 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Luka Hartwig |
| Maintainers | lukahartwig |
| Keywords | baseline, ci, cli, code, continuous integration, eslint, linter, quality |

## Links

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

## Dependencies (2)

- [zod](https://npm.io/package/zod.md) ^3.19.1
- [cmd-ts](https://npm.io/package/cmd-ts.md) ^0.11.0

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

- 0.4.0 (latest) — 2022-11-25
- 0.3.2 — 2022-11-03
- 0.3.1 — 2022-11-03

## README

# eslint-baseline

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/lukahartwig/eslint-baseline/blob/main/LICENSE)
[![npm version](https://img.shields.io/npm/v/eslint-baseline.svg?style=flat)](https://www.npmjs.com/package/eslint-baseline)

Trying to add a linter to a legacy project can be tough. eslint-baseline lets you ignore all existing errors by creating a baseline.

## Project Status

This project is still in early development. It is usable but non of the APIs are stable yet.

## Getting Started

Install eslint-baseline

```sh
npm install --save-dev eslint eslint-baseline
```

If you already have ESlint setup update the lint scripts in `package.json`

```diff
{
  "scripts": {
-   "lint": "eslint ."
+   "lint": "eslint-baseline .",
+   "lint:update-baseline": "eslint-baseline --update-baseline ."
  }
}
```

Run the script to create a baseline

```sh
npm run lint
```

There should be a file `.eslint-baseline.json` that contains all current lint errors. Subsequent runs of `npm run lint` will only show new errors.

To update the baseline run

```sh
npm run lint:update-baseline
```

## Known limitations

- The heuristic to detect already known errors is based on the location of the error. Editing a file with errors might move those errors to a different location and thus will show them as "new" in the output. As a workaround, you have to update the baseline.

## Alternatives

A list of similar projects

- [@lint-todo/eslint-formatter-todo](https://www.npmjs.com/package/@lint-todo/eslint-formatter-todo)
- [@luminateone/eslint-baseline](https://www.npmjs.com/package/@luminateone/eslint-baseline)

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