Skip to content

Conversation

@5minpause
Copy link
Contributor

Since you use ES2017 the variable declarations should be made using let and const instead of var. Also in the webpack configuration files and in the react-files there were semicolons missing from the end of the lines. I do not know whether this was intentional.
Since it is marked as a warning when using the AirBNB ESlint configuration (which is widely used), I added these.

Let me know what you think.

@5minpause 5minpause changed the title 5minpause es6 variables and style changes es6 variables and style changes Feb 24, 2017
@dhh
Copy link
Member

dhh commented Feb 24, 2017

Omitting semicolons is intentional, but we should indeed use const. If you want to pare down the PR for just that change, I can merge 👍. Thanks!

@5minpause 5minpause force-pushed the 5minpause-es6-variables branch from f1dd2b6 to a2c7e35 Compare February 24, 2017 13:08
@5minpause
Copy link
Contributor Author

Great, I removed the commit that added the semicolons.
Would you mind explaining the rationale behind your intentions regarding semicolons?

@dhh dhh merged commit 028d8dd into rails:master Feb 24, 2017
@dhh
Copy link
Member

dhh commented Feb 24, 2017

Awesome, thanks! Omitting semicolons for aesthetics. None of the ES6 code I personally write has semicolons, unless I explicitly need to disambiguate something.

@5minpause 5minpause deleted the 5minpause-es6-variables branch February 24, 2017 13:26
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.

2 participants