我正在尝试让 ESLint 在 WebStorm IDE 中工作。我正在提供我的配置文件和错误。
错误
错误:/usr/local/lib/node_modules/eslint-config-airbnb/rules/react.js:规则“react/jsx-boolean-value”的配置无效:值“never,[object Object]”不应该有超过 1 项。引用自:/usr/local/lib/node_modules/eslint-config-airbnb/index.js 引用自:/Users/xxx/WebstormProjects/xx-xx-ui/xx/code/.eslintrc.js at validateRuleOptions (/usr /local/lib/node_modules/eslint/lib/config/config-validator.js:113:15)
.eslintrc.js
module.exports = {
"extends": "airbnb",
"rules": {
"import/extensions": 1,
"import/first": 1,
"import/prefer-default-export": 1,
"max-len": 1,
"no-case-declarations": 1,
"no-console": 1,
"no-empty": 0,
"no-fallthrough": 1,
"no-mixed-spaces-and-tabs": 1,
"no-param-reassign": 0,
"no-tabs": 1,
"no-undef": 0,
"no-unused-vars": 1,
"one-var": 1,
"prefer-const": 1,
}
};
包.json
这些是开发依赖项
"eslint-config-airbnb": "^15.1.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.4.0",