feat(biome_js_analyze): added support for React 19.2#7669
feat(biome_js_analyze): added support for React 19.2#7669ematipico merged 4 commits intobiomejs:nextfrom
Conversation
🦋 Changeset detectedLatest commit: 1741c01 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedThe pull request is closed. WalkthroughAdds React 19.2 support by recognising Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
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. Comment |
|
Thank you! Please add a changeset as the bot suggests |
CodSpeed Performance ReportMerging #7669 will not alter performanceComparing Summary
Footnotes
|
ematipico
left a comment
There was a problem hiding this comment.
Please send the PR towards the next branch, as explained in the contribution guideline
added new hook to `useExhaustiveDependencies` and added new API to API list
My bad, I did see that but clearly forgot again. I have now rebased to |
This comment was marked as spam.
This comment was marked as spam.
|
@barklund It looks like the CI is still failing. Could you take a look? |
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
React 19.2 ships useEffectEvent as a stable export. This removes the DIY polyfill from hookPolyfills.ts and updates all 19 consumers to import directly from "react". Unlike the polyfill (which used useCallback to maintain a stable reference), the native hook returns a new function identity each render. All useEffectEvent results have been removed from dependency arrays — including them would cause effects to re-fire every render. Biome doesn't yet recognise useEffectEvent natively (biomejs/biome#7669), so a stableResult entry is added to biome.jsonc.
Summary
This PR updates Biome’s React integration to reflect the React 19.2 release:
useEffectEventis now treated likeuseRefin theuseExhaustiveDependenciesrule:<Activity />anduseEffectEventhas been added to the list of known React components.Fixes #7631.
Test Plan
useExhaustiveDependencies/valid.jsto confirm thatuseEffectEventis not required in dependency arrays.useExhaustiveDependencies/missingDependenciesInvalid.jsxto ensure addinguseEffectEventdoes not impact existing tests.All tests pass locally.
Docs
No new user-facing rules or options introduced.
No documentation updates required beyond the implicit coverage in the existing rule docs.