【问题标题】:Brackets ESLint errors. JS括号 ESLint 错误。 JS
【发布时间】:2019-01-04 20:56:32
【问题描述】:

当我在括号中编写代码时,我看到红色错误。它们对结果没有影响,但我怎样才能避免它们呢?

【问题讨论】:

标签: javascript eslint


【解决方案1】:

您需要在 ES Lint 配置文件中将 es6 环境设置为 true 或将 ecmaVersion 设置为 6。

http://eslint.org/docs/user-guide/configuring#specifying-parser-options

{
    "parserOptions": {
            "ecmaVersion": 6
    }
}

【讨论】:

    【解决方案2】:

    我研究过类似的问题,但是在项目根文件夹中创建一个 json 文件解决了我的问题。请点击链接 solution here

    我还找到了其他可能的方法来解决这个问题,阅读这些链接你会知道和理解 experience of other person with solution

    还可以访问括号.json 文件中提供的链接。 他们清楚地提到了如何使用括号首选项。brackets preferences

    【讨论】:

      猜你喜欢
      • 2018-12-06
      • 1970-01-01
      • 2020-06-06
      • 2019-01-09
      • 2019-07-31
      • 1970-01-01
      • 2019-11-07
      • 1970-01-01
      • 2019-02-13
      相关资源
      最近更新 更多