AtomLinter / linter-jshint

Atom linter plugin for JavaScript, using jshint.
147 stars 36 forks source link

ES6 #202

Closed ghost closed 8 years ago

ghost commented 8 years ago

error message: 'const' is available in ES6 (use 'eversion: 6') or mozilla JS extension

Why isn't the linter using the latest version if JS?

Arcanemagus commented 8 years ago

Where are you seeing that error? If you are seeing it from trying to run the plugin then you are using a very out of date version of Atom.

Arcanemagus commented 8 years ago

Actually, this package still uses Coffee script, so that couldn't have come from the package....

ghost commented 8 years ago

I am using Atom 1.4.3 with the recently installed JSHint a few days ago

the warning message i get:

W104 - 'const' is not available in ES6 (use 'eversion: 6') or Mozilla JS extensions (use moz)

the line of codes: " Anything with const or let will trigger a warning "

const BrowserWindow = electron.BrowserWindow;
let mainWindow;
steelbrain commented 8 years ago

@brody182 Have you set esversion to 6 in your .jshintrc? http://jshint.com/docs/options/#esversion

ghost commented 8 years ago

where is the .jshintrc file? mac OS X

steelbrain commented 8 years ago

You should create one in your project root. There's a lot of tutorial and docs out there about getting started with JSHint, I would recommend you read them.

Closing as not a bug in linter-jshint, feel free to continue the discussion

ghost commented 8 years ago

actually just add this /jshint esversion: 6 /

amandeepmittal commented 8 years ago

configuring .jshintrc in your project with /*jshint esversion: 6 */ might throw exceptions when saving a document in Atom (currently: 1.8.0) since it is not in JSON format. Another way is:

{
  "esversion":6
}
Arcanemagus commented 8 years ago

@amandeepmittal That format is meant for inline configuration, as you show the proper format for .jshintrc files is the JSON method.

amandeepmittal commented 8 years ago

@Arcanemagus meaning that /*jshint esversion: 6 */ should be used in a single .js file instead of .jshintrc file?

Arcanemagus commented 8 years ago

That's what the Configuration section of the JSHint docs say at least 😉.

amandeepmittal commented 8 years ago

@Arcanemagus that's right. I did not look the JSHint docs in depth.

DaveSimmons1234 commented 5 years ago

Can someone explain why this just can't be built into the plugin as a setting? Just curious.

Arcanemagus commented 5 years ago

You should be saving the configuration of your linting tools in the project, so anyone working on them gets the same configuration. The only settings in this wrapper package should be things that can't be configured like that.

This issue was resolved 3 years ago, closing and locking 😉.