-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Major Patch: ES6-Babel-6-Full-Dependencies-Upgrade #111
Major Patch: ES6-Babel-6-Full-Dependencies-Upgrade #111
Conversation
…en upgraded to 6 along with structural changes necessary -All Dependencies but hapi have been updated to most recent versions -lint has been modified to utilize babel -unnecessary modules have been removed -linting + deployment operational
this looks awesome! great work @bartekus 🎉 just please don't add |
This is great! Thanks for taking this on! A few quick notes. Please use .js for both normal js and jsx code. Also I noticed you removed
|
Oh also on ESLint, please restore the Airbnb eslint config as the default.
|
Oh I guess things were already jsx :-) I've stopped doing that in my personal projects so forgot that's what we're doing here. |
also I would use |
Also perhaps leave the react router upgrade for a separate PR. There's a number of API changes to the router that will require the algorithm in create-routes to change. Let's get the coffeescript conversion done and then work on upgrades. |
👍🏻 to transform-hmr upgrade. Also add in redbox. But let's do these in stages. Finish Babel upgrade/conversion then add new features. |
@KyleAMathews it will probably be good to create a new issue with the upgrade roadmap |
Note: throwing this as an example, something to look at, while upgrading for the react transform and redbox you can have a look at the https://github.com/FormidableLabs/spectacle repo, we've done the upgrade there, and here are the changes required for the Babel6 upgrade https://github.com/FormidableLabs/spectacle/pull/131/files |
Or wait, which upgrade are we talking about now @knowbody? :-) Babel now? |
also I think React Router 2.0 is coming out soon 💃 |
@KyleAMathews the spectacle example I've just sent is RE: react-transform upgrade and Babel 6 |
👍🏻 |
@KyleAMathews remix-run/react-router#2646 I haven't been around the router for a while but seems pretty close :) |
I think the upgrade to 2.x will be much easier than to 1.x so no need to delay upgrading to 1.x even if 2.x is close. |
Yes, 2.0 should be soon. And the upgrade should be more incremental than 1.0. It's mostly the history singletons and location descriptors, but should be backwards compatible until the next release. |
My apologies gentlemen, I had to step out for a second... Anyway, I'm ok with doing incremental patches vs this blob, so breaking it all up into a more compartmental aspects is all fine by me As to the .es6 format, since it was replacing .coffee it was a major change and I wanted to bring attention to that. However I do agree with uniform standard of .js across the project for clarity and ease of understanding. |
👍🏻 |
Changing extensions along with lint does induce a little bit of errors to fix so it will take some time while I'm sorting that out. |
…s will need to be rewritten for this to be on] -all jsx/es6 extension are now js -general cleanup as per lint requrement -react-router has been rolled back to it's previous version -lint with 3 warnings
So I've modified few things:
|
I'm now looking at resolving the error when trying to access http://0.0.0.0:8000/ after gatsby develop and once I'm done with that the babel-6 upgrade will be opperational and I'll be moving to react-transform-hmr upgrade as per our discussion. |
@@ -1,4 +1,6 @@ | |||
import React, {PropTypes} from 'react' | |||
'use strict' |
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.
why all the 'use strict'? My understanding is Babel adds those automatically.
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.
You are most likely correct and being that I wasn't certain I decided to enforce it across the whole project. I'll reverse this change however given that it doesn't make much sense now.
@bartekus plan sounds great! Also I think this is what you meant but to be sure, please make the hot-module transform upgrade a separate PR to make it simpler to review and merge this PR. Thanks for your effort! |
"no-loop-func": 0, | ||
"quotes": [2, "single"], | ||
"strict": [2, "never"], | ||
"react/jsx-uses-react": 2, |
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.
These are redundant as they're already set in the airbnb eslint config https://github.com/airbnb/javascript/blob/fbf81eba3a02ef2dc4c92b0d98f93a4bad99869d/packages/eslint-config-airbnb/rules/react.js#L70
Only add rules here if we need to override eslint defaults or rules we inherit from airbnb.
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.
Got it, I'll remove
"quotes": [2, "single"],
"strict": [2, "never"],
"react/jsx-uses-react": 2,
However, I'll keep "no-loop-func": 0, until glob-pages.js is modified to support this requirement.
What's the status of this PR? Would be cool to see it landed 👍 |
Looks like @KyleAMathews has been doing bits of it himself. Namely, the switch from CS to JS. |
Yeah WIP but should have upgrades done plus new release done by this
|
Closing this as the work is mostly done except for the Babel 6 upgrade. I worked on that for a while but couldn't get around a weird source-map bug. I file an issue next week sometime w/ steps for reproducing. Thanks again @bartekus for all your work here! |
-CoffeeScript has been replaced with ES6
-Babel 5 has been upgraded to 6 along with structural changes necessary
-All Dependencies but hapi have been updated to most recent versions
-lint has been modified to utilize babel
-unnecessary modules have been removed
-modified package.json enabling 'npm start' to execute "./scripts/prepublish.sh && npm list"
-linting + deployment operational
Currently the default starter needs to be modified to be operational:
-Adding dev-dependencies: babel-preset-es2015 & babel-preset-react
-Modify .babelrc -> { "presets": ["es2015", "react"] }
-Modify _template.jsx :
Work-In-Progress:
-Error when trying to access http://0.0.0.0:8000/ after gatsby develop: