Skip to content
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

no-unused-prop-types does not process intersection flow types #1323

Closed
willmruzek opened this issue Jul 27, 2017 · 1 comment
Closed

no-unused-prop-types does not process intersection flow types #1323

willmruzek opened this issue Jul 27, 2017 · 1 comment

Comments

@willmruzek
Copy link

no-unused-prop-types does not currently flag unused PropTypes in flow intersection types.

In this case, it should be flagging age.

type AProps = {
  name: string;
  age: number;
};

type BProps = {
  greeting: string;
};

type Props = AProps & BProps;

class Hello extends React.Component {
  props: Props;

  render () {
    return <div>{this.props.greeting}, {this.props.name}</div>;
  }
}
@willmruzek
Copy link
Author

Looks like this is being addressed in #1404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants