@lsby/eslint-config 0.3.1 → 0.3.2

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.
@@ -98,11 +98,12 @@ var ts\u5B89\u5168\u6027 = {
98
98
  "@lsby/prefer-let": "error",
99
99
  // 永远使用 === 而不是 ==, 在一些情况下能自动修复
100
100
  eqeqeq: ["error", "always"],
101
- // 禁止 if ... else
101
+ // 禁止 else
102
102
  // else 表示"除当前条件外的所有可能"
103
103
  // 当状态集合未来扩展时, 依然会被包含在else分支里, 导致状态遗漏却无任何报错
104
104
  // 应当使用提早返回 或 switch + 穷尽检查
105
105
  "no-else-return": "error",
106
+ "@lsby/no-else": "error",
106
107
  "@typescript-eslint/switch-exhaustiveness-check": "error",
107
108
  // 在除了条件表达式的地方, 使用??而不是||
108
109
  "@typescript-eslint/prefer-nullish-coalescing": "error",
package/dist/esm/index.js CHANGED
@@ -58,11 +58,12 @@ var ts\u5B89\u5168\u6027 = {
58
58
  "@lsby/prefer-let": "error",
59
59
  // 永远使用 === 而不是 ==, 在一些情况下能自动修复
60
60
  eqeqeq: ["error", "always"],
61
- // 禁止 if ... else
61
+ // 禁止 else
62
62
  // else 表示"除当前条件外的所有可能"
63
63
  // 当状态集合未来扩展时, 依然会被包含在else分支里, 导致状态遗漏却无任何报错
64
64
  // 应当使用提早返回 或 switch + 穷尽检查
65
65
  "no-else-return": "error",
66
+ "@lsby/no-else": "error",
66
67
  "@typescript-eslint/switch-exhaustiveness-check": "error",
67
68
  // 在除了条件表达式的地方, 使用??而不是||
68
69
  "@typescript-eslint/prefer-nullish-coalescing": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/eslint-config",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "require": "./dist/cjs/index.cjs",
@@ -30,7 +30,7 @@
30
30
  "tsup": "^8.3.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@lsby/eslint-plugin": "^0.0.15",
33
+ "@lsby/eslint-plugin": "^0.0.16",
34
34
  "@types/eslint": "^9.6.1",
35
35
  "eslint": "^8.57.0",
36
36
  "eslint-config-prettier": "^9.1.0",