Comments on: Atom Error: ‘Const’ is available in ES6 (use ‘esversion: 6’) https://trevorelwell.me/atom-error-const-is-available-in-es6-use-esversion-6/ Tue, 19 Mar 2019 23:29:46 +0000 hourly 1 https://wordpress.org/?v=6.4.3 By: Ivelin Tenev https://trevorelwell.me/atom-error-const-is-available-in-es6-use-esversion-6/#comment-1372 Sat, 09 Feb 2019 19:21:00 +0000 http://trevorelwell.me/?p=726#comment-1372 In reply to Prasad.

You may be breaking the JSON structure, expected by jshint. Try putting a single line:
“esversion”: 6,
note the comma at the end, between smarttabs and globals.

Also, creating the .jshintrc file in an user’s home directory enables it for all projects by that user.

Cheers!

]]>
By: Prasad https://trevorelwell.me/atom-error-const-is-available-in-es6-use-esversion-6/#comment-1139 Thu, 31 May 2018 06:13:54 +0000 http://trevorelwell.me/?p=726#comment-1139 In reply to telwell.

I already have a .jshintrc file. Its contents are as follows
{
“curly”: true,
“eqeqeq”: true,
“immed”: true,
“latedef”: true,
“newcap”: true,
“noarg”: true,
“sub”: true,
“undef”: true,
“boss”: true,
“eqnull”: true,
“browser”: true,
“smarttabs”: true,
“globals”: {
“jQuery”: true,
“angular”: true,
“console”: true,
“$”: true,
“_”: true,
“moment”: true,
“describe”: true,
“beforeEach”: true,
“module”: true,
“inject”: true,
“it”: true,
“expect”: true,
“xdescribe”: true,
“xit”: true,
“spyOn”: true
}
}

When i try to add
{
“esversion”: 6
}, it still gives me an error

]]>
By: telwell https://trevorelwell.me/atom-error-const-is-available-in-es6-use-esversion-6/#comment-228 Thu, 13 Oct 2016 14:00:04 +0000 http://trevorelwell.me/?p=726#comment-228 In reply to Shailesh.

Great point Shailesh! Ya, the filename is just .jshintrc . Files beginning with a dot are hidden files and can be used to help configure things (there’s also .gitignore, .babelrc, .bashrc, etc.) Fun fact: the ‘rc’ at the end seems to stand for ‘runcom’ or ‘run commands’ (http://unix.stackexchange.com/questions/3467/what-does-rc-in-bashrc-stand-for) .

]]>
By: Shailesh https://trevorelwell.me/atom-error-const-is-available-in-es6-use-esversion-6/#comment-227 Thu, 13 Oct 2016 05:48:46 +0000 http://trevorelwell.me/?p=726#comment-227 Thanks. That was helpful.
One thing I would like you to add in the article is to mention how to create a .jshintrc file. I thought it was an extension (like .json) and so I created es6.jshintrc and as expected that didn’t work. After fiddling a little, I created a simple .jshintrc file and that worked. It would be helpful for novice programmers like me.

]]>