I recently upgraded to using the Atom editor to do a majority of my coding. I shied away from it at first because I experienced an error that caused it to eat up all of my memory constantly. Now, months later, they seem to have addressed that issue and it works great! I like it almost as much as Sublime Text now, and feel like I’m going to enjoy it even more soon.
But, as I was progressing through the SurviveJS book recently I found that the JSHint linter I was using didn’t play nice with ES6. Every time I would use something ES6-y like:
My linter would blow up, red all over.
Specifically the error said: “‘const’ is available in ES6 (use ‘esversion: 6’) or Mozilla JS extensions (use moz). (W104)”. Initiating Google-fu yielded unhelpful results. After digging though, here is the fix for this problem.
JSHint has to be configured with a .jshintrc file in the project’s root directory. Simply create a .jshintrc file there with the following object:
Save. Problem solved! Don’t know why this has to be so complicated but hopefully this will save you time going through your Atom package settings uselessly.