如何在 Visual Studio 代码 RC5 中禁用 Ecmascript 6 linting 警告?

How to disable Ecmascript 6 linting warnings in Visual Studio Code RC5?

我知道这仍然是一个候选发布版本,所以这个功能可能还不存在,但在默认设置中有一个设置:

// Specifies which version of ECMA-Script is used.
"javascript.validate.target": "ES5"

我尝试通过输入以下内容在用户设置中覆盖它:

"javascript.validate.target": "ES6"

但这没有用。有人成功过吗?

VSCode 中的 JavaScript 语言服务尚不支持 ES6。

You can vote for it,不过!

现在这在 jshint options 中处理,因此您应该将 jshint.options.esversion 设置为 6