-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Update Basic Generator & Linters #624
Conversation
Overlooked rspec. Fixing now. |
HOWEVER. Regarding the linter update... We should make sure the generated code passes the linter. We should NOT mix the lint changes for react on rails with the change to the generator. Reviewed 15 of 15 files at r1. lib/generators/react_on_rails/templates/no_redux/base/client/app/bundles/HelloWorld/startup/registration.jsx.tt, line 8 at r1 (raw file):
missing return node_package/src/serverRenderReactComponent.js, line 29 at r1 (raw file):
I don't know if these will work. Node stuff is not updated to handle this. Comments from Reviewable |
Review status: 14 of 18 files reviewed at latest revision, 2 unresolved discussions. node_package/src/serverRenderReactComponent.js, line 29 at r1 (raw file): Previously, justin808 (Justin Gordon) wrote…> I don't know if these will work. Node stuff is not updated to handle this.Comments from Reviewable |
Please confirm works locally, and travis passes. I might turn on codeship as well. Reviewed 4 of 4 files at r2. Comments from Reviewable |
This reverts commit 8039586.
Reviewed 1 of 20 files at r3. package.json, line 58 at r1 (raw file):
why did you remove this? However, I'd suggest:
Comments from Reviewable |
@Judahmeek I'd like to see us simplify this by taking out some of the options to put in the templates. We should have the index.html.erb refer to "HelloWorldApp" for redux and "HelloWorld" for the simple no-redux. Let's see what @robwise says. Reviewed 8 of 20 files at r3, 11 of 12 files at r4. lib/generators/react_on_rails/react_no_redux_generator.rb, line 20 at r4 (raw file):
I don't think we need the HelloWorldApp if there's no redux. lib/generators/react_on_rails/react_with_redux_generator.rb, line 35 at r4 (raw file):
normally, we prefer string interpolation rather than addition.
lib/generators/react_on_rails/templates/base/base/client/app/bundles/HelloWorld/components/HelloWorld.jsx.tt, line 3 at r4 (raw file):
I've no idea on why we're changing this to use the config[:class_name] I'd rather see the source file called something like Comments from Reviewable |
I see what you're suggesting. I should be able to make those changes pretty quickly. Review status: all files reviewed at latest revision, 4 unresolved discussions. package.json, line 58 at r1 (raw file): Previously, justin808 (Justin Gordon) wrote…
I removed that script and the lint-fix script file because the file encouraged the manual use of jscs, which has been rolled into eslint now making the script & file seem doubly irrelevant. I'll add your suggested changes immediately. lib/generators/react_on_rails/react_no_redux_generator.rb, line 20 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Will fix. lib/generators/react_on_rails/react_with_redux_generator.rb, line 35 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
Will fix. In my defense, most of the other code already here was string addition. I'll go ahead and fix all the other string addition code in the files I've been playing in. lib/generators/react_on_rails/templates/base/base/client/app/bundles/HelloWorld/components/HelloWorld.jsx.tt, line 3 at r4 (raw file): Previously, justin808 (Justin Gordon) wrote…
The reason I made the class name conditional is because the current Comments from Reviewable |
Awesome job @Judahmeek! I'll try this out and merge it! Reviewed 1 of 21 files at r3, 2 of 13 files at r4, 11 of 11 files at r5. Comments from Reviewable |
Thanks @Judahmeek! |
This change is