Skip to content

chore(eslint): upgrade to ESLint 9 with flat config#42

Merged
pchuri merged 2 commits into
mainfrom
chore/eslint-9
Jun 18, 2026
Merged

chore(eslint): upgrade to ESLint 9 with flat config#42
pchuri merged 2 commits into
mainfrom
chore/eslint-9

Conversation

@pchuri

@pchuri pchuri commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Why

eslint@8.57.1 is EOL and was the last source of npm warn deprecated notices on install — for ESLint itself and its transitive deps (@humanwhocodes/config-array, @humanwhocodes/object-schema, rimraf@3). This finishes the warnings cleanup started in #41.

Changes

  • Replace .eslintrc.json with eslint.config.js (ESLint 9 flat config).
  • Add @eslint/js (the recommended preset, replacing the eslint:recommended string extend) and globals (provides the node + jest globals that env used to supply).
  • Bump eslint ^8.54.0^9.39.4.

All existing rules are preserved verbatim (indent 2, unix linebreaks, single quotes, semi, no-console off, no-unused-vars with argsIgnorePattern), and sourceType is set to commonjs to match the codebase.

Verification

  • eslint . passes with no code changes (31 files linted; a probe file confirms the rules still fire).
  • 284 tests pass; npm audit --omit=dev clean.
  • Zero npm warn deprecated notices remain on a clean npm ci.

🤖 Generated with Claude Code

pchuri and others added 2 commits June 18, 2026 17:34
ESLint 8.57.1 is EOL and emitted deprecation warnings on install for it
and its transitive deps (@humanwhocodes/*, rimraf@3). Migrate to ESLint 9:

- Replace .eslintrc.json with eslint.config.js (flat config)
- Add @eslint/js (recommended preset) and globals (node + jest)
- Preserve all existing rules and the recommended ruleset; lint passes
  with no code changes and the same rules still fire

Clears all `npm warn deprecated` notices on a clean install.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ESLint 9 requires Node ^18.18 || ^20.9 || >=21.1 (it uses structuredClone),
so it cannot run on the Node 16 matrix entry. Linting is environment-
independent, so move it out of the per-Node test matrix into its own job
on Node 20. The test matrix keeps validating the CLI on 16/18/20 for
consumer compatibility; only the linter moves.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pchuri pchuri merged commit 4354bd3 into main Jun 18, 2026
6 checks passed
@pchuri pchuri deleted the chore/eslint-9 branch June 18, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant