13
votes

I am playing around with VS 2015 JavaScript/NodeJS IDE and I plan to use ES6 as the language style for JavaScript, however I am noticing that Visual Studio is not recognizing the ES6 (even though I read on various web sites that VS should recognize ES6).

Does anyone know how to make VS 2015 play nice (both in syntax highlighting, intellisense, etc) with ES6?

es6-errors

I also modified the file extension to be .JSX and .ES6 in case that would help VS pick up on it. No luck...

3
Did you already look at stackoverflow.com/q/31544470/218196 ?Felix Kling

3 Answers

8
votes

If you want IntelliSense for ES6 in a nodejs project, then you need to turn on a particular setting.

Open Tools → Options → Text editor → Node.js → IntelliSense and select the ES6 IntelliSense Preview checkbox.

In the December 2015 version of the tools, there is a link to additional notes about the prerequisites, such as having to install TypeScript for Visual Studio 2015 so that ES6 IntelliSense works.

3
votes

@Shawn, in order to enable the Node.js options (and ES6 IntelliSense) you need to install the Visual Studio NodeJS Tools: https://www.visualstudio.com/en-us/features/node-js-vs.aspx

0
votes

Try install TypeScript for Visual Studio 2015 and restart VS2015. https://www.microsoft.com/en-us/download/details.aspx?id=48593

I resolve many problem with this.