-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Fix] destructuring-assignment
: fix false negative when using typeof props.a
#3835
Conversation
…of props.a` Fixes jsx-eslint#3828 Co-authored-by: Chiawen Chen <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
3cf37dc
to
76025ba
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3835 +/- ##
==========================================
- Coverage 97.69% 93.66% -4.03%
==========================================
Files 136 133 -3
Lines 9958 9957 -1
Branches 3688 3693 +5
==========================================
- Hits 9728 9326 -402
- Misses 230 631 +401
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
awesome, thanks! i'll get this landed in the next day or two.
##### [v7.37.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7372---20241022) ##### Fixed - \[`destructuring-assignment`]: fix false negative when using `typeof props.a` ([#3835][] [@golopot](https://github.com/golopot)) ##### Changed - \[Refactor] \[`destructuring-assignment`]: use `getParentStatelessComponent` ([#3835][] [@golopot](https://github.com/golopot)) [7.37.2]: jsx-eslint/eslint-plugin-react@v7.37.1...v7.37.2 [#3835]: jsx-eslint/eslint-plugin-react#3835
##### [v7.37.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7372---20241022) ##### Fixed - \[`destructuring-assignment`]: fix false negative when using `typeof props.a` ([#3835][] [@golopot](https://github.com/golopot)) ##### Changed - \[Refactor] \[`destructuring-assignment`]: use `getParentStatelessComponent` ([#3835][] [@golopot](https://github.com/golopot)) [7.37.2]: jsx-eslint/eslint-plugin-react@v7.37.1...v7.37.2 [#3835]: jsx-eslint/eslint-plugin-react#3835
##### [v7.37.2](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7372---20241022) ##### Fixed - \[`destructuring-assignment`]: fix false negative when using `typeof props.a` ([#3835][] [@golopot](https://github.com/golopot)) ##### Changed - \[Refactor] \[`destructuring-assignment`]: use `getParentStatelessComponent` ([#3835][] [@golopot](https://github.com/golopot)) [7.37.2]: jsx-eslint/eslint-plugin-react@v7.37.1...v7.37.2 [#3835]: jsx-eslint/eslint-plugin-react#3835
Fixes #3828
The rule failed to catch usages of
typeof props.a
because it is parsed a TSQualifiedName instead of a memberExpression.