fix(noComponentHookFactories): don't report non-function use* bindings - #11346
Conversation
🦋 Changeset detectedLatest commit: 9b5947b The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
✅ Organic activityNo automation signals detected in the analyzed events. This is an automated analysis by AgentScan |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe Possibly related PRs
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change narrows hook detection to function-valued bindings and adds focused test coverage; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
037f0d8 to
9b5947b
Compare
Summary
Fixes #11335
The hook path detected hooks purely by name, so any
use-prefixed binding was reportedregardless of what it held.
A call expression does not qualify, so
const useStore = createStore(..)is no longerreported even though it may evaluate to a function.
Test Plan
Added the reported case and other non-function initializers to
valid.jsx. Extendedinvalid.jsxwith function-expression and parenthesized-arrow hooks.Docs
N/A