Skip to content

feat(lint): Enable react/incompatible-library and react/void-use-memo - #127775

Merged
scttcper merged 11 commits into
masterfrom
scttcper/enable-react-incompatible-library
Oct 16, 2026
Merged

scttcper merged 11 commits into
masterfrom
scttcper/enable-react-incompatible-library

Conversation

@scttcper

@scttcper scttcper commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Turns on the last two React Compiler rules we had off.

react/incompatible-library flags hooks from libraries that break memoization, like TanStack Virtual's useVirtualizer. The one existing hit in useVirtualRows gets an inline ignore, and the old TODO comment goes away.

react/void-use-memo catches useMemo callbacks that don't return anything. No existing hits, so it's just on.

@scttcper
scttcper added this pull request to stack #127776 October 16, 2026 15:33
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 16, 2026
scttcper and others added 3 commits October 16, 2026 08:37
`react/todo` reports where the React Compiler bails out, like
`try`/`finally` without a `catch`. When it bails, the other compiler
rules stop checking that component, so this makes the gaps visible and
keeps new ones out.

The 109 existing findings across 82 files go into the suppression
baseline instead of getting fixed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The React Compiler skips any component or hook that suppresses a React
hooks rule, which also turns off the other compiler rules there. All of
the existing hits are old `eslint-disable react-hooks/exhaustive-deps`
comments.

The 91 existing findings across 77 files go into the suppression
baseline, so only new suppressions fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`react/incompatible-library` flags hooks from libraries that break
memoization, like TanStack Virtual. The one existing hit in
`useVirtualRows` goes into the incubator baseline.

`react/void-use-memo` catches `useMemo` callbacks that return nothing.
No existing hits, so it's just on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scttcper
scttcper force-pushed the scttcper/enable-react-incompatible-library branch from 35be085 to 7efab67 Compare October 16, 2026 15:37
@sentry

sentry Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 630 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

scttcper and others added 5 commits October 16, 2026 08:48
Moves `react/todo` out of the incubator and back to a regular rule. The
109 existing findings get `oxlint-disable-next-line` comments instead of
suppression budgets, so they're visible where the compiler bails out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… scttcper/enable-react-rule-suppression

# Conflicts:
#	oxlint-suppressions.json
#	oxlint.config.ts
…dings

Moves `react/rule-suppression` out of the incubator and back to a
regular rule. Each of the 91 old `eslint-disable react-hooks/exhaustive-deps`
comments gets an `oxlint-disable-next-line` above it instead of a
suppression budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession' into scttcper/enable-react-incompatible-library

# Conflicts:
#	oxlint-suppressions.json
#	oxlint.config.ts
Moves `react/incompatible-library` out of the incubator and back to a
regular rule. The one hit in `useVirtualRows` gets an
`oxlint-disable-next-line` comment instead of a suppression budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scttcper and others added 2 commits October 16, 2026 09:05
It flags every `exhaustive-deps` suppression in either comment spelling,
so keeping it on just stacks an extra ignore above all 91 existing ones.
Removes those comments and leaves the rule off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession' into scttcper/enable-react-incompatible-library
@scttcper
scttcper removed this pull request from stack #127776 October 16, 2026 16:08
@scttcper
scttcper changed the base branch from scttcper/enable-react-rule-suppression to scttcper/enable-react-todo October 16, 2026 16:08
@scttcper
scttcper added this pull request to stack #127787 October 16, 2026 16:08
Base automatically changed from scttcper/enable-react-todo to master October 16, 2026 16:11
@scttcper
scttcper marked this pull request as ready for review October 16, 2026 16:14
@scttcper
scttcper requested review from a team as code owners October 16, 2026 16:14
@scttcper
scttcper merged commit 92c580f into master Oct 16, 2026
91 checks passed
@scttcper
scttcper deleted the scttcper/enable-react-incompatible-library branch October 16, 2026 16:31

This branch was successfully deployed

1 active deployment
Preview — 9acae8b0 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants