Skip to content

chore(deps): update wordpress monorepo (major)#1868

Merged
PatelUtkarsh merged 2 commits into
developfrom
chore/wordpress-monorepo-major
May 13, 2026
Merged

chore(deps): update wordpress monorepo (major)#1868
PatelUtkarsh merged 2 commits into
developfrom
chore/wordpress-monorepo-major

Conversation

@PatelUtkarsh
Copy link
Copy Markdown
Member

@PatelUtkarsh PatelUtkarsh commented May 12, 2026

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.0 to ^25.1.0
  • @wordpress/scripts: ^30.27.0 to ^32.1.0
  • globals: added as devDependency (used directly by eslint.config.js)

Config migration

@wordpress/scripts@32 forces its own flat config via lint-js when no eslint.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.js and .eslintignore removed.
  • eslint.config.js added, mirroring previous behavior:
    • extends recommended-with-formatting from @wordpress/eslint-plugin
    • browser globals via the globals package (replaces env: { browser: true })
    • same five custom rule overrides
    • ignore patterns folded in from .eslintignore
  • DEBUG=eslint:cli-engine env removed from lint:js.

Source autofixes

ESLint 9's recommended-with-formatting enforces trailing commas more aggressively. 103 comma-dangle errors were autofixed across 10 files in src/js/ and ui/js/. No behavior changes.

Validation

Run on Node 24.14.1 (npm 11.11.0):

  • npm install
  • npm run build (pre-existing Sass @import deprecation warning)
  • npm run lint:js (1.5s, 0 errors)

Follow-ups

  • The wp-scripts v32 default flat config no longer auto-pulls our project rules. Confirmed that requiring @wordpress/eslint-plugin directly in eslint.config.js works as expected.
  • ESLint 10 will tighten rule application further. The flat config in this PR should remain valid.

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.

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)
@PatelUtkarsh PatelUtkarsh merged commit 7e8a23e into develop May 13, 2026
2 checks passed
@PatelUtkarsh PatelUtkarsh deleted the chore/wordpress-monorepo-major branch May 13, 2026 06:04
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