切换到VS代码后出现ESLint错误

时间:2017-12-22 20:50:34

标签: visual-studio-code eslint

我刚刚切换到VS Code并安装了ESLint扩展,我收到以下错误:

[Info  - 15:29:51] ESLint server is running.
[Info  - 15:29:53] ESLint library loaded from: /usr/local/lib/node_modules/eslint/lib/api.js
[Error - 15:29:53] Cannot read config file: /Users/carlosgrijalva/.eslintrc Error: unexpected end of the stream within a flow collection at line 24, column 1:  

不知道这是什么,有人能引导我走向正确的方向吗?

这就是我.eslintrc

中的内容
{
    "extends": "airbnb",
    "env": {
        "browser": true,
        "node": true,
        "jquery": true
},

    "rules": {
    "no-unused-vars": [1,{"argsIgnorePartern": "res|next|~err"}],
    "arrow-body-style": ["error", "as-needed"],
    "no-param-reassign": [2, { "props": false }],
    "no-console": 0,
    "import": 0,
    "func-names": 0,
    "space-before-function-paren": 0,
    "comma-dangle": 0,
    "max-len": 0,
    "no-underscore-dangle": 0,
    "react/prefer-es6-class": 0,
    "radix": 0,
    "arrow-parens": [2, "as-needed"]
}

1 个答案:

答案 0 :(得分:1)

看起来您缺少.eslint文件中的结束括号。尝试在文件末尾添加一个右括号,看看是否有帮助。