@lsby/eslint-config 0.2.7 → 0.2.9
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
@@ -41,6 +41,7 @@ __export(src_exports, {
|
|
41
41
|
\u98CE\u683C\u7F8E\u5316: () => \u98CE\u683C\u7F8E\u5316
|
42
42
|
});
|
43
43
|
module.exports = __toCommonJS(src_exports);
|
44
|
+
var import_eslint_plugin = __toESM(require("@lsby/eslint-plugin"), 1);
|
44
45
|
var import_eslint_plugin_jsdoc = __toESM(require("eslint-plugin-jsdoc"), 1);
|
45
46
|
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"), 1);
|
46
47
|
var import_eslint_plugin_react_hooks = __toESM(require("eslint-plugin-react-hooks"), 1);
|
@@ -60,7 +61,8 @@ var ts\u5B89\u5168\u6027 = {
|
|
60
61
|
}
|
61
62
|
},
|
62
63
|
plugins: {
|
63
|
-
"@typescript-eslint": import_typescript_eslint.default.plugin
|
64
|
+
"@typescript-eslint": import_typescript_eslint.default.plugin,
|
65
|
+
"@lsby": import_eslint_plugin.default
|
64
66
|
},
|
65
67
|
rules: {
|
66
68
|
// 拒绝any
|
@@ -81,7 +83,11 @@ var ts\u5B89\u5168\u6027 = {
|
|
81
83
|
destructuredArrayIgnorePattern: "^_",
|
82
84
|
varsIgnorePattern: "^_"
|
83
85
|
}
|
84
|
-
]
|
86
|
+
],
|
87
|
+
// 禁止非空断言运算符
|
88
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
89
|
+
// 永远使用let, 拒绝var和const, 并自动修复
|
90
|
+
"@lsby/prefer-let": "error"
|
85
91
|
}
|
86
92
|
};
|
87
93
|
var jsDoc\u5B89\u5168\u6027 = {
|
package/dist/esm/index.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
// src/index.ts
|
2
|
+
import lsbyEslint from "@lsby/eslint-plugin";
|
2
3
|
import jsdoc from "eslint-plugin-jsdoc";
|
3
4
|
import reacteslint from "eslint-plugin-react";
|
4
5
|
import reacteslinthooks from "eslint-plugin-react-hooks";
|
@@ -18,7 +19,8 @@ var ts\u5B89\u5168\u6027 = {
|
|
18
19
|
}
|
19
20
|
},
|
20
21
|
plugins: {
|
21
|
-
"@typescript-eslint": tseslint.plugin
|
22
|
+
"@typescript-eslint": tseslint.plugin,
|
23
|
+
"@lsby": lsbyEslint
|
22
24
|
},
|
23
25
|
rules: {
|
24
26
|
// 拒绝any
|
@@ -39,7 +41,11 @@ var ts\u5B89\u5168\u6027 = {
|
|
39
41
|
destructuredArrayIgnorePattern: "^_",
|
40
42
|
varsIgnorePattern: "^_"
|
41
43
|
}
|
42
|
-
]
|
44
|
+
],
|
45
|
+
// 禁止非空断言运算符
|
46
|
+
"@typescript-eslint/no-non-null-assertion": "error",
|
47
|
+
// 永远使用let, 拒绝var和const, 并自动修复
|
48
|
+
"@lsby/prefer-let": "error"
|
43
49
|
}
|
44
50
|
};
|
45
51
|
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.9",
|
4
4
|
"type": "module",
|
5
5
|
"exports": {
|
6
6
|
"require": "./dist/cjs/index.cjs",
|
@@ -30,6 +30,7 @@
|
|
30
30
|
"tsup": "^8.3.0"
|
31
31
|
},
|
32
32
|
"peerDependencies": {
|
33
|
+
"@lsby/eslint-plugin": "^0.0.4",
|
33
34
|
"@types/eslint": "^9.6.1",
|
34
35
|
"eslint": "^8.57.0",
|
35
36
|
"eslint-config-prettier": "^9.1.0",
|