-
Notifications
You must be signed in to change notification settings - Fork 685
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
Default pragma #229
Default pragma #229
Conversation
Generated by 🚫 dangerJS |
Updated, but the eslint fails are from the incorrect magento-eslint package. |
- Switched import { Component, createElement } from 'react';) to import React from 'react', { Component }; - Switched import { Fragment, createElement } from 'react';) to import React from 'react', { Fragment }; - Switched import { createElement } from 'react';) to import React from 'react'; - Added `eslint-plugin-react` and updated eslint configuration accordingly Update eslintrc and remove react imports from components which have no jsx Add Component import back to ContainerChild.js chore: Update .babelrc and rm redundant files Switch to correct React import prettify! ❤️ chore: update eslint-config with pcvonz fisx
dc6dd93
to
54930b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @pcvonz, I updated eslint-config and fixed one stray pragma. I'm approving this for merge into the 1.x release, since it's such a large change!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Let's get this merged before too many other things go in.
@pcvonz Thanks for doing the legwork! I've merged the release branch into this and updated the components that didn't exist at the time you submitted this PR.
This PR is a:
[ ] New feature
[ ] Enhancement/Optimization
[x] Refactor
[ ] Bugfix
[ ] Test for existing code
[ ] Documentation
Summary
Switch back to the default pragma in our Babel configuration. More information on why this switch was made originally and why we're moving back are documented here
To sum it up though: We need to add something to our compiler to let it know how to compile JSX. A decision was made to stray away from the standard way. This pull request undoes that and implements the standard way. (Hope that sums it up well)
NOTE: This pull request is tied to this another pull request in
magento-eslint
:magento/magento-eslint#1
Additional information
Fixes #21