Skip to content

Website: upgrade ESLint 8 -> 10 (flat config)#14701

Open
ondrejmirtes wants to merge 1 commit into
2.2.xfrom
website-deps-eslint10
Open

Website: upgrade ESLint 8 -> 10 (flat config)#14701
ondrejmirtes wants to merge 1 commit into
2.2.xfrom
website-deps-eslint10

Conversation

@ondrejmirtes
Copy link
Copy Markdown
Member

Upgrades ESLint to v10, which requires the flat config format.

  • eslint 8.57.1 → 10.4.0
  • replaced @typescript-eslint/eslint-plugin + @typescript-eslint/parser (v6) with the typescript-eslint meta-package (v8) + @eslint/js — the documented setup for flat config
  • migrated .eslintrc.jseslint.config.mjs

Heads-up: the old lint command was a no-op

The previous script was eslint -c .eslintrc.js --ext .ts with no path argument, so ESLint matched no files and linted nothing — only tsc was doing real work in npm run check. The new script is eslint 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…of
  • no-unused-vars: optional catch binding (catch {}), dropped unused trailing params
  • ban-ts-comment: added descriptions to @ts-ignore directives
  • no-console: eslint-disable for intentional diagnostics (WASM stdout/stderr forwarding, fatal-error logging)
  • no-control-regex: eslint-disable for the intentional control-character regex in the editor
  • auto-fixed: readonly T[] over ReadonlyArray<T>, Record<> over index signature, dropped a trivially-inferrable type annotation

Verification

  • npm run check passes (tsc + ESLint actually linting now).
  • Build output (HTML, RSS feed) unchanged.
  • Smoke-tested the affected pages (playground /try, /config-reference, /merch) — no new console errors.

🤖 Generated with Claude Code

- 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>
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