Skip to content
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] prop-types: fix false positives on renames in object destructuring #3142

Merged
merged 1 commit into from Nov 18, 2021

Conversation

golopot
Copy link
Contributor

@golopot golopot commented Nov 17, 2021

Fixes #2944.

const { styles: x } = props;

Our code incorrectly picks up styles as a prop, while x is the correct one.

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2021

Codecov Report

Merging #3142 (8f00023) into master (0132c47) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3142   +/-   ##
=======================================
  Coverage   97.49%   97.49%           
=======================================
  Files         119      119           
  Lines        8072     8072           
  Branches     2876     2876           
=======================================
  Hits         7870     7870           
  Misses        202      202           
Impacted Files Coverage Δ
lib/util/usedPropTypes.js 97.75% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0132c47...8f00023. Read the comment docs.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems great!

@ljharb ljharb merged commit 8f00023 into jsx-eslint:master Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[react/prop-types] false positive when renaming in destructuring context
3 participants