简体   繁体   中英

Eslint Configuration for rule “quotes” is invalid:

Just trying to set up my site with https://codeclimate.com but getting error when it hits my eslint config settings. Getting an error on my quotes rule which is

"quotes": [2,"single",
      {
        "avoidEscape": true
      }
]

But keep getting the error

Error: /code/.eslintrc:
    Configuration for rule "quotes" is invalid:
    Value "[object Object]" must be an enum value.

Eslint is version 3.14.0

Any idea what is wrong with the rule ?

Edit to show my versions :

"eslint": "3.15.0",
"eslint-loader": "1.6.1",
"eslint-plugin-import": "2.2.0",

我今天遇到了同样的问题,我使用了旧版本的gulp-eslint软件包(1.1.1)

CodeClimate uses their own version of ESLint, and not the one specified as a dependency in your package. Here's a link to the documentation that lists version of ESLint that CodeClimate uses: https://docs.codeclimate.com/docs/eslint

You have to configure ESLint rules to the version that CodeClimate is running, otherwise you are going to get notification about incorrect configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM