我在配置eslint的时候出现了如下错误:
ERROR in ./src/index.js
Module build failed: Error: ESLint configuration in /home/suwu150/WebStormProject/electron-desktop-tools/.eslintrc is invalid:
- Unexpected top-level property "comma-dangle".
at validateConfigSchema (/home/suwu150/WebStormProject/electron-desktop-tools/node_modules/eslint/lib/config/config-validator.js:214:15)
at Object.validate (/home/suwu150/WebStormProject/electron-desktop-tools/node_modules/eslint/lib/config/config-validator.js:231:5)
.eslintrc文件
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"semi": 2
},
"comma-dangle": [1,"always-multiline"],
"plugins": ["react"],
"extends": "airbnb"
}