Closed
Description
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:
// @flow
import React from "react";
const foo = {
some: "data",
};
type Props = {
derived: { [$Keys<typeof foo>]: string },
};
export function Bar(props: Props) {
const { derived } = props;
return <div className={derived.some}>foo</div>;
}
before #2301: No errors
after #2301:
15:34 error 'derived.some' is missing in props validation react/prop-types
@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