@lsby/eslint-config 0.5.2 → 0.5.4

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.
@@ -110,7 +110,12 @@ var ts\u5B89\u5168\u6027 = {
110
110
  }
111
111
  ],
112
112
  // 在除了条件表达式的地方, 使用??而不是||
113
- "@typescript-eslint/prefer-nullish-coalescing": "error",
113
+ "@typescript-eslint/prefer-nullish-coalescing": [
114
+ "error",
115
+ {
116
+ ignoreIfStatements: true
117
+ }
118
+ ],
114
119
  // 禁止对非布尔值使用取反
115
120
  // 对于 number | null 的值x, if(!x)在x等于null和0时都会触发, 这可能是非预期的
116
121
  "@lsby/no-negation": "error",
@@ -157,7 +162,10 @@ var ts\u5B89\u5168\u6027 = {
157
162
  // - 对字面量枚举的if-else等性判断应该改用switch穷尽
158
163
  "@typescript-eslint/switch-exhaustiveness-check": "error",
159
164
  "@lsby/no-switch-default": "error",
160
- "@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 }]
161
169
  }
162
170
  };
163
171
  var jsDoc\u5B89\u5168\u6027 = {
package/dist/esm/index.js CHANGED
@@ -70,7 +70,12 @@ var ts\u5B89\u5168\u6027 = {
70
70
  }
71
71
  ],
72
72
  // 在除了条件表达式的地方, 使用??而不是||
73
- "@typescript-eslint/prefer-nullish-coalescing": "error",
73
+ "@typescript-eslint/prefer-nullish-coalescing": [
74
+ "error",
75
+ {
76
+ ignoreIfStatements: true
77
+ }
78
+ ],
74
79
  // 禁止对非布尔值使用取反
75
80
  // 对于 number | null 的值x, if(!x)在x等于null和0时都会触发, 这可能是非预期的
76
81
  "@lsby/no-negation": "error",
@@ -117,7 +122,10 @@ var ts\u5B89\u5168\u6027 = {
117
122
  // - 对字面量枚举的if-else等性判断应该改用switch穷尽
118
123
  "@typescript-eslint/switch-exhaustiveness-check": "error",
119
124
  "@lsby/no-switch-default": "error",
120
- "@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 }]
121
129
  }
122
130
  };
123
131
  var jsDoc\u5B89\u5168\u6027 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/eslint-config",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lsby/lsby-eslint-config.git"