@lsby/eslint-config 0.2.12 → 0.2.14
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 +8 -3
- package/dist/esm/index.js +8 -3
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
@@ -90,11 +90,16 @@ var ts\u5B89\u5168\u6027 = {
|
|
90
90
|
"@lsby/prefer-let": "error",
|
91
91
|
// 永远使用 === 而不是 ==, 在一些情况下能自动修复
|
92
92
|
eqeqeq: ["error", "always"],
|
93
|
-
//
|
93
|
+
// 在除了条件表达式的地方, 使用??而不是||
|
94
94
|
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
95
|
-
//
|
95
|
+
// 禁止对非布尔值使用取反
|
96
96
|
// 对于 number | null 的值x, if(!x)在x等于null和0时都会触发, 这可能是非预期的
|
97
|
-
"@lsby/no-negation": "error"
|
97
|
+
"@lsby/no-negation": "error",
|
98
|
+
// 禁止使用null
|
99
|
+
// 因为null和undefined有区别, 我们不需要两个空值
|
100
|
+
// 而js的方法返回的都是undefined
|
101
|
+
// 只要我们注意JSON上的转换, 就没有问题
|
102
|
+
"@lsby/no-null": "error"
|
98
103
|
}
|
99
104
|
};
|
100
105
|
var jsDoc\u5B89\u5168\u6027 = {
|
package/dist/esm/index.js
CHANGED
@@ -48,11 +48,16 @@ var ts\u5B89\u5168\u6027 = {
|
|
48
48
|
"@lsby/prefer-let": "error",
|
49
49
|
// 永远使用 === 而不是 ==, 在一些情况下能自动修复
|
50
50
|
eqeqeq: ["error", "always"],
|
51
|
-
//
|
51
|
+
// 在除了条件表达式的地方, 使用??而不是||
|
52
52
|
"@typescript-eslint/prefer-nullish-coalescing": "error",
|
53
|
-
//
|
53
|
+
// 禁止对非布尔值使用取反
|
54
54
|
// 对于 number | null 的值x, if(!x)在x等于null和0时都会触发, 这可能是非预期的
|
55
|
-
"@lsby/no-negation": "error"
|
55
|
+
"@lsby/no-negation": "error",
|
56
|
+
// 禁止使用null
|
57
|
+
// 因为null和undefined有区别, 我们不需要两个空值
|
58
|
+
// 而js的方法返回的都是undefined
|
59
|
+
// 只要我们注意JSON上的转换, 就没有问题
|
60
|
+
"@lsby/no-null": "error"
|
56
61
|
}
|
57
62
|
};
|
58
63
|
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.
|
3
|
+
"version": "0.2.14",
|
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.
|
33
|
+
"@lsby/eslint-plugin": "^0.0.7",
|
34
34
|
"@types/eslint": "^9.6.1",
|
35
35
|
"eslint": "^8.57.0",
|
36
36
|
"eslint-config-prettier": "^9.1.0",
|