News for hackers. Stuff that matters.
Re:Overview of JavaScript ES6 features by pauljaworski on Monday October 24, 2016 @11:57AM (#12779965)
This is what makes Eslint so great. If you extend Airbnb's (or write your own very strict) config, it will really enforce best practices for things like this.

I think running eslint --fix will even change your "let"s to "const"s where appropriate, but don't quote me on that.

Re:Overview of JavaScript ES6 features by rkwz on Monday October 24, 2016 @03:21PM (#12781951)
>I think running eslint --fix will even change your "let"s to "const"s where appropriate, but don't quote me on that.

Yep, this is the relevant rule - http://eslint.org/docs/rules/no-var

Though it just replaces all var with let. I expected it to intelligently use either const or let depending on how the variable is used ¯\_(ツ)_/¯

Re:Overview of JavaScript ES6 features by Zirro on Monday October 24, 2016 @07:23PM (#12783818)
You're looking for: http://eslint.org/docs/rules/prefer-const

It does exactly what you describe :)

Re:Overview of JavaScript ES6 features by btdiehr on Monday October 24, 2016 @01:39PM (#12780982)
--fix is a godsend.