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

Framework: Add missing JSX rules for eslint #1779

Merged
merged 1 commit into from
Dec 18, 2015
Merged

Conversation

sirbrillig
Copy link
Member

  • react/jsx-no-undef: Disallow undeclared variables in JSX
  • react/react-in-jsx-scope: Prevent missing React when using JSX

Testing

Edit a JSX file that has no eslint errors and make some changes to see errors appear:

  1. Remove the import (or require) line that imports a component.
  2. If there is a file that doesn't use React.createClass, but does render JSX code, remove the import (or require) line that imports React.

@sirbrillig sirbrillig added Framework [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 17, 2015
@sirbrillig sirbrillig self-assigned this Dec 17, 2015
* react/jsx-uses-vars: Prevent variables used in JSX to be incorrectly marked as unused
* react/jsx-no-undef: Disallow undeclared variables in JSX
* react/react-in-jsx-scope: Prevent missing React when using JSX
@blowery
Copy link
Contributor

blowery commented Dec 18, 2015

dare i check to see how much this added to the eslint report... :)

@blowery
Copy link
Contributor

blowery commented Dec 18, 2015

looks like it didn't find anything new, we're still at 14,173 warnings. 🎉

@blowery
Copy link
Contributor

blowery commented Dec 18, 2015

ship it, looks good!

@blowery blowery added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 18, 2015
@sirbrillig
Copy link
Member Author

looks like it didn't find anything new

😄 I'm glad to hear it, since anything this found would be a JS syntax error.

Will merge tomorrow.

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

Successfully merging this pull request may close these issues.

3 participants