Jshint: Complaining about arrow functions even with "esversion": "6"

Created on 23 Jun 2016  ·  7Comments  ·  Source: jshint/jshint

I'm using this:

Atom 1.7.3
linter 1.11.11
linter-jshint 2.1.0

My .jshintrc file only contains "esversion": "6" and it is located one level up my project's folder. I'm still getting the following message:

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6')

Ideas?

Most helpful comment

I believe the problem here is that the value of "esversion" must be a number, not a string. Can you change your .jshintrc file for read as follows, and let us know if that fixes the problem for you?

{
  "esversion": 6
}

All 7 comments

.jshint or .jshintrc?

.jshintrc. Sorry for that...

I believe the problem here is that the value of "esversion" must be a number, not a string. Can you change your .jshintrc file for read as follows, and let us know if that fixes the problem for you?

{
  "esversion": 6
}

Thanks @jugglinmike , that did the trick...

Glad to hear it!

For the record, I do not consider this a satisfactory state of affairs. JSHint should issue an error for invalid input, but also accept equivalent String values. I'm going to leave this issue "closed" because we already have one to track this problem: gh-2902.

Hound CI Error 'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6'). I am using eslintrc

Did you mean .jshintrc? And can you reproduce the error on your PC or only on HoundCI?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sriram-Ramaswami picture Sriram-Ramaswami  ·  5Comments

nzakas picture nzakas  ·  10Comments

derekdata picture derekdata  ·  11Comments

stefanuddenberg picture stefanuddenberg  ·  7Comments

NemoStein picture NemoStein  ·  7Comments