Parsing error: Unexpected token =
当我尝试 lint 我的 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"
],
}
}