Website: upgrade ESLint 8 -> 10 (flat config)#14701
Open
ondrejmirtes wants to merge 1 commit into
Open
Conversation
- eslint 8.57.1 -> 10.4.0 - replace @typescript-eslint/eslint-plugin + parser (v6) with the typescript-eslint meta-package (v8) + @eslint/js - migrate .eslintrc.js -> eslint.config.mjs (flat config) The previous `eslint -c .eslintrc.js --ext .ts` command had no path argument, so it linted nothing (a no-op). The new `eslint src/js` command actually lints the sources, which surfaced 26 pre-existing violations. All are fixed without changing behaviour: - prefer-for-of: convert index loops to for-of - no-unused-vars: optional catch binding, drop unused trailing params - ban-ts-comment: add descriptions to @ts-ignore directives - no-console: eslint-disable for intentional diagnostics (WASM stdio, fatal-error logging) - no-control-regex: eslint-disable for the intentional control-char regex - auto-fixed: prefer readonly T[], Record<>, drop inferrable type npm run check passes; build output (HTML, RSS) unchanged; playground, config-reference and merch pages smoke-tested with no new console errors. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Upgrades ESLint to v10, which requires the flat config format.
@typescript-eslint/eslint-plugin+@typescript-eslint/parser(v6) with thetypescript-eslintmeta-package (v8) +@eslint/js— the documented setup for flat config.eslintrc.js→eslint.config.mjsHeads-up: the old lint command was a no-op
The previous script was
eslint -c .eslintrc.js --ext .tswith no path argument, so ESLint matched no files and linted nothing — onlytscwas doing real work innpm run check. The new script iseslint src/js, which actually lints the sources. That surfaced 26 pre-existing violations, all fixed here without changing behaviour:prefer-for-of: index loops →for…ofno-unused-vars: optional catch binding (catch {}), dropped unused trailing paramsban-ts-comment: added descriptions to@ts-ignoredirectivesno-console:eslint-disablefor intentional diagnostics (WASM stdout/stderr forwarding, fatal-error logging)no-control-regex:eslint-disablefor the intentional control-character regex in the editorreadonly T[]overReadonlyArray<T>,Record<>over index signature, dropped a trivially-inferrable type annotationVerification
npm run checkpasses (tsc + ESLint actually linting now)./try,/config-reference,/merch) — no new console errors.🤖 Generated with Claude Code