Skip to content

feat(eslint-config)!: default react-perf and jsx-props-no-spreading off - #1120

Merged
prisis merged 2 commits into
mainfrom
feat/react-compiler-rule-defaults
Aug 17, 2026
Merged

feat(eslint-config)!: default react-perf and jsx-props-no-spreading off#1120
prisis merged 2 commits into
mainfrom
feat/react-compiler-rule-defaults

Conversation

@prisis

@prisis prisis commented Aug 17, 2026

Copy link
Copy Markdown
Member

Closes #1085.

Verified both claims against main before changing anything:

  • react/jsx-props-no-spreading is error in the main React rules block, disabled only for Storybook files.
  • react-perf/jsx-no-new-object-as-prop, jsx-no-new-array-as-prop and jsx-no-new-function-as-prop come in at error via the plugin's spread recommended config.

Change

Rule Before After
react-perf/jsx-no-new-object-as-prop error off
react-perf/jsx-no-new-array-as-prop error off
react-perf/jsx-no-new-function-as-prop error off
react-perf/jsx-no-jsx-as-prop unset off
react/jsx-props-no-spreading error off

The reasoning in the issue holds up. The react-perf rules predate the React Compiler, and satisfying them via manual memoisation can make the compiler bail on a component rather than optimise it — so the rule can work against the thing it is trying to achieve. They also fire on every prop object of animation libraries, where object props are the API.

jsx-props-no-spreading fights the standard Radix/shadcn composition pattern, where a wrapper forwards the underlying element's whole prop surface.

Ordering matters here

The react-perf disables must sit after ...configRules(pluginReactPerformance.configs?.flat?.recommended) in the same rules object. My first attempt put them earlier and the spread silently re-enabled all three — the probe still reported every violation. Worth knowing if these are ever moved.

The Storybook-scoped jsx-props-no-spreading off-block is removed as dead: the rule is off everywhere now, and a consumer re-enabling it would be appended after that block and win regardless.

What I did not turn off

The issue asks whether react-x/no-unstable-context-value and react/jsx-no-constructed-context-values belong in the same group. I have left both at error.

They are not the same case. The compiler does not memoise across a context provider boundary, so an unstable provider value still re-renders every consumer of that context no matter what the compiler does to the component. Those two flag a real effect, where the react-perf rules flag a referential-equality technicality the compiler now handles. Happy to revisit with a concrete example if you are seeing false positives.

Verification

Probed with a component using Motion-style animate/initial/transition props and a Radix-style primitive forwarding {...properties}:

  • before: 4 react-perf violations on the props
  • after: none, and --print-config resolves all five rules to 0 while the two context rules stay at 2

Then build 8/8, lint 6/6, tests 4/4 projects.

Breaking

These rules no longer report by default. Projects that want them must enable them in their own config.

🤖 Generated with Claude Code

https://claude.ai/code/session_014FP75FgnREe4L45kZtsa9a

prisis and others added 2 commits August 17, 2026 13:58
The 29.0.1 release repointed lint-staged-config's manifest without regenerating
pnpm-lock.yaml, which still records 29.0.0, so every job on main dies at
`pnpm install --frozen-lockfile`.

This also deadlocks the release pipeline. `Semantic Release` starts with a
"Wait for tests to succeed" gate, the tests cannot pass while the lockfile is
stale, and the lockfile is only refreshed from inside that same job — so the
pipeline cannot repair itself and stays blocked until a lockfile lands by hand.
This is the second occurrence today; 29.0.0 needed the same fix in #1118.

Regenerate. Verified with the same frozen install CI runs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FP75FgnREe4L45kZtsa9a
The react-perf rules predate the React Compiler, which memoises component output
automatically. Satisfying them means hand-rolling useMemo/useCallback, and manual
memoisation can make the compiler bail on a component rather than optimise it, so
following the rule can measurably reduce optimisation. They also fire on every
prop object of animation libraries, where object props are the API rather than an
accident. A reported app saw 211 of 1027 problems from these two rules alone,
essentially all library props and none a genuine performance finding.

`react/jsx-props-no-spreading` fights the standard composition pattern for
Radix/shadcn-style primitives, where a wrapper forwards the underlying element's
whole prop surface. Complying means enumerating every prop of every primitive by
hand and redoing it whenever the upstream library changes.

The react-perf disables sit after the plugin's recommended spread, which would
otherwise re-enable them.

The storybook-scoped `jsx-props-no-spreading` off-block is removed as dead: the
rule is now off everywhere, and a consumer re-enabling it would be appended after
that block and win regardless.

`react-x/no-unstable-context-value` and `react/jsx-no-constructed-context-values`
stay enabled. The compiler does not memoise across a context provider boundary,
so an unstable value there still re-renders every consumer; those two flag a real
effect rather than a referential-equality technicality.

BREAKING CHANGE: `react-perf/jsx-no-new-object-as-prop`,
`react-perf/jsx-no-new-array-as-prop`, `react-perf/jsx-no-new-function-as-prop`,
`react-perf/jsx-no-jsx-as-prop` and `react/jsx-props-no-spreading` no longer
report by default. Projects that want them must enable them in their own config.

Closes #1085

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FP75FgnREe4L45kZtsa9a
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​anolilab/​eslint-config@​29.0.1871009996100

View full report

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@prisis, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 seconds

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 559d545e-a03d-425f-a9f6-ad946dd8551c

📥 Commits

Reviewing files that changed from the base of the PR and between 896853b and 481f601.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • packages/eslint-config/src/config/plugins/react.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@anolilab/commitlint-config@1120
npm i https://pkg.pr.new/@anolilab/eslint-config@1120
npm i https://pkg.pr.new/@anolilab/lint-staged-config@1120
npm i https://pkg.pr.new/@anolilab/stylelint-config@1120

commit: 481f601

@prisis
prisis merged commit d800735 into main Aug 17, 2026
26 checks passed
@prisis
prisis deleted the feat/react-compiler-rule-defaults branch August 17, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eslint-config: turn off react-perf/* and react/jsx-props-no-spreading by default

1 participant