Parsing error: Unexpected token =
当我尝试整理Es6类时,ESLint引发错误。我缺少在eslint中启用胖箭头类方法的配置参数吗?
范例类别:
class App extends React.Component{
...
handleClick = (evt) => {
...
}
}
.eslint
{
"ecmaFeatures": {
"jsx": true,
"modules":true,
"arrowFunctions":true,
"classes":true,
"spread":true,
},
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"strict": 0,
"no-underscore-dangle": 0,
"quotes": [
2,
"single"
],
}
}
arrowFunctions
你已经包括应覆盖它。这可能是不受支持的情况,错误或违反约定的样式