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

[New]: prop-types: handle nested destructuring #2300

Merged
merged 1 commit into from Jun 6, 2019

Conversation

golopot
Copy link
Contributor

@golopot golopot commented Jun 5, 2019

Fixes #1422. Fixes #296.

This commit fixes cases like const {a: {b}} = this.props;. Nested destructuring are now marked as used recursively.

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.

Can we add some test cases for where the outer prop name is in props validation, but the inner one is not?

@ljharb ljharb merged commit 7d036cf into jsx-eslint:master Jun 6, 2019
@golopot golopot deleted the nested-d branch June 6, 2019 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

prop-types fails with destructuring prop-types does mark nested destructured props as being used
2 participants