|
|
@@ -15,22 +15,42 @@
|
|
|
"airbnb-base"
|
|
|
],
|
|
|
"rules": {
|
|
|
+ "import/prefer-default-export": "off",
|
|
|
+ "no-use-before-define": "off",
|
|
|
"no-console": 0, // 禁用打印
|
|
|
- "comma-dangle": [ 2, "never" ], // 禁止使用拖尾逗号
|
|
|
+ "comma-dangle": [
|
|
|
+ 2,
|
|
|
+ "never"
|
|
|
+ ], // 禁止使用拖尾逗号
|
|
|
"no-extra-semi": 2, // 禁止不必要的分号
|
|
|
- "array-bracket-spacing": [ 2, "always" ], // 指定数组的元素之间要以空格隔开
|
|
|
+ "array-bracket-spacing": [
|
|
|
+ 2,
|
|
|
+ "always"
|
|
|
+ ], // 指定数组的元素之间要以空格隔开
|
|
|
"jsx-quotes": 0, // 强制使用单引号
|
|
|
"max-len": 0, // 强制一行的最大长度
|
|
|
- "semi": [ 2, "never" ], // 禁止使用分号
|
|
|
- "no-unused-vars": 1,
|
|
|
+ "semi": [
|
|
|
+ 2,
|
|
|
+ "never"
|
|
|
+ ], // 禁止使用分号
|
|
|
+ "no-unused-vars": 0,
|
|
|
"no-unneeded-ternary": 2, // 禁止不必要的嵌套 var isYes = answer === 1 ? true : false;
|
|
|
"no-unreachable": 2, // 不能有无法执行的代码
|
|
|
"no-unused-expressions": 1, // 禁止无用的表达式
|
|
|
- "linebreak-style": [ 0, "error", "windows" ],
|
|
|
+ "linebreak-style": [
|
|
|
+ 0,
|
|
|
+ "error",
|
|
|
+ "windows"
|
|
|
+ ],
|
|
|
"import/no-unresolved": 0,
|
|
|
"import/extensions": 0,
|
|
|
"import/no-absolute-path": 0,
|
|
|
- "import/no-extraneous-dependencies": 2,
|
|
|
+ "import/no-extraneous-dependencies": [
|
|
|
+ "error",
|
|
|
+ {
|
|
|
+ "devDependencies": true
|
|
|
+ }
|
|
|
+ ],
|
|
|
"class-methods-use-this": 0,
|
|
|
"no-mixed-operators": 0,
|
|
|
"eol-last": 0,
|
|
|
@@ -55,12 +75,17 @@
|
|
|
"no-sparse-arrays": 0,
|
|
|
"no-nested-ternary": 0,
|
|
|
"no-continue": 0,
|
|
|
- "complexity": [ 2, 9 ],
|
|
|
+ "complexity": 0,
|
|
|
"no-return-await": 0,
|
|
|
"max-classes-per-file": 0,
|
|
|
- "consistent-return" : 0,
|
|
|
+ "consistent-return": 0,
|
|
|
"no-shadow": 0,
|
|
|
- "no-undef":0,
|
|
|
- "no-throw-literal":0
|
|
|
+ "no-undef": 0,
|
|
|
+ "no-throw-literal": 0,
|
|
|
+ "no-loss-of-precision": 0,
|
|
|
+ "no-prototype-builtins": 0,
|
|
|
+ "no-fallthrough": 0,
|
|
|
+ "no-case-declarations": 0,
|
|
|
+ "no-cond-assign": 0
|
|
|
}
|
|
|
}
|