Skip to content

Upgrade frontend tooling and adopt shared flat lint configs - #776

Merged
obenland merged 2 commits into
trunkfrom
chore/frontend-tooling
Sep 17, 2026
Merged

obenland merged 2 commits into
trunkfrom
chore/frontend-tooling

Conversation

@obenland

@obenland obenland commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

This follow-up upgrades Node.js from 20 to 24, @wordpress/scripts from 27.9.0 to 35.0.0, and @wordpress/env from 9.3.0 to 11.15.0 so the repository can use the shared flat ESLint and Stylelint configurations from wporg-repo-tools.

Stacked on #775. This PR targets chore/phpcs-tooling to show only the frontend changes; retarget it to trunk after #775 merges. Do not merge this PR into the temporary base branch.

  • Replace the legacy ESLint wrapper with flat configuration and explicit generated/dependency-directory exclusions; scope lint commands to plugin sources.
  • Move Stylelint out of package.json into a shared-config wrapper using the CSS preset for PostCSS sources. Preserve the existing line-length and duplicate-selector exceptions, and track .stylelintrc as the entry point for both CLI and editor autodiscovery.
  • Identify WordPress-provided imports as ESLint externals without adding runtime npm dependencies, and resolve newly enforced lint findings with unused catch-binding removal, a corrected JSDoc type, CSS keyword spelling, and a documented legacy clipping fallback.

Validation: clean npm ci; Composer validation; PHPCS across 83 files with no errors or warnings; CSS lint; JS lint with zero errors and ten existing React Hook warnings; production build with the same 139 output paths; and PHP 8.2 tests in an isolated wp-env environment (32 tests, 107 assertions). Browser behavior has not been manually tested.

Base automatically changed from chore/phpcs-tooling to trunk September 17, 2026 13:16
@obenland
obenland force-pushed the chore/frontend-tooling branch from 40a06f6 to 001c862 Compare September 17, 2026 13:18
@obenland
obenland marked this pull request as ready for review September 17, 2026 13:19
Copilot AI lite review requested due to automatic review settings September 17, 2026 13:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@obenland
obenland merged commit affcc88 into trunk Sep 17, 2026
2 checks passed
@obenland
obenland deleted the chore/frontend-tooling branch September 17, 2026 14:11
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.

2 participants