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

[Fix]: Does not validate for LogicalExpression #2533

Merged

Conversation

toshi-toma
Copy link
Contributor

Fixes #2526.

const returnsConditionalJSX = strict ?
(returnsConditionalJSXConsequent && returnsConditionalJSXAlternate) :
(returnsConditionalJSXConsequent || returnsConditionalJSXAlternate);
return strict ?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think strict property not used. So, I should probably remove strict property from isReturningJSXOrNull.

@toshi-toma toshi-toma changed the title [Fix]: Does not validate missing propTypes for LogicalExpression [Fix]: Does not validate for LogicalExpression Dec 25, 2019
lib/util/Components.js Outdated Show resolved Hide resolved
@ljharb ljharb force-pushed the fix-prop-types-with-logicalExpression branch 2 times, most recently from 6eab9e1 to f02e8ae Compare December 26, 2019 22:46
@ljharb ljharb merged commit f02e8ae into jsx-eslint:master Dec 26, 2019
@toshi-toma
Copy link
Contributor Author

Thanks!!

@toshi-toma toshi-toma deleted the fix-prop-types-with-logicalExpression branch December 27, 2019 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

react/prop-types does not validate missing propTypes for functions in version 7.17.0
2 participants