Repository navigation
Migrate to ESLint 10 and ESLint React - #1239
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
The partial-specific override disables the new undefined-component detection for all MDX partials.
1 open finding
What changed in this PR
Migrates static analysis to ESLint 10 and ESLint React while updating affected code and CI checks.
Changes:
- Replaces
eslint-plugin-reactand updates ESLint configuration. - Fixes hook placement and preserves caught error causes.
- Adds TypeScript checking to PR validation.
| File | Description |
|---|---|
package.json |
Updates linting dependencies. |
eslint.config.mjs |
Migrates React and MDX lint rules. |
src/components/ProductCard/index.tsx |
Moves base URL hook usage to the component body. |
plugins/mcp-metadata-plugin/src/utils.ts |
Preserves the original error as the cause. |
.github/workflows/_static-checks.yaml |
Adds TypeScript checking to CI. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aponcedeleonch
left a comment
There was a problem hiding this comment.
LGTM. Quick disclaimer: I'm no expert with React, so I drove this review completely with the help of AI and focused on checking for regressions.
What I checked:
- ESLint, typecheck, and Prettier pass on the PR head and with current main merged in (the eslint.config.mjs merge is clean).
- Built both main and the merged PR and diffed the rendered HTML after normalizing asset hashes. All 383 pages are identical.
- Probed the MDX lint config with throwaway files. Undefined components are caught in pages and partials, globals and imports resolve, missing keys are caught, and props is only allowed in partials.
One small follow-up: renovate.json still has the "Temporarily block eslint v10" rule for eslint and @eslint/js. It's stale after this lands, so it might be worth removing here or in a follow-up so future ESLint majors aren't skipped.

Description
ESLint 9 is end of life, and the released
eslint-plugin-reactstill depends on APIs removed in ESLint 10. Upgrade ESLint to 10.12.0 and replace that plugin with@eslint-react/eslint-plugin, following its migration guide and TypeScript preset.Keep
eslint-plugin-mdxand preserve Docusaurus component globals. Use ESLint 10's native JSX reference tracking to catch undefined MDX components, and disable the Hooks placement rule for MDX because page expressions compile into a component render body. Explicitly retain available equivalents of the previous recommended checks.Move ProductCard's URL Hook to the component body and use its URL helper in conditional rendering. Preserve caught errors as
causeto satisfy ESLint 10's recommended rules. Addnpm run typecheckto PR static checks, including duplicate JSX prop checking in TSX.Coverage differs from the previous plugin: duplicate JSX props in MDX and some legacy React checks have no built-in equivalent. Use stable keys for CRD enum values and modifier separators. Clean up HubSpot script load listeners on unmount and include the target element ID in the effect dependencies.
Type of change
Related issues/PRs
Validation
npm run buildpasses.npm run typecheckpasses.npm run eslintpasses with no warnings.npm run prettierpasses.git diff --checkpasses.Submitter checklist
Content and formatting
Reviewer checklist
Content