@lsby/eslint-config 0.5.1 → 0.5.3
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
CHANGED
|
@@ -40,7 +40,6 @@ __export(index_exports, {
|
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(index_exports);
|
|
42
42
|
var import_eslint_plugin = __toESM(require("@lsby/eslint-plugin"), 1);
|
|
43
|
-
var import_eslint_plugin_es = __toESM(require("eslint-plugin-es"), 1);
|
|
44
43
|
var import_eslint_plugin_jsdoc = __toESM(require("eslint-plugin-jsdoc"), 1);
|
|
45
44
|
var import_eslint_plugin_sort_class_members = __toESM(require("eslint-plugin-sort-class-members"), 1);
|
|
46
45
|
var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
|
|
@@ -59,8 +58,7 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
59
58
|
},
|
|
60
59
|
plugins: {
|
|
61
60
|
"@typescript-eslint": import_typescript_eslint.default.plugin,
|
|
62
|
-
"@lsby": import_eslint_plugin.default
|
|
63
|
-
es: import_eslint_plugin_es.default
|
|
61
|
+
"@lsby": import_eslint_plugin.default
|
|
64
62
|
},
|
|
65
63
|
rules: {
|
|
66
64
|
// ==================== 避免安全漏洞 ====================
|
|
@@ -112,7 +110,12 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
112
110
|
}
|
|
113
111
|
],
|
|
114
112
|
// 在除了条件表达式的地方, 使用??而不是||
|
|
115
|
-
"@typescript-eslint/prefer-nullish-coalescing":
|
|
113
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
114
|
+
"error",
|
|
115
|
+
{
|
|
116
|
+
ignoreIfStatements: true
|
|
117
|
+
}
|
|
118
|
+
],
|
|
116
119
|
// 禁止对非布尔值使用取反
|
|
117
120
|
// 对于 number | null 的值x, if(!x)在x等于null和0时都会触发, 这可能是非预期的
|
|
118
121
|
"@lsby/no-negation": "error",
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import lsbyEslint from "@lsby/eslint-plugin";
|
|
3
|
-
import eslintPluginEs from "eslint-plugin-es";
|
|
4
3
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
5
4
|
import sortClassMembers from "eslint-plugin-sort-class-members";
|
|
6
5
|
import tseslint from "typescript-eslint";
|
|
@@ -19,8 +18,7 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
19
18
|
},
|
|
20
19
|
plugins: {
|
|
21
20
|
"@typescript-eslint": tseslint.plugin,
|
|
22
|
-
"@lsby": lsbyEslint
|
|
23
|
-
es: eslintPluginEs
|
|
21
|
+
"@lsby": lsbyEslint
|
|
24
22
|
},
|
|
25
23
|
rules: {
|
|
26
24
|
// ==================== 避免安全漏洞 ====================
|
|
@@ -72,7 +70,12 @@ var ts\u5B89\u5168\u6027 = {
|
|
|
72
70
|
}
|
|
73
71
|
],
|
|
74
72
|
// 在除了条件表达式的地方, 使用??而不是||
|
|
75
|
-
"@typescript-eslint/prefer-nullish-coalescing":
|
|
73
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
74
|
+
"error",
|
|
75
|
+
{
|
|
76
|
+
ignoreIfStatements: true
|
|
77
|
+
}
|
|
78
|
+
],
|
|
76
79
|
// 禁止对非布尔值使用取反
|
|
77
80
|
// 对于 number | null 的值x, if(!x)在x等于null和0时都会触发, 这可能是非预期的
|
|
78
81
|
"@lsby/no-negation": "error",
|