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

added jsx-uses-react rule #20

Merged
merged 1 commit into from
Apr 20, 2017
Merged

added jsx-uses-react rule #20

merged 1 commit into from
Apr 20, 2017

Conversation

lukeschunk
Copy link
Collaborator

Adds this rule https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md

Which will allow us to write pure functional components without directly referencing React in the file.

@paniclater
Copy link
Collaborator

Shouldn't every pure functional component reference React to leverage prop types?

@lukeschunk
Copy link
Collaborator Author

lukeschunk commented Apr 20, 2017

@paniclater for now, yes, but this change will be necessary to upgrade to the latest version of react in which PropTypes is its own package, and you don't refeference it off of React anymore

edit we also have this rule https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md to check to make sure we're doing props validation, if that is a concern.

@paniclater
Copy link
Collaborator

:shipit:

@lukeschunk lukeschunk merged commit 193d11b into master Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants