-
- Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
Test case -
If a function is of the form
() => { return <some_jsx />; }
the prop-types rule is checked as expected.
But if the function is of the form
() => { const returnValue = <some_jsx />; return returnValue; }
it seems the the prop-types rule is not checked and no lint errors are thrown if there are no propType validations.
Possible reason - Referring to this comment, I think the plugin identifies a function as a React component if it returns some JSX. In the case above, the plugin somehow fails to identify it as returning some JSX.