We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
prop-types
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
The prop-types rule reports false-positives when we upgraded from version 7.12.0 to 7.13.0. I believe this is related to #2241 and Flow.
7.12.0
7.13.0
type Props = {| _value?: number |}; function App({ _value = defaultValue }: Props = {}) { ... }
error '_value' is missing in props validation react/prop-types
No error.
It worked until 7.12.0 but it fails with 7.13.0.
I created a demo project to reproduce the bug: https://github.com/willdurand/eslint-issue-prop-types.
The text was updated successfully, but these errors were encountered:
I think the issue is that you've defaulted the props arg to {}, for no reason I can see - props are unconditionally provided to react components.
{}
What happens if you remove = {}?
= {}
Sorry, something went wrong.
8db631b
Thank you for the demo project, it was very helpful.
It should be fixed in next release 🙂
yannickcr
No branches or pull requests
The
prop-types
rule reports false-positives when we upgraded from version7.12.0
to7.13.0
. I believe this is related to #2241 and Flow.Example
What happened?
What did you expect to happen?
No error.
Other information
It worked until
7.12.0
but it fails with7.13.0
.I created a demo project to reproduce the bug: https://github.com/willdurand/eslint-issue-prop-types.
The text was updated successfully, but these errors were encountered: