Repository navigation
Move to ESLint 9 and flat config - #140
Merged
Merged
Conversation
eslint-config-wikimedia 0.33.1 supports ESLint 9 and flat config (T364065). This moves the extension onto them. Lint reports the same 24 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. - Fix what the newer config reports in resources/ext.wikibase.rdf.js: callbacks become arrow functions (none uses `this`), and `.done().fail()` becomes `.then()` with both handlers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alistair3149
force-pushed
the
alistair3149/eslint-9
branch
from
November 12, 2026 22:02
6645bfe to
31b0bfa
Compare
alistair3149
marked this pull request as ready for review
November 12, 2026 22:03
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.
eslint-config-wikimedia 0.33.1 supports ESLint 9 and flat config (T364065). This moves the extension onto them. Lint reports the same 24 warnings as before.
Human input
Goal and shape: goal from @alistair3149; shape Claude's.
Outcome: not reviewed by a human yet. Left for you: the
.then()change in the mappings save flow, which no automated test covers, and a skim of the config.Claude's calls
eslintnpm script.Gruntfile.jsandeslint.config.js..done( a ).fail( b )→.then( a, b ), rather than.then().catch()or a disable comment. With both handlers in one.then(), an exception in the success handler does not run the failure handler..then(), the handlers run one tick later than with.done()/.fail(), and an exception inside one is logged by jQuery as a console warning instead of surfacing as an uncaught error. Nothing here waits on the timing; whether the error reporting change matters is your call.Changes
eslint-config-wikimedia0.20.0 → 0.33.1 andgrunt-eslint23.0.0 → 26.0.0, and declareeslint9.39.5, whicheslint.config.jsloads directly. grunt-eslint 27 bundles ESLint 10, which eslint-config-wikimedia does not support yet..eslintrc.jsonand theeslintIgnorelist inpackage.jsonwith oneeslint.config.js.wikimedia/client-es6is nowclient/es6.Gruntfile.jsandeslint.config.jsrun in Node, so they get the server config instead of the client one.Gruntfile.jsgets the'use strict'that config requires, in place of a/* eslint-env node */comment ESLint 9 ignores.mediawiki/msg-doc: warnoverride, which is now the default.resources/ext.wikibase.rdf.js: callbacks become arrow functions (none usesthis), and.done().fail()becomes.then()with both handlers.Verification evidence
no-jquery/no-global-selector, 7no-jquery/no-class-state)..eslintrc.json: 45 files (adds.stylelintrc.jsonandcodecov.yml); 6prefer-arrow-callbackand 2no-jquery/no-done-failerrors; the same 24 warnings.npm testpasses. ESLint lints the same 45 files, witheslint.config.jsin place of.eslintrc.json: 0 errors, the same 24 warnings.--print-configfrom ESLint 8 (config bump alone) and ESLint 9:resources/ext.wikibase.rdf.js: rules, globals,ecmaVersion,sourceType, parser and settings match, apart from ESLint 9's owneslint:recommendedchanges (addedno-empty-static-block,no-new-native-nonconstructor,no-unused-private-class-members; droppedno-extra-semi,no-mixed-spaces-and-tabs,no-new-symbol).Gruntfile.js: client/es6 → server config.extension.json,i18n/en.json,package.json:AtomicsandSharedArrayBuffernow defined, fromecmaVersion2017; no effect on JSON.mediawiki/msg-docoverride leaves the printed config unchanged.npm install: one ESLint copy (9.39.5).Linting(npm teston Node 22), code style, PHPStan and Psalm.