Skip to content

Conversation

@rpl
Copy link
Contributor

@rpl rpl commented Jun 18, 2015

This PR introduces a small tweak in the react/display-name and react/prop-types custom eslint rules which adds to the detected React components any class created using the React.createClass helper when there isn't any jsx syntax in the render method.

Adding the above components definition object expressions to the component list is enough to detect missing displayName and propTypes properties as expected.

@rpl
Copy link
Contributor Author

rpl commented Jun 18, 2015

@yannickcr here is a small tweak I'm using to introduce your awesome React-related custom eslint rules on one of the projects I'm working on (which is firebug/rdp-inspector, pull request firebug/rdp-inspector#48) which doesn't use jsx syntaxes in the render method and the React components with missing displayName weren't detected as expected.

This is my first experience on an eslint plugin, let me know if this fix is ok or if it needs any more tweaks.

@yannickcr yannickcr merged commit 1ab838c into jsx-eslint:master Jun 19, 2015
@yannickcr
Copy link
Member

Great! Thanks!

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.

2 participants