Skip to content

Tern & ECMAScript6 support

Angelo edited this page Dec 4, 2015 · 17 revisions

tern provides a support for ES6 with ecma6.json. It uses acorn parser which is able to parse ES6 JavaScript code.

You can play with the online demo to see the Tern ES6 support.

After installing and converting your project as Tern Project, go at Tern project property, click on Tern item and select the ECMAScript 6 version:

Select ECMAScript version

ES6 Features

Here a list of ES6 features:

JSDT Limitation

At first please read https://gist.github.com/vrubezhny/18afdbf1194b59604c7d#file-wtp-jsdt-development-txt

For ES6 support, JSDT have 2 big limitations:

  • Syntax Highlight for ES6.
  • Validator for ES6.

To fix the problem with Validator, you can remove for the moment the JavaScript Nature (JSDT) from your project and use Tern Linters.

Clone this wiki locally