JSPM

eslint-baseline

0.4.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 469
  • Score
    100M100P100Q90315F
  • License MIT

Run ESLint with a baseline.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-baseline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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