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

react/no-unused-prop-types doesn't support destructing (version 7.15.1) #2442

Closed
finom opened this issue Oct 3, 2019 · 1 comment
Closed

Comments

@finom
Copy link

finom commented Oct 3, 2019

I'm getting an error if a property was destructed:

//   X:Y  error  'foo' PropType is defined but prop is never used  react/no-unused-prop-types
const A = ({ foo: { bar } }) => <B bar={bar} />
A.propTypes = { foo: object };

It seems like a bug because I didn't find any information at "Known Issues/Limitations" about that.

@finom finom changed the title react/no-unused-prop-types doesn't support destructing ("eslint-plugin-react": "^7.15.1") react/no-unused-prop-types doesn't support destructing (version 7.15.1) Oct 3, 2019
@ljharb
Copy link
Member

ljharb commented Oct 3, 2019

This was fixed in #2428 but is not yet released.

@ljharb ljharb closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants