Repository navigation
Move to ESLint 9 and flat config - #197
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 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>
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 two warnings as before.
Human input
Goal and shape: goal from @alistair3149; shape Claude's.
Outcome: not reviewed by a human yet. Left for you: a skim of the config and the arrow-function changes.
Claude's calls
eslintnpm script.Gruntfile.jsandeslint.config.js.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.this.Verification evidence
max-lenwarnings..eslintrc.json: 38 files (adds.stylelintrc.jsonandcodecov.yml); 9prefer-arrow-callbackerrors, all auto-fixable; the same 2 warnings.npm testpasses. ESLint lints the same 38 files, witheslint.config.jsin place of.eslintrc.json: 0 errors, the same 2 warnings. The 9 fixes are the only changes--fixmade.--print-configfrom ESLint 8 (config bump alone) and ESLint 9:resources/: 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,package.json:AtomicsandSharedArrayBuffernow defined, fromecmaVersion2017; no effect on JSON;codecov.yml: same parser and rules.no-jqueryoverrides andcompat/compatbrowser list differ from 0.33.1's defaults;mediawiki/msg-docwas alreadywarn.npm install: one ESLint copy (9.39.5).Linting(npm teston Node 22).