New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-baseline

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-baseline

Run ESLint with a baseline.

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-baseline

GitHub license npm version

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

npm install --save-dev eslint eslint-baseline

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

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

Run the script to create a baseline

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

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

Keywords

FAQs

Package last updated on 25 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc