-
-
Notifications
You must be signed in to change notification settings - Fork 726
fix(linter/exhaustive-dependencies): prevent is_callee_of_call_expr flag from leaking into nested expressions #15832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
1005264 to
f6347f0
Compare
66f5d6b to
32f4fdd
Compare
CodSpeed Performance ReportMerging #15832 will not alter performanceComparing Summary
Footnotes
|
f6347f0 to
953e0c3
Compare
Merge activity
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the exhaustive-dependencies linter where the is_callee_of_call_expr flag was leaking into nested expressions during AST traversal. The fix ensures that when recursively visiting member expression objects, the flag is properly reset to prevent incorrect dependency analysis.
Key Changes
- Reset
is_callee_of_call_exprflag tofalsebefore visiting nested objects in static member expressions - Restructured code from
matchtoif letfor better readability - Added comprehensive test cases for property access within expressions followed by method calls
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/oxc_linter/src/rules/react/exhaustive_deps.rs | Fixed flag leak by resetting is_callee_of_call_expr before recursive visits; added test cases for nested property access in expressions |
| crates/oxc_linter/src/snapshots/react_exhaustive_deps.snap | Updated snapshot to reflect correct detection of multiple dependency levels in property chains |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lag from leaking into nested expressions (#15832)
953e0c3 to
646d020
Compare

No description provided.