Using tern with babel

The server crashes on spread operators, and doesn’t recognize object shorthand, such as {foo}. In the latter case ‘foo’ is not treated as a symbol that can be resolved (not sure if this is due to tern or tern_for_vim).

Is there any good way to use tern with babel? I don’t see any sourcemap references in the docs, so I’m guessing ‘no’.

Are there any third-party plugins that will handle the missing syntax?

Which version of Tern are you using? Recent releases should support ES6 just fine, and in fact I’ve been using it on ES6 for months, without any crashes, and with great support for object shorthands.


“version”: “0.18.0”


“version”: “0.5.0”,

Investigating further, the crash is not on spread operator, but on destructuring arrays with ignored leading elements, like

([, b]) => foo(b)

That I can reproduce. This patch should help.