2017-05-24 173 views
1

我剛剛將npm run standard添加到Travis CI。我收到這個錯誤。Travis CI中的Standard.js「規則配置」逗號「無效」

> standard 
standard: Unexpected linter output: 
Error: standard: 
    Configuration for rule "comma-dangle" is invalid: 
    Value "[object Object]" must be an enum value. 
Referenced from: /home/travis/build/project/node_modules/standard/eslintrc.json 
    at validateRuleOptions (/home/travis/build/project/node_modules/eslint/lib/config/config-validator.js:116:15) 
    at /home/travis/build/project/node_modules/eslint/lib/config/config-validator.js:163:13 
    at Array.forEach (native) 
    at Object.validate (/home/travis/build/project/node_modules/eslint/lib/config/config-validator.js:162:35) 
    at load (/home/travis/build/project/node_modules/eslint/lib/config/config-file.js:518:19) 
    at /home/travis/build/project/node_modules/eslint/lib/config/config-file.js:386:36 
    at Array.reduceRight (native) 
    at applyExtends (/home/travis/build/project/node_modules/eslint/lib/config/config-file.js:363:28) 
    at Object.load (/home/travis/build/project/node_modules/eslint/lib/config/config-file.js:525:22) 
    at loadConfig (/home/travis/build/project/node_modules/eslint/lib/config.js:64:33) 
If you think this is a bug in `standard`, open an issue: https://github.com/feross/standard/issues 

在項目本身它並沒有包含太多的這個文件。

https://github.com/feross/standard/blob/master/eslintrc.json

+0

可以請你分享擴展配置文件的鏈接?我只想驗證'comma-dangle'規則定義 – Gyandeep

+0

它可能是這個嗎? https://github.com/feross/eslint-config-standard/blob/master/eslintrc.json#L35-L41 – ThomasReggi

+0

此處添加問題https://github.com/feross/standard/issues/895 – ThomasReggi

回答