Skip to content

Move to ESLint 9 and flat config - #197

Merged
alistair3149 merged 1 commit into
masterfrom
alistair3149/eslint-9
Nov 12, 2026
Merged

alistair3149 merged 1 commit into
masterfrom
alistair3149/eslint-9

Conversation

@alistair3149

@alistair3149 alistair3149 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

eslint-config-wikimedia 0.33.1 supports ESLint 9 and flat config (T364065). This moves the extension onto them. Lint reports the same two warnings as before.

Human input

Goal and shape: goal from @alistair3149; shape Claude's.

  • Directions: @alistair3149 asked to move our extensions on eslint-config-wikimedia to ESLint 9 and, after merging the first such PR, asked for the rest.

Outcome: not reviewed by a human yet. Left for you: a skim of the config and the arrow-function changes.

Claude's calls

  • Not discussed with @alistair3149:
    • Keeping Grunt's ESLint task, on grunt-eslint 26, rather than a plain eslint npm script.
    • The server config for Gruntfile.js and eslint.config.js.
  • Not verified: the export form in a browser.

Changes

  • Bump eslint-config-wikimedia 0.20.0 → 0.33.1 and grunt-eslint 23.0.0 → 26.0.0, and declare eslint 9.39.5, which eslint.config.js loads directly. grunt-eslint 27 bundles ESLint 10, which eslint-config-wikimedia does not support yet.
  • Replace .eslintrc.json and the eslintIgnore list in package.json with one eslint.config.js. wikimedia/client-es6 is now client/es6.
  • Gruntfile.js and eslint.config.js run in Node, so they get the server config instead of the client one. Gruntfile.js gets the 'use strict' that config requires, in place of a /* eslint-env node */ comment ESLint 9 ignores.
  • Drop the mediawiki/msg-doc: warn override, which is now the default.
  • Turn the callbacks the newer config reports into arrow functions. None of them uses this.
Verification evidence
  • master (grunt-eslint 23, ESLint 7.32, config 0.20.0): 36 files, 0 errors, 2 max-len warnings.
  • Config 0.33.1 alone, on ESLint 8.57 with .eslintrc.json: 38 files (adds .stylelintrc.json and codecov.yml); 9 prefer-arrow-callback errors, all auto-fixable; the same 2 warnings.
  • This branch: npm test passes. ESLint lints the same 38 files, with eslint.config.js in place of .eslintrc.json: 0 errors, the same 2 warnings. The 9 fixes are the only changes --fix made.
  • --print-config from ESLint 8 (config bump alone) and ESLint 9:
    • both files in resources/: rules, globals, ecmaVersion, sourceType, parser and settings match, apart from ESLint 9's own eslint:recommended changes (added no-empty-static-block, no-new-native-nonconstructor, no-unused-private-class-members; dropped no-extra-semi, no-mixed-spaces-and-tabs, no-new-symbol);
    • Gruntfile.js: client/es6 → server config;
    • extension.json, package.json: Atomics and SharedArrayBuffer now defined, from ecmaVersion 2017; no effect on JSON;
    • codecov.yml: same parser and rules.
  • The kept no-jquery overrides and compat/compat browser list differ from 0.33.1's defaults; mediawiki/msg-doc was already warn.
  • Clean npm install: one ESLint copy (9.39.5).
  • CI green, including Linting (npm test on Node 22).

AI-authored — Claude Code, Opus 5.5, on a Professional Wiki account

eslint-config-wikimedia 0.33.1 supports ESLint 9 and flat config
(T364065). This moves the extension onto them. Lint reports the same two
warnings as before.

- Bump eslint-config-wikimedia 0.20.0 → 0.33.1 and grunt-eslint
  23.0.0 → 26.0.0, and declare eslint 9.39.5, which eslint.config.js
  loads directly. grunt-eslint 27 bundles ESLint 10, which
  eslint-config-wikimedia does not support yet.
- Replace .eslintrc.json and the eslintIgnore list in package.json with
  one eslint.config.js. `wikimedia/client-es6` is now `client/es6`.
- Gruntfile.js and eslint.config.js run in Node, so they get the server
  config instead of the client one. Gruntfile.js gets the 'use strict'
  that config requires, in place of a `/* eslint-env node */` comment
  ESLint 9 ignores.
- Drop the `mediawiki/msg-doc: warn` override, which is now the default.
- Turn the callbacks the newer config reports into arrow functions. None
  of them uses `this`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alistair3149
alistair3149 marked this pull request as ready for review November 12, 2026 21:49
@alistair3149
alistair3149 merged commit f683bed into master Nov 12, 2026
8 checks passed
@alistair3149
alistair3149 deleted the alistair3149/eslint-9 branch November 12, 2026 21:50
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