Skip to content

chore: add react-doctor as an eslint plugin - #538

Merged
fregante merged 9 commits into
mainfrom
claude/react-doctor-eslint
Oct 11, 2026
Merged

fregante merged 9 commits into
mainfrom
claude/react-doctor-eslint

Conversation

@fregante

@fregante fregante commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Created by Claude, will be reviewed by @fregante first.

Part of #475. Adds eslint-plugin-react-doctor with its recommended preset, as is.

  • Add the plugin and its recommended preset
  • Disable react-doctor/jsx-no-new-object-as-prop and react-doctor/jsx-no-new-function-as-prop for now, as TODOs in disabledRules
  • Disable react-doctor/jsx-no-target-blank permanently (react/jsx-no-target-blank is already off)
  • Convert the 4 react-doctor-disable-next-line comments to eslint-disable-next-line (ESLint ignores the former), keeping the reasons
  • Fix the remaining reports (useTightScreen.ts, lib/index.tsx), nothing is suppressed

Only the 2 warnings in GraphDiagram.tsx are left, on purpose.

Enables the recommended rules of oxlint-plugin-react-doctor, as warnings
so the existing reports don't fail the lint. None of them are fixed here.
@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmgraph Ready Ready Preview Oct 11, 2026 12:20am UTC

Request Review

ESLint doesn't know the react-doctor-disable-next-line comments, so the
reports they silence showed up again. The reasons are kept as the
descriptions.
Replaces the oxlint plugin with the ESLint one and enables its
recommended preset, with every rule as an error. The
jsx-no-new-object-as-prop rule is disabled for now.
Created with eslint --suppress-all, so only new reports fail the lint.
None of them are fixed here.
Disables jsx-no-new-function-as-prop for now and jsx-no-target-blank
permanently, since react/jsx-no-target-blank already covers it. Stops
raising the severity of the preset's warnings, and refreshes the
suppressions.
useTightScreen reads the media query with useSyncExternalStore instead of
copying it into state, and the load listener uses globalThis like the
others. Nothing is suppressed anymore, so the suppressions file is gone.
The previous commit only removed the suppressions file. This adds the
fixes it was meant to include: useTightScreen subscribes to the media
query instead of copying it into state, and the load listener uses
globalThis like the other listeners.

@fregante fregante left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

✅

@fregante
fregante marked this pull request as ready for review October 10, 2026 17:24
@fregante

Copy link
Copy Markdown
Member Author

Basically a config cleanup PR except for the media query hook, which is a good change.

@fregante
fregante enabled auto-merge (squash) October 11, 2026 00:20
@fregante
fregante merged commit 5396119 into main Oct 11, 2026
7 checks passed
@fregante
fregante deleted the claude/react-doctor-eslint branch October 11, 2026 00:21

This branch was successfully deployed

1 active deployment
Preview — f43c340f Deployed Oct 11, 2026 by vercel[bot]
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.

Run react-doctor and fix issues

1 participant