Why does ESLint throw a Parsing error: Unexpected token ,
after a
variable declaration on this line of code?
const a, b, c = 1;
My .eslintrc.json
looks like this;
{
"env": {
"browser": true,
"es6": true,
"jquery": true,
"commonjs": true
},
"extends": [
"airbnb-base",
"prettier"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script"
},
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"semi": ["error", "always"],
"quotes": ["error", "double"]
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…