Skip to content

Conversation

@GaryJones
Copy link
Contributor

Summary

This PR migrates from ESLint 8 to ESLint 9 with the new flat config format, enabling the use of @automattic/eslint-plugin-wpvip 1.0.0.

Key Changes

  • ESLint upgrade: 8.56.0 → ^9.7.0
  • Plugin upgrade: @automattic/eslint-plugin-wpvip 0.13.1 → ^1.0.0
  • Removed deprecated packages:
    • babel-eslint (replaced by @babel/eslint-parser in the plugin)
    • eslint-plugin-flowtype (not used in codebase)
    • eslint-plugin-wpcalypso (functionality now in wpvip plugin)
  • Config migration: Converted .eslintrc.js to eslint.config.js (flat config)
  • Ignores migration: Moved .eslintignore contents into eslint.config.js
  • Glob 10.x fix: Updated webpack.config.js to handle paths without leading ./

Notes

The config uses individual configs (javascript, testing) instead of recommended to work around a bug in @automattic/eslint-plugin-wpvip@1.0.0 where the react-hooks config uses the legacy plugins array format instead of flat config object format.

Related

This enables closing Dependabot PR #838 which was blocked by ESLint peer dependency conflicts.

Test plan

  • npm run lint-js passes
  • npm run build succeeds
  • CI passes

🤖 Generated with Claude Code

This migration enables using @automattic/eslint-plugin-wpvip 1.0.0 which
requires ESLint 9. The main driver is to unblock Dependabot PR #838.

Changes:
- Upgrade eslint from 8.56.0 to ^9.7.0
- Upgrade @automattic/eslint-plugin-wpvip from 0.13.1 to ^1.0.0
- Remove deprecated packages no longer needed with new plugin:
  babel-eslint, eslint-plugin-flowtype, eslint-plugin-wpcalypso
- Convert .eslintrc.js to eslint.config.js (flat config format)
- Remove .eslintignore (ignores now in eslint.config.js)
- Fix glob 10.x compatibility in webpack.config.js (paths no longer
  include leading './')

Note: Using individual configs instead of "recommended" to work around
a bug in eslint-plugin-wpvip 1.0.0 where react-hooks config uses legacy
plugins array format instead of flat config object format.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@GaryJones GaryJones requested a review from a team as a code owner December 14, 2025 23:58
@GaryJones GaryJones self-assigned this Dec 14, 2025
@GaryJones GaryJones added the type: maintenance Routine maintenance and code quality improvements label Dec 14, 2025
@GaryJones GaryJones added this to the Next (minor) milestone Dec 15, 2025
@GaryJones GaryJones merged commit 7db948f into develop Dec 15, 2025
14 checks passed
@GaryJones GaryJones deleted the chore/eslint-9-migration branch December 15, 2025 00:07
@GaryJones GaryJones mentioned this pull request Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: maintenance Routine maintenance and code quality improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants