Registry / testing / eslint-baseline

eslint-baseline

JSON →
library0.4.0jsnpmunverified

eslint-baseline (v0.4.0) is a tool to run ESLint with a baseline file, allowing legacy projects to adopt linting by ignoring existing errors. It creates a `.eslint-baseline.json` file storing known violations, and subsequent runs only report new errors. Key differentiators: hash-based error identification (improved location-based detection), simple CLI workflow, and explicit baseline update command. Released November 2024 with minor features; peer dependency on ESLint 8.x. In early development with unstable APIs.

testing
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

eslint-baseline is a CLI tool, not a library. Use via npx or as a script in package.json.

npx eslint-baseline

ESM-only since v0.1.0; no CommonJS support.

import eslintBaseline from 'eslint-baseline'

Named export for programmatic use; not commonly used.

import { ESLintBaseline } from 'eslint-baseline'

Demonstrates installing eslint-baseline, initializing a baseline, configuring package.json scripts, and running lint with baseline update.

npm install --save-dev eslint eslint-baseline npx eslint-baseline --init echo "Add lint scripts to package.json:" echo '"scripts": { "lint": "eslint-baseline .", "lint:update-baseline": "eslint-baseline --update-baseline ." }' npm run lint # Creates .eslint-baseline.json; subsequent runs only show new errors npm run lint:update-baseline # Updates baseline to include new errors
eslint-baseline --version
Debug
Known footguns
breakingv0.3.0 introduced hash-based error identification; location-based baseline files from older versions are incompatible.
deprecatedLocation-based error identification deprecated in favor of hash-based approach since v0.3.2.
gotchaEditing files with existing errors may shift error locations, causing them to appear as new errors until baseline is updated.
gotchaProgrammatic API is not stable; breaking changes may occur without major version bump.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
10 hits · last 30 days
claudebot
4
gptbot
3
ahrefsbot
3
Resources