答案 0 :(得分:0)
将我的.eslintrc
更改为:
{
"extends": "google",
"parser": "babel-eslint",
"plugins": [
"mocha",
"flowtype"
],
"rules": {
"strict": [
"error",
"never"
],
"comma-dangle": [
"error",
"never"
],
"object-curly-spacing": [
"error",
"always"
],
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false,
"ArrowFunctionExpression": false,
"FunctionExpression": false
}
}
],
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"semi": [
"warn",
"always"
],
"no-console": [
"warn",
{
"allow": [
"debug",
"error"
]
}
],
"max-len": [
"off"
],
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "should"
}
]
},
"env": {
"es6": true,
"node": true
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
}
}
已帮助