@lsby/eslint-config 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +5 -2
- package/dist/esm/index.js +5 -2
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -123,7 +123,7 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
123
123
|
// 禁止使用undefined
|
|
124
124
|
// 因为我们不需要两个空值, 总是使用null会更明确
|
|
125
125
|
// 但js的原生方法返回的都是undefined, 这时候用void 0代替
|
|
126
|
-
|
|
126
|
+
// 'no-undefined': 'error',
|
|
127
127
|
// ==================== 反虚假安全 ====================
|
|
128
128
|
// 永远使用let, 拒绝var和const, 并自动修复
|
|
129
129
|
//
|
|
@@ -162,7 +162,10 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
162
162
|
// - 对字面量枚举的if-else等性判断应该改用switch穷尽
|
|
163
163
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
164
164
|
"@lsby/no-switch-default": "error",
|
|
165
|
-
"@lsby/prefer-switch-for-literal-enum": "error"
|
|
165
|
+
"@lsby/prefer-switch-for-literal-enum": "error",
|
|
166
|
+
// ==================== 维护性 ====================
|
|
167
|
+
// 限制单文件行数
|
|
168
|
+
"max-lines": ["error", { max: 500, skipBlankLines: true, skipComments: true }]
|
|
166
169
|
}
|
|
167
170
|
};
|
|
168
171
|
var jsDoc\u5B89\u5168\u6027 = {
|
package/dist/esm/index.js
CHANGED
|
@@ -83,7 +83,7 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
83
83
|
// 禁止使用undefined
|
|
84
84
|
// 因为我们不需要两个空值, 总是使用null会更明确
|
|
85
85
|
// 但js的原生方法返回的都是undefined, 这时候用void 0代替
|
|
86
|
-
|
|
86
|
+
// 'no-undefined': 'error',
|
|
87
87
|
// ==================== 反虚假安全 ====================
|
|
88
88
|
// 永远使用let, 拒绝var和const, 并自动修复
|
|
89
89
|
//
|
|
@@ -122,7 +122,10 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
122
122
|
// - 对字面量枚举的if-else等性判断应该改用switch穷尽
|
|
123
123
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
124
124
|
"@lsby/no-switch-default": "error",
|
|
125
|
-
"@lsby/prefer-switch-for-literal-enum": "error"
|
|
125
|
+
"@lsby/prefer-switch-for-literal-enum": "error",
|
|
126
|
+
// ==================== 维护性 ====================
|
|
127
|
+
// 限制单文件行数
|
|
128
|
+
"max-lines": ["error", { max: 500, skipBlankLines: true, skipComments: true }]
|
|
126
129
|
}
|
|
127
130
|
};
|
|
128
131
|
var jsDoc\u5B89\u5168\u6027 = {
|