Eslint 跳坑
2019-05-13 本文已影响0人
glenlg
1.Expected linebreaks to be 'LF' but found 'CRLF'.eslint(linebreak-style)
在vscode状态栏修改 行末结束符.
- Expected property shorthand.
3.Expected 'this' to be used by class method .
禁用规则.注意引号中不要带空格.
4.Using the export keyword between a decorator and a class is not allowed. Please use export @dec class
instead.
"babel": {
"presets": [
"react-app"
],
"plugins": [
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
},