有没有办法在 vscode 中打开 ES6/ES7 语法支持? [英] Is there a way to turn on ES6/ES7 syntax support in vscode?

查看:75
本文介绍了有没有办法在 vscode 中打开 ES6/ES7 语法支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑 3:从 0.4.0 版本开始,可以通过在项目文件夹中添加一个 jsconfig.json 文件来开启 ES6 语法,其内容如下:

<代码>{编译器选项":{目标":ES6"}}

<小时>

编辑 2:您可以 .

另一方面,这里 可以看到有针对 ES6 和 ES7 的功能请求

Edit 3: Starting in version 0.4.0, ES6 syntax can be turned on by adding a jsconfig.json file to the project folder with the following contents:

{
    "compilerOptions": {
        "target": "ES6"
    }
}


Edit 2: You can vote for this feature on user voice


Is there a way to "turn on" ES6/ES7 in Visual Studio Code?

Edit 1

Tried @sarvesh's suggestion- overrode javascript.validate.target and restarted vscode. Didn't help.

解决方案

Currently, the only way to use ES6 and ES7 features is to use Typescript.

On the other hand, here you can see that there is a feature request for ES6 and ES7

这篇关于有没有办法在 vscode 中打开 ES6/ES7 语法支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆