@lsby/eslint-config 0.2.16 → 0.2.18

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.
@@ -101,7 +101,18 @@ var ts\u5B89\u5168\u6027 = {
101
101
  // 只要我们注意JSON上的转换, 就没有问题
102
102
  // '@lsby/no-null': 'error',
103
103
  // 禁止使用undefined
104
- "no-undefined": "error"
104
+ "no-undefined": "error",
105
+ // 避免使用对象的索引判断null, 因为索引越界时实际值的undefined
106
+ "@lsby/require-has-check": "error",
107
+ // 条件里必须明确写布尔值, 以避免if('')被理解为假的情况
108
+ "@typescript-eslint/strict-boolean-expressions": [
109
+ "error",
110
+ {
111
+ allowString: false,
112
+ allowNumber: false,
113
+ allowNullableObject: false
114
+ }
115
+ ]
105
116
  }
106
117
  };
107
118
  var jsDoc\u5B89\u5168\u6027 = {
package/dist/esm/index.js CHANGED
@@ -59,7 +59,18 @@ var ts\u5B89\u5168\u6027 = {
59
59
  // 只要我们注意JSON上的转换, 就没有问题
60
60
  // '@lsby/no-null': 'error',
61
61
  // 禁止使用undefined
62
- "no-undefined": "error"
62
+ "no-undefined": "error",
63
+ // 避免使用对象的索引判断null, 因为索引越界时实际值的undefined
64
+ "@lsby/require-has-check": "error",
65
+ // 条件里必须明确写布尔值, 以避免if('')被理解为假的情况
66
+ "@typescript-eslint/strict-boolean-expressions": [
67
+ "error",
68
+ {
69
+ allowString: false,
70
+ allowNumber: false,
71
+ allowNullableObject: false
72
+ }
73
+ ]
63
74
  }
64
75
  };
65
76
  var jsDoc\u5B89\u5168\u6027 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/eslint-config",
3
- "version": "0.2.16",
3
+ "version": "0.2.18",
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.8",
33
+ "@lsby/eslint-plugin": "^0.0.9",
34
34
  "@types/eslint": "^9.6.1",
35
35
  "eslint": "^8.57.0",
36
36
  "eslint-config-prettier": "^9.1.0",