jsx-eslint / eslint-plugin-react

React-specific linting rules for ESLint
MIT License
9.01k stars 2.77k forks source link

[Fix] `destructuring-assignment`: fix false negative when using typeof props.a #3835

Closed golopot closed 1 month ago

golopot commented 1 month ago

Fixes #3828

The rule failed to catch usages of typeof props.a because it is parsed a TSQualifiedName instead of a memberExpression.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 93.66%. Comparing base (1f95a24) to head (1a1eb4b).

Files with missing lines Patch % Lines
lib/rules/destructuring-assignment.js 12.50% 14 Missing :warning:
Additional details and impacted files ```diff @@ 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 ``` | [Flag](https://app.codecov.io/gh/jsx-eslint/eslint-plugin-react/pull/3835/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jsx-eslint) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/jsx-eslint/eslint-plugin-react/pull/3835/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jsx-eslint) | `93.66% <12.50%> (-4.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jsx-eslint#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.