chore(eslint): upgrade to ESLint 9 with flat config#42
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
eslint@8.57.1is EOL and was the last source ofnpm warn deprecatednotices 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
.eslintrc.jsonwitheslint.config.js(ESLint 9 flat config).@eslint/js(therecommendedpreset, replacing theeslint:recommendedstring extend) andglobals(provides thenode+jestglobals thatenvused to supply).eslint^8.54.0→^9.39.4.All existing rules are preserved verbatim (
indent2, unix linebreaks, single quotes,semi,no-consoleoff,no-unused-varswithargsIgnorePattern), andsourceTypeis set tocommonjsto match the codebase.Verification
eslint .passes with no code changes (31 files linted; a probe file confirms the rules still fire).npm audit --omit=devclean.npm warn deprecatednotices remain on a cleannpm ci.🤖 Generated with Claude Code