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

Issue #1724 support for Flow generic PropTypes declaration in require-default-props rule #1733

Merged
merged 3 commits into from
Mar 28, 2018

Conversation

pmizio
Copy link
Contributor

@pmizio pmizio commented Mar 20, 2018

Hi it's my first PR to this repo so if something is wrong please comment me.

Closes #1724.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great! Just one nonblocker comment.

}

function hasPropTypesAsGeneric(node) {
return node.parent && node.parent.type === 'ClassDeclaration';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do node && node.parent here just to be sure it won't crash :-)

@ljharb ljharb added the bug label Mar 21, 2018
@pmizio
Copy link
Contributor Author

pmizio commented Mar 28, 2018

Ok, I added suggested undefined check on node.

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

Successfully merging this pull request may close these issues.

2 participants