我刚刚向Travis CI添加了npm run standard
。我收到了这个错误。
> 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 :(得分:0)
您可能拥有旧版本的ESLint。配置使用的一些选项是added recently,并且首先在ESLint v3.8.0中可用。标准本身需要eslint@~3.19.0
。希望升级您的ESLint版本,将使该错误消失!