Visual Studio Code - NEW FEATURES: 4 Language Improvements (JavaScript, TypeScript, JSX, & TSX)

The 0.10.5 December release features a plethora of improvements, including...

ES6 is the new default

We have made ES6 the default for JavaScript files. This means you don't need to create jsconfig.jsonfiles to enable new syntax and by default you get suggestions for ES6-types, like PromiseSetMap,String.startsWith and much more. Thanks to a community contribution.

At the same time, the grammar used to colorize JavaScript was also updated to support the ES6 syntax.

TypeScript Update

The TypeScript language service was updated to version 1.7.5.

JSX Support

To improve the JavaScript and JSX support, the plan is to adopt Salsa. There is good progress on the Salsa project, but until VS Code has switched over to Salsa, we can only offer a workaround for using VS Code with JSX.

  • Install the vscode-eslint extension and configure JSX support. This will provide you with validation in JSX files.
 { "ecmaFeatures": { "jsx": true, ... } ... } 
  • If you are using React constructs inside .js files then you can install the js-is-jsx extensionwhich changes the file mapping so that .js files are treated as .jsx files. Be aware that if you install this extension, you lose the existing language support for .js files.

The grammars used to colorize JS and JSX are now aligned.

Emmet

Emmet is now supported in JSX and TSX files.

 

 

Check out all the new features and update to Visual Studio Code v0.10.6:

https://code.visualstudio.com/updates

 

Have a good bye!

- Ninja Ed