feat(linter/exhaustive-deps): add support for useEffectEvent#14041
feat(linter/exhaustive-deps): add support for useEffectEvent#14041camc314 merged 2 commits intooxc-project:mainfrom
useEffectEvent#14041Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for React's useEffectEvent hook in the exhaustive dependencies rule by treating it as a stable value that doesn't need to be included in dependency arrays.
- Modified the
is_stable_valuefunction to recognizeuseEffectEventas stable - Added test cases demonstrating correct behavior with
useEffectEvent
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
How are you using this currently with eslint, |
it requires using |
useEffectEvent
CodSpeed Instrumentation Performance ReportMerging #14041 will not alter performanceComparing Summary
Footnotes |
Signed-off-by: Cody Olsen <81981+stipsan@users.noreply.github.com>
In order to support: https://react.dev/learn/separating-events-from-effects#declaring-an-effect-event
We use https://www.npmjs.com/package/use-effect-event in a lot of places, and this is the last blocker for us to use oxlint