chore(deps): update wordpress monorepo (major)#1868
Merged
Conversation
Bumps: - @wordpress/eslint-plugin: ^22.22.0 -> ^25.1.0 - @wordpress/scripts: ^30.27.0 -> ^32.1.0 Brings ESLint 8 -> 9 via @wordpress/eslint-plugin@25. Legacy .eslintrc.js still works under ESLint 9 (deprecation warnings only). Migration to eslint.config.js will be required before ESLint 10. Validated locally on Node 24: npm install, npm run build, and npm run lint:js all pass. Supersedes #1820 (stale against develop). Merging this PR auto-closes #1820. Closes #1820
@wordpress/scripts@32 forces a flat eslint config; legacy .eslintrc.js is ignored entirely by the new lint-js wrapper. The previous CI hang was caused by wp-scripts injecting its default flat config and our custom rules being dropped. Changes: - Replace .eslintrc.js + .eslintignore with eslint.config.js - Add 'globals' as an explicit devDependency - Drop DEBUG=eslint:cli-engine from lint:js script - Autofix trailing commas across src/js and ui/js (comma-dangle rule)
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.
Major bump of the WordPress tooling monorepo, with the ESLint flat config migration that wp-scripts v32 now requires.
Dependency changes
@wordpress/eslint-plugin:^22.22.0to^25.1.0@wordpress/scripts:^30.27.0to^32.1.0globals: added as devDependency (used directly byeslint.config.js)Config migration
@wordpress/scripts@32forces its own flat config vialint-jswhen noeslint.config.*exists. This silently drops the project's custom rules from.eslintrc.js, and the first CI run on this PR hung for 6 hours on lint because the wp-scripts wrapper effectively re-linted without the legacy ignore patterns.Migration:
.eslintrc.jsand.eslintignoreremoved.eslint.config.jsadded, mirroring previous behavior:recommended-with-formattingfrom@wordpress/eslint-pluginglobalspackage (replacesenv: { browser: true }).eslintignoreDEBUG=eslint:cli-engineenv removed fromlint:js.Source autofixes
ESLint 9's
recommended-with-formattingenforces trailing commas more aggressively. 103comma-dangleerrors were autofixed across 10 files insrc/js/andui/js/. No behavior changes.Validation
Run on Node 24.14.1 (npm 11.11.0):
npm installnpm run build(pre-existing Sass@importdeprecation warning)npm run lint:js(1.5s, 0 errors)Follow-ups
@wordpress/eslint-plugindirectly ineslint.config.jsworks as expected.Supersedes #1820, which was stale against
develop(would have reverted #1735, #1802, #1833, #1847, #1866, #1867). Merging this PR will auto-close #1820.Closes #1820
Part of XWPENG-29.