@lsby/eslint-config 0.2.8 → 0.2.10

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.
@@ -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
@@ -83,7 +85,13 @@ var ts\u5B89\u5168\u6027 = {
83
85
  }
84
86
  ],
85
87
  // 禁止非空断言运算符
86
- "@typescript-eslint/no-non-null-assertion": "error"
88
+ "@typescript-eslint/no-non-null-assertion": "error",
89
+ // 永远使用let, 拒绝var和const, 并自动修复
90
+ "@lsby/prefer-let": "error",
91
+ // 永远使用 === 而不是 ==, 在一些情况下能自动修复
92
+ eqeqeq: ["error", "always"],
93
+ // 在除了逻辑表达式的地方, 使用使用??而不是||
94
+ "@typescript-eslint/prefer-nullish-coalescing": "error"
87
95
  }
88
96
  };
89
97
  var jsDoc\u5B89\u5168\u6027 = {
@@ -1,3 +1,4 @@
1
1
  declare module 'eslint-plugin-sort-class-members' {}
2
2
  declare module 'eslint-plugin-react' {}
3
- declare module 'eslint-plugin-react-hooks' {}
3
+ declare module 'eslint-plugin-react-hooks' {}
4
+ declare module '@lsby/eslint-plugin' {}
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
@@ -41,7 +43,13 @@ var ts\u5B89\u5168\u6027 = {
41
43
  }
42
44
  ],
43
45
  // 禁止非空断言运算符
44
- "@typescript-eslint/no-non-null-assertion": "error"
46
+ "@typescript-eslint/no-non-null-assertion": "error",
47
+ // 永远使用let, 拒绝var和const, 并自动修复
48
+ "@lsby/prefer-let": "error",
49
+ // 永远使用 === 而不是 ==, 在一些情况下能自动修复
50
+ eqeqeq: ["error", "always"],
51
+ // 在除了逻辑表达式的地方, 使用使用??而不是||
52
+ "@typescript-eslint/prefer-nullish-coalescing": "error"
45
53
  }
46
54
  };
47
55
  var jsDoc\u5B89\u5168\u6027 = {
@@ -1,3 +1,4 @@
1
1
  declare module 'eslint-plugin-sort-class-members' {}
2
2
  declare module 'eslint-plugin-react' {}
3
- declare module 'eslint-plugin-react-hooks' {}
3
+ declare module 'eslint-plugin-react-hooks' {}
4
+ declare module '@lsby/eslint-plugin' {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsby/eslint-config",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
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",