1

In IBM DevOps Services, there is web editor (Orion base). Looks like the ecmaScript parser by ESLint is version 5 by default. Is it possible to use version 6 ? The following did not work.

/*eslint-env es6*/

I checked JavaScript configuration, but does not have it. The problem I have is WebIDE gives me errors on "class".

class Hoge {}

Shows error in the editor.

Thanks !

ralphearle
  • 1,696
  • 13
  • 18
ibmamnt
  • 129
  • 8

1 Answers1

2

It is possible to specify ECMA 6, but it requires the use of a .tern-project configuration file at the root of your project.

For example:

MyProject
   .tern-project

Inside the file you, can specify a bunch of things (all of which are mentioned here), but the ones to set the ECMA level are ecmaVersion and libs.

So to set ECMA 6, your .tern-project file would look something like:

{
    "libs": ["ecma5", "ecma6"],
    "ecmaVersion": 6
}

At the moment though, the Orion editor is not 100% ECMA 6 compliant, so even though you can turn on the features, they might not all work.

The work to complete ECMA 6 compliance is taking place in Orion bug 460728.

mrennie
  • 21
  • 1