-
-
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
prop-types doesn't complain about destructured props in stateless functions #354
Labels
Comments
Yep, this pattern is not actually handled. |
Would love to see this handled, since it's the primary pattern people seem to use for functional stateless components. |
Any progress on this? |
lencioni
added a commit
to lencioni/eslint-plugin-react
that referenced
this issue
Feb 6, 2016
The following should cause an error for missing propType validations, but it doesn't. const Test = ({ name }) => { return ( <div>{name}</div> ); }; If you replace the destructuring with using the props object, it works as expected. This commit fixes this problem. Fixes jsx-eslint#354.
lencioni
added a commit
to lencioni/eslint-plugin-react
that referenced
this issue
Feb 6, 2016
The following should cause an error for missing propType validations, but it doesn't. const Test = ({ name }) => { return ( <div>{name}</div> ); }; If you replace the destructuring with using the props object, it works as expected. This commit fixes this problem. Fixes jsx-eslint#354.
yannickcr
added a commit
that referenced
this issue
Feb 7, 2016
Add support to prop-types for destructing in function signatures (fixes #354)
lencioni
added a commit
to lencioni/eslint-plugin-react
that referenced
this issue
Feb 13, 2016
The following should cause an error for missing propType validations, but it doesn't. const Test = ({ name }) => { return ( <div>{name}</div> ); }; If you replace the destructuring with using the props object, it works as expected. This commit fixes this problem. Fixes jsx-eslint#354.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following should cause an error for missing proptype validations, but it doesn't.
If you replace the destructuring with using the props object, it works as expected.
The text was updated successfully, but these errors were encountered: