-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: react/prop-types fails to parse destructured Flow typing with Flow union type #1364
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
Labels
Comments
@pfarejowicz FYI |
Hi @LINKIWI - I have opened a PR for this. Could you test it out on your code and see if it works for you? |
This was referenced Sep 22, 2018
This was referenced Oct 25, 2018
1 task
1 task
1 task
This was referenced Jan 2, 2019
This was referenced Sep 9, 2024
1 task
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symptom:
react/prop-types
indicates that props validation is missing for all props in the component.This occurs whenever there is a destructured Flow typing anywhere in the component, and props are typed in the component using a union
&
. This is reproducible on v7.2.0 and earlier. Minimally reproducible example:The reported errors are:
No ESLint errors are generated if
value
is not Flow-typed in the destructure:Further, no errors are generated if the destructure typing is preserved, but the union typing is removed in favor of a single object:
The text was updated successfully, but these errors were encountered: