{"id":26950,"library":"eslint-baseline","title":"eslint-baseline","description":"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.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/lukahartwig/eslint-baseline","tags":["javascript","baseline","ci","cli","code","continuous integration","eslint","linter","quality"],"install":[{"cmd":"npm install eslint-baseline","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-baseline","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-baseline","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency - eslint-baseline wraps ESLint and requires it to run linting","package":"eslint","optional":true}],"imports":[{"note":"eslint-baseline is a CLI tool, not a library. Use via npx or as a script in package.json.","symbol":"cli","correct":"npx eslint-baseline"},{"note":"ESM-only since v0.1.0; no CommonJS support.","wrong":"const eslintBaseline = require('eslint-baseline')","symbol":"default","correct":"import eslintBaseline from 'eslint-baseline'"},{"note":"Named export for programmatic use; not commonly used.","wrong":"","symbol":"ESLintBaseline","correct":"import { ESLintBaseline } from 'eslint-baseline'"}],"quickstart":{"code":"npm install --save-dev eslint eslint-baseline\nnpx eslint-baseline --init\necho \"Add lint scripts to package.json:\"\necho '\"scripts\": { \"lint\": \"eslint-baseline .\", \"lint:update-baseline\": \"eslint-baseline --update-baseline .\" }'\nnpm run lint\n# Creates .eslint-baseline.json; subsequent runs only show new errors\nnpm run lint:update-baseline\n# Updates baseline to include new errors","lang":"typescript","description":"Demonstrates installing eslint-baseline, initializing a baseline, configuring package.json scripts, and running lint with baseline update."},"warnings":[{"fix":"Run eslint-baseline --update-baseline to regenerate baseline file.","message":"v0.3.0 introduced hash-based error identification; location-based baseline files from older versions are incompatible.","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Update to latest version and regenerate baseline.","message":"Location-based error identification deprecated in favor of hash-based approach since v0.3.2.","severity":"deprecated","affected_versions":"<0.3.2"},{"fix":"Run eslint-baseline --update-baseline after editing files to refresh baseline.","message":"Editing files with existing errors may shift error locations, causing them to appear as new errors until baseline is updated.","severity":"gotcha","affected_versions":"*"},{"fix":"Pin exact version and test updates.","message":"Programmatic API is not stable; breaking changes may occur without major version bump.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'2024':65 '8':73 'adopt':22 'allow':18 'api':80 'base':47,53 'baselin':3,6,16,60,82 'ci':83 'cli':56,84 'code':85 'command':62 'continu':86 'creat':29 'depend':70 'detect':54 'develop':77 'differenti':44 'earli':76 'error':27,42,48 'eslint':2,5,13,72,88 'eslint-baselin':1,4 'eslint-baseline.json':31 'exist':26 'explicit':59 'featur':68 'file':17,32 'hash':46 'hash-bas':45 'identif':49 'ignor':25 'improv':50 'integr':87 'javascript':81 'key':43 'known':34 'legaci':19 'lint':23 'linter':89 'locat':52 'location-bas':51 'minor':67 'new':41 'novemb':64 'peer':69 'project':20 'qualiti':90 'releas':63 'report':40 'run':12,38 'simpl':55 'store':33 'subsequ':37 'tool':10 'unstabl':79 'updat':61 'v0.4.0':7 'violat':35 'workflow':57 'x':74","created_at":"2026-05-01T17:43:43.540257+00:00","updated_at":"2026-05-01T17:43:43.540257+00:00","problems":[{"fix":"Run `npm install --save-dev eslint` (eslint is a peer dependency).","cause":"eslint is not installed or not in node_modules.","error":"Error: Cannot find module 'eslint'"},{"fix":"Install the missing plugin, e.g., `npm install --save-dev eslint-plugin-react`.","cause":"A required ESLint plugin is missing.","error":"Error: Failed to load plugin 'xxx' declared in '.eslintrc'"},{"fix":"Check ESLint documentation for valid config properties; fix the config.","cause":"Invalid ESLint config file (e.g., .eslintrc.json).","error":"Error: ESLint configuration is invalid: Unexpected top-level property \"xxx\""},{"fix":"Run `npx eslint-baseline --init` or `npx eslint-baseline --update-baseline`.","cause":"Baseline file not found; likely first run without --init or --update-baseline.","error":"Error: ENOENT: no such file or directory, open '.eslint-baseline.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"eslint-baseline","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/lukahartwig/eslint-baseline","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-baseline","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-04-25","next_check":"2026-07-24","install_tag":null}}