-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Possible regression on variables defined as props #2330
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
The problem seems to that this plugin do not recognize "indexer property" in flow types. // This will pass
type Props = { a: { b: string } };
export function Bar(props: Props) {
return <>{props.a.b}</>;
}
// This will warn
type Props = { a: { [string]: string } };
export function Bar(props: Props) {
return <>{props.a.b}</>;
~ // 'a.b' is missing in props validationeslint(react/prop-types)
}
|
This was referenced Sep 22, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure it's the right place to open the issue because it's also kinda related to eslint-plugin-flowtype. After bisecting it seems that the
react/prop-types
rule has a regression introduced since #2301 when used with Flowtype.example better than a long explanation:
before #2301:
No errors
after #2301:
@golopot does it rings a bell on your side? Would totally understand if the issue is irrelevant and is not in the scope of eslint-plugin-react.
Have a good day
The text was updated successfully, but these errors were encountered: