@pawover/kit 0.6.0 → 0.7.0

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.
Files changed (121) hide show
  1. package/README.en.md +123 -0
  2. package/README.md +123 -1
  3. package/entry/eslint-rules.cjs +1 -0
  4. package/entry/eslint-rules.d.cts +1 -0
  5. package/entry/eslint-rules.d.ts +2 -0
  6. package/entry/eslint-rules.js +2 -0
  7. package/entry/hooks-alova.cjs +1 -0
  8. package/entry/hooks-alova.d.cts +1 -0
  9. package/entry/hooks-alova.d.ts +1 -0
  10. package/entry/hooks-alova.js +1 -0
  11. package/entry/hooks-react.cjs +1 -0
  12. package/entry/hooks-react.d.cts +1 -0
  13. package/entry/hooks-react.d.ts +1 -0
  14. package/entry/hooks-react.js +1 -0
  15. package/entry/index.cjs +1 -0
  16. package/entry/index.d.cts +1 -0
  17. package/entry/index.d.ts +1 -0
  18. package/entry/index.js +1 -0
  19. package/entry/math.cjs +1 -0
  20. package/entry/math.d.cts +1 -0
  21. package/entry/math.d.ts +1 -0
  22. package/entry/math.js +1 -0
  23. package/entry/types-react.cjs +1 -0
  24. package/entry/types-react.d.cts +1 -0
  25. package/entry/types-react.d.ts +1 -0
  26. package/entry/types-react.js +1 -0
  27. package/entry/types.cjs +1 -0
  28. package/entry/types.d.cts +1 -0
  29. package/entry/types.d.ts +1 -0
  30. package/entry/types.js +1 -0
  31. package/entry/vite.cjs +1 -0
  32. package/entry/vite.d.cts +1 -0
  33. package/entry/vite.d.ts +1 -0
  34. package/entry/vite.js +1 -0
  35. package/entry/zod.cjs +1 -0
  36. package/entry/zod.d.cts +1 -0
  37. package/entry/zod.d.ts +1 -0
  38. package/entry/zod.js +1 -0
  39. package/package.json +72 -96
  40. package/packages/eslint-rules/dist/core.antfu.cjs +0 -78
  41. package/packages/eslint-rules/dist/core.antfu.d.cts +0 -1
  42. package/packages/eslint-rules/dist/core.antfu.d.ts +0 -74
  43. package/packages/eslint-rules/dist/core.antfu.js +0 -79
  44. package/packages/eslint-rules/dist/core.imports.cjs +0 -59
  45. package/packages/eslint-rules/dist/core.imports.d.cts +0 -1
  46. package/packages/eslint-rules/dist/core.imports.d.ts +0 -61
  47. package/packages/eslint-rules/dist/core.imports.js +0 -59
  48. package/packages/eslint-rules/dist/core.importsSort.cjs +0 -7
  49. package/packages/eslint-rules/dist/core.importsSort.d.cts +0 -1
  50. package/packages/eslint-rules/dist/core.importsSort.d.ts +0 -7
  51. package/packages/eslint-rules/dist/core.importsSort.js +0 -7
  52. package/packages/eslint-rules/dist/core.javascript.cjs +0 -1208
  53. package/packages/eslint-rules/dist/core.javascript.d.cts +0 -1
  54. package/packages/eslint-rules/dist/core.javascript.d.ts +0 -1216
  55. package/packages/eslint-rules/dist/core.javascript.js +0 -1208
  56. package/packages/eslint-rules/dist/core.react.cjs +0 -551
  57. package/packages/eslint-rules/dist/core.react.d.cts +0 -1
  58. package/packages/eslint-rules/dist/core.react.d.ts +0 -551
  59. package/packages/eslint-rules/dist/core.react.js +0 -551
  60. package/packages/eslint-rules/dist/core.reactHooks.cjs +0 -107
  61. package/packages/eslint-rules/dist/core.reactHooks.d.cts +0 -1
  62. package/packages/eslint-rules/dist/core.reactHooks.d.ts +0 -107
  63. package/packages/eslint-rules/dist/core.reactHooks.js +0 -107
  64. package/packages/eslint-rules/dist/core.stylistic.cjs +0 -608
  65. package/packages/eslint-rules/dist/core.stylistic.d.cts +0 -1
  66. package/packages/eslint-rules/dist/core.stylistic.d.ts +0 -595
  67. package/packages/eslint-rules/dist/core.stylistic.js +0 -608
  68. package/packages/eslint-rules/dist/core.typescript.cjs +0 -905
  69. package/packages/eslint-rules/dist/core.typescript.d.cts +0 -1
  70. package/packages/eslint-rules/dist/core.typescript.d.ts +0 -917
  71. package/packages/eslint-rules/dist/core.typescript.js +0 -906
  72. package/packages/eslint-rules/dist/core.vue.cjs +0 -312
  73. package/packages/eslint-rules/dist/core.vue.d.cts +0 -1
  74. package/packages/eslint-rules/dist/core.vue.d.ts +0 -293
  75. package/packages/eslint-rules/dist/core.vue.js +0 -313
  76. package/packages/eslint-rules/dist/index.cjs +0 -126
  77. package/packages/eslint-rules/dist/index.d.cts +0 -1
  78. package/packages/eslint-rules/dist/index.d.ts +0 -113
  79. package/packages/eslint-rules/dist/index.js +0 -126
  80. package/packages/eslint-rules/dist/preset-Bk6lxNP0.cjs +0 -107
  81. package/packages/eslint-rules/dist/preset-CQJST7pW.js +0 -102
  82. package/packages/hooks/dist/alova.cjs +0 -53
  83. package/packages/hooks/dist/alova.d.cts +0 -1
  84. package/packages/hooks/dist/alova.d.ts +0 -33
  85. package/packages/hooks/dist/alova.js +0 -50
  86. package/packages/hooks/dist/index.cjs +0 -0
  87. package/packages/hooks/dist/index.d.cts +0 -1
  88. package/packages/hooks/dist/index.d.ts +0 -1
  89. package/packages/hooks/dist/index.js +0 -0
  90. package/packages/hooks/dist/react.cjs +0 -169
  91. package/packages/hooks/dist/react.d.cts +0 -1
  92. package/packages/hooks/dist/react.d.ts +0 -95
  93. package/packages/hooks/dist/react.js +0 -163
  94. package/packages/types/dist/index.cjs +0 -0
  95. package/packages/types/dist/index.d.cts +0 -1
  96. package/packages/types/dist/index.d.ts +0 -271
  97. package/packages/types/dist/index.js +0 -0
  98. package/packages/types/dist/react.cjs +0 -0
  99. package/packages/types/dist/react.d.cts +0 -1
  100. package/packages/types/dist/react.d.ts +0 -64
  101. package/packages/types/dist/react.js +0 -0
  102. package/packages/utils/dist/index.cjs +0 -2300
  103. package/packages/utils/dist/index.d.cts +0 -1
  104. package/packages/utils/dist/index.d.ts +0 -2740
  105. package/packages/utils/dist/index.js +0 -2287
  106. package/packages/utils/dist/math-BznvO4qI.cjs +0 -1029
  107. package/packages/utils/dist/math-DRbCtLQH.js +0 -1012
  108. package/packages/utils/dist/math.cjs +0 -3
  109. package/packages/utils/dist/math.d.cts +0 -1
  110. package/packages/utils/dist/math.d.ts +0 -60
  111. package/packages/utils/dist/math.js +0 -2
  112. package/packages/utils/dist/vite.cjs +0 -44
  113. package/packages/utils/dist/vite.d.cts +0 -1
  114. package/packages/utils/dist/vite.d.ts +0 -28
  115. package/packages/utils/dist/vite.js +0 -43
  116. package/packages/zod/dist/index.cjs +0 -91
  117. package/packages/zod/dist/index.d.cts +0 -1
  118. package/packages/zod/dist/index.d.ts +0 -57
  119. package/packages/zod/dist/index.js +0 -61
  120. /package/{packages/hooks/dist/metadata.json → entry/hooks-metadata.json} +0 -0
  121. /package/{packages/utils/dist → entry}/metadata.json +0 -0
@@ -1,906 +0,0 @@
1
- import { t as preset_default } from "./preset-CQJST7pW.js";
2
- //#region src/core.typescript.ts
3
- var core_typescript_default = {
4
- /**
5
- * @desc 强制类方法使用 this
6
- * @descEN Enforce that class methods utilize this
7
- * @see https://typescript-eslint.io/rules/class-methods-use-this
8
- */
9
- "class-methods-use-this": 0,
10
- /**
11
- * @desc 强制默认参数在最后
12
- * @descEN Enforce default parameters to be last
13
- * @see https://typescript-eslint.io/rules/default-param-last
14
- */
15
- "default-param-last": 0,
16
- /**
17
- * @desc 强制尽可能使用点号表示法
18
- * @descEN Enforce dot notation whenever possible
19
- * @see https://typescript-eslint.io/rules/dot-notation
20
- */
21
- "dot-notation": 0,
22
- /**
23
- * @desc 要求或禁止变量声明中初始化
24
- * @descEN Require or disallow initialization in variable declarations
25
- * @see https://typescript-eslint.io/rules/init-declarations
26
- */
27
- "init-declarations": 0,
28
- /**
29
- * @desc 强制函数定义中最大参数数量
30
- * @descEN Enforce a maximum number of parameters in function definitions
31
- * @see https://typescript-eslint.io/rules/max-params
32
- */
33
- "max-params": 0,
34
- /**
35
- * @desc 禁止泛型 Array 构造函数
36
- * @descEN Disallow generic Array constructors
37
- * @see https://typescript-eslint.io/rules/no-array-constructor
38
- */
39
- "no-array-constructor": 0,
40
- /**
41
- * @desc 禁止重复的类成员
42
- * @descEN Disallow duplicate class members
43
- * @see https://typescript-eslint.io/rules/no-dupe-class-members
44
- */
45
- "no-dupe-class-members": 0,
46
- /**
47
- * @desc 禁止空函数
48
- * @descEN Disallow empty functions
49
- * @see https://typescript-eslint.io/rules/no-empty-function
50
- */
51
- "no-empty-function": 0,
52
- /**
53
- * @desc 禁止使用类似 eval 的函数
54
- * @descEN Disallow the use of eval()-like functions
55
- * @see https://typescript-eslint.io/rules/no-implied-eval
56
- */
57
- "no-implied-eval": 0,
58
- /**
59
- * @desc 禁止在循环语句中包含不安全引用的函数声明
60
- * @descEN Disallow function declarations that contain unsafe references inside loop statements
61
- * @see https://typescript-eslint.io/rules/no-loop-func
62
- */
63
- "no-loop-func": 0,
64
- /**
65
- * @desc 禁止魔术数字
66
- * @descEN Disallow magic numbers
67
- * @see https://typescript-eslint.io/rules/no-magic-numbers
68
- */
69
- "no-magic-numbers": 0,
70
- /**
71
- * @desc 禁止变量重复声明
72
- * @descEN Disallow variable redeclaration
73
- * @see https://typescript-eslint.io/rules/no-redeclare
74
- */
75
- "no-redeclare": 0,
76
- /**
77
- * @desc 禁止导入特定模块
78
- * @descEN Disallow specified modules when loaded by import
79
- * @see https://typescript-eslint.io/rules/no-restricted-imports
80
- */
81
- "no-restricted-imports": 0,
82
- /**
83
- * @desc 禁止变量声明遮蔽外层作用域变量
84
- * @descEN Disallow variable declarations from shadowing variables declared in the outer scope
85
- * @see https://typescript-eslint.io/rules/no-shadow
86
- */
87
- "no-shadow": 0,
88
- /**
89
- * @desc 禁止未使用的表达式
90
- * @descEN Disallow unused expressions
91
- * @see https://typescript-eslint.io/rules/no-unused-expressions
92
- */
93
- "no-unused-expressions": 0,
94
- /**
95
- * @desc 禁止未使用的变量
96
- * @descEN Disallow unused variables
97
- * @see https://typescript-eslint.io/rules/no-unused-vars
98
- */
99
- "no-unused-vars": 0,
100
- /**
101
- * @desc 禁止在定义之前使用变量
102
- * @descEN Disallow the use of variables before they are defined
103
- * @see https://typescript-eslint.io/rules/no-use-before-define
104
- */
105
- "no-use-before-define": 0,
106
- /**
107
- * @desc 禁止不必要的构造函数
108
- * @descEN Disallow unnecessary constructors
109
- * @see https://typescript-eslint.io/rules/no-useless-constructor
110
- */
111
- "no-useless-constructor": 0,
112
- /**
113
- * @desc 要求从数组和/或对象进行解构
114
- * @descEN Require destructuring from arrays and/or objects
115
- * @see https://typescript-eslint.io/rules/prefer-destructuring
116
- */
117
- "prefer-destructuring": 0,
118
- /**
119
- * @desc 要求使用 Error 对象作为 Promise 拒绝原因
120
- * @descEN Require using Error objects as Promise rejection reasons
121
- * @see https://typescript-eslint.io/rules/prefer-promise-reject-errors
122
- */
123
- "prefer-promise-reject-errors": 0,
124
- /**
125
- * @desc 禁止没有 await 表达式且不返回 Promise 的异步函数
126
- * @descEN Disallow async functions which do not have await expression
127
- * @see https://typescript-eslint.io/rules/require-await
128
- */
129
- "require-await": 0,
130
- /**
131
- * @desc 要求函数重载签名连续
132
- * @descEN Require that function overload signatures be consecutive
133
- * @see https://typescript-eslint.io/rules/adjacent-overload-signatures
134
- */
135
- "ts/adjacent-overload-signatures": 2,
136
- /**
137
- * @desc 要求一致使用 T[] 或 Array<T>
138
- * @descEN Require consistently using either T[] or Array<T> for arrays
139
- * @see https://typescript-eslint.io/rules/array-type
140
- */
141
- "ts/array-type": 2,
142
- /**
143
- * @desc 禁止 await 非 Thenable 的值
144
- * @descEN Disallow awaiting a value that is not a Thenable
145
- * @see https://typescript-eslint.io/rules/await-thenable
146
- */
147
- "ts/await-thenable": 0,
148
- /**
149
- * @desc 禁止 @ts-<directive> 注释或要求指令后带说明
150
- * @descEN Disallow @ts-<directive> comments or require descriptions after directives
151
- * @see https://typescript-eslint.io/rules/ban-ts-comment
152
- */
153
- "ts/ban-ts-comment": 0,
154
- /**
155
- * @desc 禁止 // tslint:<rule-flag> 注释
156
- * @descEN Disallow // tslint:<rule-flag> comments
157
- * @see https://typescript-eslint.io/rules/ban-tslint-comment
158
- */
159
- "ts/ban-tslint-comment": 0,
160
- /**
161
- * @desc 强制类上的字面量以一致风格暴露
162
- * @descEN Enforce that literals on classes are exposed in a consistent style
163
- * @see https://typescript-eslint.io/rules/class-literal-property-style
164
- */
165
- "ts/class-literal-property-style": [2, "fields"],
166
- /**
167
- * @desc 强制类方法使用 this
168
- * @descEN Enforce that class methods utilize this
169
- * @see https://typescript-eslint.io/rules/class-methods-use-this
170
- */
171
- "ts/class-methods-use-this": 0,
172
- /**
173
- * @desc 强制在构造函数调用上指定泛型类型参数的风格
174
- * @descEN Enforce specifying generic type arguments on type annotation or constructor name of a constructor call
175
- * @see https://typescript-eslint.io/rules/consistent-generic-constructors
176
- */
177
- "ts/consistent-generic-constructors": 0,
178
- /**
179
- * @desc 要求或禁止 Record 类型
180
- * @descEN Require or disallow the Record type
181
- * @see https://typescript-eslint.io/rules/consistent-indexed-object-style
182
- */
183
- "ts/consistent-indexed-object-style": 0,
184
- /**
185
- * @desc 强制类型断言风格一致
186
- * @descEN Enforce consistent usage of type assertions
187
- * @see https://typescript-eslint.io/rules/consistent-type-assertions
188
- */
189
- "ts/consistent-type-assertions": 2,
190
- /**
191
- * @desc 强制类型定义一致使用 interface 或 type
192
- * @descEN Enforce type definitions to consistently use either interface or type
193
- * @see https://typescript-eslint.io/rules/consistent-type-definitions
194
- */
195
- "ts/consistent-type-definitions": [2, "interface"],
196
- /**
197
- * @desc 强制一致使用 type 导出
198
- * @descEN Enforce consistent usage of type exports
199
- * @see https://typescript-eslint.io/rules/consistent-type-exports
200
- */
201
- "ts/consistent-type-exports": 2,
202
- /**
203
- * @desc 强制一致使用 type 导入
204
- * @descEN Enforce consistent usage of type imports
205
- * @see https://typescript-eslint.io/rules/consistent-type-imports
206
- */
207
- "ts/consistent-type-imports": [2, { fixStyle: "inline-type-imports" }],
208
- /**
209
- * @desc 强制默认参数在最后
210
- * @descEN Enforce default parameters to be last
211
- * @see https://typescript-eslint.io/rules/default-param-last
212
- */
213
- "ts/default-param-last": 2,
214
- /**
215
- * @desc 强制尽可能使用点号表示法
216
- * @descEN Enforce dot notation whenever possible
217
- * @see https://typescript-eslint.io/rules/dot-notation
218
- */
219
- "ts/dot-notation": 0,
220
- /**
221
- * @desc 要求函数和方法有显式返回类型
222
- * @descEN Require explicit return types on functions and class methods
223
- * @see https://typescript-eslint.io/rules/explicit-function-return-type
224
- */
225
- "ts/explicit-function-return-type": 0,
226
- /**
227
- * @desc 要求类属性和方法有显式可访问性修饰符
228
- * @descEN Require explicit accessibility modifiers on class properties and methods
229
- * @see https://typescript-eslint.io/rules/explicit-member-accessibility
230
- */
231
- "ts/explicit-member-accessibility": 0,
232
- /**
233
- * @desc 要求导出函数和类的公共方法有显式返回和参数类型
234
- * @descEN Require explicit return and argument types on exported functions' and classes' public class methods
235
- * @see https://typescript-eslint.io/rules/explicit-module-boundary-types
236
- */
237
- "ts/explicit-module-boundary-types": 0,
238
- /**
239
- * @desc 要求或禁止变量声明中初始化
240
- * @descEN Require or disallow initialization in variable declarations
241
- * @see https://typescript-eslint.io/rules/init-declarations
242
- */
243
- "ts/init-declarations": 0,
244
- /**
245
- * @desc 强制函数定义中最大参数数量
246
- * @descEN Enforce a maximum number of parameters in function definitions
247
- * @see https://typescript-eslint.io/rules/max-params
248
- */
249
- "ts/max-params": 0,
250
- /**
251
- * @desc 要求成员声明顺序一致
252
- * @descEN Require a consistent member declaration order
253
- * @see https://typescript-eslint.io/rules/member-ordering
254
- */
255
- "ts/member-ordering": [2, { default: preset_default.tsMemberOrder }],
256
- /**
257
- * @desc 强制使用特定的方法签名语法
258
- * @descEN Enforce using a particular method signature syntax
259
- * @see https://typescript-eslint.io/rules/method-signature-style
260
- */
261
- "ts/method-signature-style": 2,
262
- /**
263
- * @desc 强制整个代码库的命名约定
264
- * @descEN Enforce naming conventions for everything across a codebase
265
- * @see https://typescript-eslint.io/rules/naming-convention
266
- */
267
- "ts/naming-convention": 0,
268
- /**
269
- * @desc 禁止泛型 Array 构造函数
270
- * @descEN Disallow generic Array constructors
271
- * @see https://typescript-eslint.io/rules/no-array-constructor
272
- */
273
- "ts/no-array-constructor": 2,
274
- /**
275
- * @desc 禁止对数组值使用 delete 操作符
276
- * @descEN Disallow using the delete operator on array values
277
- * @see https://typescript-eslint.io/rules/no-array-delete
278
- */
279
- "ts/no-array-delete": 2,
280
- /**
281
- * @desc 要求 toString 和 toLocaleString 仅在提供有用信息的对象上调用
282
- * @descEN Require .toString() to only be called on objects which provide useful information when stringified
283
- * @see https://typescript-eslint.io/rules/no-base-to-string
284
- */
285
- "ts/no-base-to-string": 0,
286
- /**
287
- * @desc 禁止在可能混淆的位置使用非空断言
288
- * @descEN Disallow non-null assertion in locations that may be confusing
289
- * @see https://typescript-eslint.io/rules/no-confusing-non-null-assertion
290
- */
291
- "ts/no-confusing-non-null-assertion": 0,
292
- /**
293
- * @desc 要求 void 类型的表达式出现在语句位置
294
- * @descEN Require expressions of type void to appear in statement position
295
- * @see https://typescript-eslint.io/rules/no-confusing-void-expression
296
- */
297
- "ts/no-confusing-void-expression": [2, {
298
- ignoreArrowShorthand: true,
299
- ignoreVoidOperator: false
300
- }],
301
- /**
302
- * @desc 禁止使用标记为 @deprecated 的代码
303
- * @descEN Disallow using code marked as @deprecated
304
- * @see https://typescript-eslint.io/rules/no-deprecated
305
- */
306
- "ts/no-deprecated": 0,
307
- /**
308
- * @desc 禁止重复的类成员
309
- * @descEN Disallow duplicate class members
310
- * @see https://typescript-eslint.io/rules/no-dupe-class-members
311
- */
312
- "ts/no-dupe-class-members": 2,
313
- /**
314
- * @desc 禁止重复的枚举成员值
315
- * @descEN Disallow duplicate enum member values
316
- * @see https://typescript-eslint.io/rules/no-duplicate-enum-values
317
- */
318
- "ts/no-duplicate-enum-values": 2,
319
- /**
320
- * @desc 禁止联合类型或交叉类型中有重复成分
321
- * @descEN Disallow duplicate constituents of union or intersection types
322
- * @see https://typescript-eslint.io/rules/no-duplicate-type-constituents
323
- */
324
- "ts/no-duplicate-type-constituents": 0,
325
- /**
326
- * @desc 禁止对计算键表达式使用 delete 操作符
327
- * @descEN Disallow using the delete operator on computed key expressions
328
- * @see https://typescript-eslint.io/rules/no-dynamic-delete
329
- */
330
- "ts/no-dynamic-delete": 0,
331
- /**
332
- * @desc 禁止空函数
333
- * @descEN Disallow empty functions
334
- * @see https://typescript-eslint.io/rules/no-empty-function
335
- */
336
- "ts/no-empty-function": 0,
337
- /**
338
- * @desc 禁止意外使用空对象类型
339
- * @descEN Disallow accidentally using the "empty object" type
340
- * @see https://typescript-eslint.io/rules/no-empty-object-type
341
- */
342
- "ts/no-empty-object-type": [2, { allowInterfaces: "with-single-extends" }],
343
- /**
344
- * @desc 禁止 any 类型
345
- * @descEN Disallow the any type
346
- * @see https://typescript-eslint.io/rules/no-explicit-any
347
- */
348
- "ts/no-explicit-any": [2, {
349
- fixToUnknown: true,
350
- ignoreRestArgs: true
351
- }],
352
- /**
353
- * @desc 禁止多余的非空断言
354
- * @descEN Disallow extra non-null assertions
355
- * @see https://typescript-eslint.io/rules/no-extra-non-null-assertion
356
- */
357
- "ts/no-extra-non-null-assertion": 0,
358
- /**
359
- * @desc 禁止用作命名空间的类
360
- * @descEN Disallow classes used as namespaces
361
- * @see https://typescript-eslint.io/rules/no-extraneous-class
362
- */
363
- "ts/no-extraneous-class": 0,
364
- /**
365
- * @desc 要求 Promise 风格的语句被正确处理
366
- * @descEN Require Promise-like statements to be handled appropriately
367
- * @see https://typescript-eslint.io/rules/no-floating-promises
368
- */
369
- "ts/no-floating-promises": 0,
370
- /**
371
- * @desc 禁止使用 for-in 循环遍历数组
372
- * @descEN Disallow iterating over an array with a for-in loop
373
- * @see https://typescript-eslint.io/rules/no-for-in-array
374
- */
375
- "ts/no-for-in-array": 0,
376
- /**
377
- * @desc 禁止使用类似 eval 的函数
378
- * @descEN Disallow the use of eval()-like functions
379
- * @see https://typescript-eslint.io/rules/no-implied-eval
380
- */
381
- "ts/no-implied-eval": 2,
382
- /**
383
- * @desc 强制当导入只有内联类型限定符时使用顶级 import type 限定符
384
- * @descEN Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
385
- * @see https://typescript-eslint.io/rules/no-import-type-side-effects
386
- */
387
- "ts/no-import-type-side-effects": 2,
388
- /**
389
- * @desc 禁止对初始化为数字、字符串或布尔值的变量或参数使用显式类型声明
390
- * @descEN Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean
391
- * @see https://typescript-eslint.io/rules/no-inferrable-types
392
- */
393
- "ts/no-inferrable-types": [2, {
394
- ignoreParameters: true,
395
- ignoreProperties: true
396
- }],
397
- /**
398
- * @desc 禁止在泛型或返回类型之外使用 void 类型
399
- * @descEN Disallow void type outside of generic or return types
400
- * @see https://typescript-eslint.io/rules/no-invalid-void-type
401
- */
402
- "ts/no-invalid-void-type": 2,
403
- /**
404
- * @desc 禁止在循环语句中包含不安全引用的函数声明
405
- * @descEN Disallow function declarations that contain unsafe references inside loop statements
406
- * @see https://typescript-eslint.io/rules/no-loop-func
407
- */
408
- "ts/no-loop-func": 0,
409
- /**
410
- * @desc 禁止魔术数字
411
- * @descEN Disallow magic numbers
412
- * @see https://typescript-eslint.io/rules/no-magic-numbers
413
- */
414
- "ts/no-magic-numbers": 0,
415
- /**
416
- * @desc 禁止除用于丢弃值外的 void 运算符
417
- * @descEN Disallow the void operator except when used to discard a value
418
- * @see https://typescript-eslint.io/rules/no-meaningless-void-operator
419
- */
420
- "ts/no-meaningless-void-operator": 0,
421
- /**
422
- * @desc 强制 new 和 constructor 的有效定义
423
- * @descEN Enforce valid definition of new and constructor
424
- * @see https://typescript-eslint.io/rules/no-misused-new
425
- */
426
- "ts/no-misused-new": 0,
427
- /**
428
- * @desc 禁止在不设计处理 Promise 的地方使用 Promise
429
- * @descEN Disallow Promises in places not designed to handle them
430
- * @see https://typescript-eslint.io/rules/no-misused-promises
431
- */
432
- "ts/no-misused-promises": [2, { checksVoidReturn: false }],
433
- /**
434
- * @desc 禁止展开运算符可能导致意外行为的使用
435
- * @descEN Disallow using the spread operator when it might cause unexpected behavior
436
- * @see https://typescript-eslint.io/rules/no-misused-spread
437
- */
438
- "ts/no-misused-spread": 2,
439
- /**
440
- * @desc 禁止枚举同时具有数字和字符串成员
441
- * @descEN Disallow enums from having both number and string members
442
- * @see https://typescript-eslint.io/rules/no-mixed-enums
443
- */
444
- "ts/no-mixed-enums": 0,
445
- /**
446
- * @desc 禁止 TypeScript 命名空间
447
- * @descEN Disallow TypeScript namespaces
448
- * @see https://typescript-eslint.io/rules/no-namespace
449
- */
450
- "ts/no-namespace": [2, {
451
- allowDeclarations: true,
452
- allowDefinitionFiles: true
453
- }],
454
- /**
455
- * @desc 禁止空值合并运算符左操作数中的非空断言
456
- * @descEN Disallow non-null assertions in the left operand of a nullish coalescing operator
457
- * @see https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
458
- */
459
- "ts/no-non-null-asserted-nullish-coalescing": 2,
460
- /**
461
- * @desc 禁止可选链表达式后的非空断言
462
- * @descEN Disallow non-null assertions after an optional chain expression
463
- * @see https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
464
- */
465
- "ts/no-non-null-asserted-optional-chain": 2,
466
- /**
467
- * @desc 禁止使用 ! 后缀运算符进行非空断言
468
- * @descEN Disallow non-null assertions using the ! postfix operator
469
- * @see https://typescript-eslint.io/rules/no-non-null-assertion
470
- */
471
- "ts/no-non-null-assertion": 0,
472
- /**
473
- * @desc 禁止变量重复声明
474
- * @descEN Disallow variable redeclaration
475
- * @see https://typescript-eslint.io/rules/no-redeclare
476
- */
477
- "ts/no-redeclare": 2,
478
- /**
479
- * @desc 禁止联合类型或交叉类型中不起作用或覆盖类型信息的成员
480
- * @descEN Disallow members of unions and intersections that do nothing or override type information
481
- * @see https://typescript-eslint.io/rules/no-redundant-type-constituents
482
- */
483
- "ts/no-redundant-type-constituents": 0,
484
- /**
485
- * @desc 禁止调用 require()
486
- * @descEN Disallow invocation of require()
487
- * @see https://typescript-eslint.io/rules/no-require-imports
488
- */
489
- "ts/no-require-imports": 2,
490
- /**
491
- * @desc 禁止导入特定模块
492
- * @descEN Disallow specified modules when loaded by import
493
- * @see https://typescript-eslint.io/rules/no-restricted-imports
494
- */
495
- "ts/no-restricted-imports": 0,
496
- /**
497
- * @desc 禁止某些类型
498
- * @descEN Disallow certain types
499
- * @see https://typescript-eslint.io/rules/no-restricted-types
500
- */
501
- "ts/no-restricted-types": 0,
502
- /**
503
- * @desc 禁止变量声明遮蔽外层作用域变量
504
- * @descEN Disallow variable declarations from shadowing variables declared in the outer scope
505
- * @see https://typescript-eslint.io/rules/no-shadow
506
- */
507
- "ts/no-shadow": 0,
508
- /**
509
- * @desc 禁止别名 this
510
- * @descEN Disallow aliasing this
511
- * @see https://typescript-eslint.io/rules/no-this-alias
512
- */
513
- "ts/no-this-alias": [2, { allowDestructuring: true }],
514
- /**
515
- * @desc 禁止与布尔字面量的不必要相等比较
516
- * @descEN Disallow unnecessary equality comparisons against boolean literals
517
- * @see https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
518
- */
519
- "ts/no-unnecessary-boolean-literal-compare": 0,
520
- /**
521
- * @desc 禁止条件表达式类型始终为真或始终为假
522
- * @descEN Disallow conditionals where the type is always truthy or always falsy
523
- * @see https://typescript-eslint.io/rules/no-unnecessary-condition
524
- */
525
- "ts/no-unnecessary-condition": 0,
526
- /**
527
- * @desc 禁止不必要的构造函数属性参数赋值
528
- * @descEN Disallow unnecessary assignment of constructor property parameter
529
- * @see https://typescript-eslint.io/rules/no-unnecessary-parameter-property-assignment
530
- */
531
- "ts/no-unnecessary-parameter-property-assignment": 0,
532
- /**
533
- * @desc 禁止不必要的命名空间限定符
534
- * @descEN Disallow unnecessary namespace qualifiers
535
- * @see https://typescript-eslint.io/rules/no-unnecessary-qualifier
536
- */
537
- "ts/no-unnecessary-qualifier": 0,
538
- /**
539
- * @desc 禁止不必要的模板表达式
540
- * @descEN Disallow unnecessary template expressions
541
- * @see https://typescript-eslint.io/rules/no-unnecessary-template-expression
542
- */
543
- "ts/no-unnecessary-template-expression": 2,
544
- /**
545
- * @desc 禁止等于默认值的类型参数
546
- * @descEN Disallow type arguments that are equal to the default
547
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-arguments
548
- */
549
- "ts/no-unnecessary-type-arguments": 0,
550
- /**
551
- * @desc 禁止不改变表达式类型的类型断言
552
- * @descEN Disallow type assertions that do not change the type of an expression
553
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-assertion
554
- */
555
- "ts/no-unnecessary-type-assertion": 0,
556
- /**
557
- * @desc 禁止对泛型类型的不必要约束
558
- * @descEN Disallow unnecessary constraints on generic types
559
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint
560
- */
561
- "ts/no-unnecessary-type-constraint": 2,
562
- /**
563
- * @desc 禁止未多次使用的类型参数
564
- * @descEN Disallow type parameters that aren't used multiple times
565
- * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
566
- */
567
- "ts/no-unnecessary-type-parameters": 0,
568
- /**
569
- * @desc 禁止使用类型为 any 的值调用函数
570
- * @descEN Disallow calling a function with a value with type any
571
- * @see https://typescript-eslint.io/rules/no-unsafe-argument
572
- */
573
- "ts/no-unsafe-argument": 0,
574
- /**
575
- * @desc 禁止将类型为 any 的值赋值给变量和属性
576
- * @descEN Disallow assigning a value with type any to variables and properties
577
- * @see https://typescript-eslint.io/rules/no-unsafe-assignment
578
- */
579
- "ts/no-unsafe-assignment": 0,
580
- /**
581
- * @desc 禁止调用类型为 any 的值
582
- * @descEN Disallow calling a value with type any
583
- * @see https://typescript-eslint.io/rules/no-unsafe-call
584
- */
585
- "ts/no-unsafe-call": 0,
586
- /**
587
- * @desc 禁止不安全的声明合并
588
- * @descEN Disallow unsafe declaration merging
589
- * @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging
590
- */
591
- "ts/no-unsafe-declaration-merging": 0,
592
- /**
593
- * @desc 禁止将枚举值与非枚举值比较
594
- * @descEN Disallow comparing an enum value with a non-enum value
595
- * @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison
596
- */
597
- "ts/no-unsafe-enum-comparison": 0,
598
- /**
599
- * @desc 禁止使用不安全的原生 Function 类型
600
- * @descEN Disallow using the unsafe built-in Function type
601
- * @see https://typescript-eslint.io/rules/no-unsafe-function-type
602
- */
603
- "ts/no-unsafe-function-type": 2,
604
- /**
605
- * @desc 禁止访问类型为 any 的属性
606
- * @descEN Disallow member access on a value with type any
607
- * @see https://typescript-eslint.io/rules/no-unsafe-member-access
608
- */
609
- "ts/no-unsafe-member-access": 0,
610
- /**
611
- * @desc 禁止从函数返回类型为 any 的值
612
- * @descEN Disallow returning a value with type any from a function
613
- * @see https://typescript-eslint.io/rules/no-unsafe-return
614
- */
615
- "ts/no-unsafe-return": 0,
616
- /**
617
- * @desc 禁止缩小范围类型的类型断言
618
- * @descEN Disallow type assertions that narrow a type
619
- * @see https://typescript-eslint.io/rules/no-unsafe-type-assertion
620
- */
621
- "ts/no-unsafe-type-assertion": 0,
622
- /**
623
- * @desc 要求一元否定运算作用于数字
624
- * @descEN Require unary negation to take a number
625
- * @see https://typescript-eslint.io/rules/no-unsafe-unary-minus
626
- */
627
- "ts/no-unsafe-unary-minus": 2,
628
- /**
629
- * @desc 禁止未使用的表达式
630
- * @descEN Disallow unused expressions
631
- * @see https://typescript-eslint.io/rules/no-unused-expressions
632
- */
633
- "ts/no-unused-expressions": [1, {
634
- ignoreDirectives: true,
635
- allowShortCircuit: true
636
- }],
637
- /**
638
- * @desc 禁止未使用的变量
639
- * @descEN Disallow unused variables
640
- * @see https://typescript-eslint.io/rules/no-unused-vars
641
- */
642
- "ts/no-unused-vars": [1, {
643
- vars: "local",
644
- args: "none",
645
- caughtErrors: "none",
646
- varsIgnorePattern: "^_",
647
- destructuredArrayIgnorePattern: "^_"
648
- }],
649
- /**
650
- * @desc 禁止在定义之前使用变量
651
- * @descEN Disallow the use of variables before they are defined
652
- * @see https://typescript-eslint.io/rules/no-use-before-define
653
- */
654
- "ts/no-use-before-define": [2, {
655
- functions: false,
656
- classes: false,
657
- variables: false,
658
- allowNamedExports: false
659
- }],
660
- /**
661
- * @desc 禁止不必要的构造函数
662
- * @descEN Disallow unnecessary constructors
663
- * @see https://typescript-eslint.io/rules/no-useless-constructor
664
- */
665
- "ts/no-useless-constructor": 0,
666
- /**
667
- * @desc 禁止不改变模块文件内容的空导出
668
- * @descEN Disallow empty exports that don't change anything in a module file
669
- * @see https://typescript-eslint.io/rules/no-useless-empty-export
670
- */
671
- "ts/no-useless-empty-export": 0,
672
- /**
673
- * @desc 禁止使用令人困惑的内置基本类型包装器
674
- * @descEN Disallow using confusing built-in primitive class wrappers
675
- * @see https://typescript-eslint.io/rules/no-wrapper-object-types
676
- */
677
- "ts/no-wrapper-object-types": 2,
678
- /**
679
- * @desc 强制使用非空断言而不是显式类型断言
680
- * @descEN Enforce non-null assertions over explicit type assertions
681
- * @see https://typescript-eslint.io/rules/non-nullable-type-assertion-style
682
- */
683
- "ts/non-nullable-type-assertion-style": 0,
684
- /**
685
- * @desc 禁止抛出非 Error 值作为异常
686
- * @descEN Disallow throwing non-Error values as exceptions
687
- * @see https://typescript-eslint.io/rules/only-throw-error
688
- */
689
- "ts/only-throw-error": [2, { allow: [{
690
- from: "package",
691
- package: "@tanstack/router-core",
692
- name: "Redirect"
693
- }] }],
694
- /**
695
- * @desc 要求或禁止类构造函数中的参数属性
696
- * @descEN Require or disallow parameter properties in class constructors
697
- * @see https://typescript-eslint.io/rules/parameter-properties
698
- */
699
- "ts/parameter-properties": 0,
700
- /**
701
- * @desc 强制使用 as const 而非字面量类型
702
- * @descEN Enforce the use of as const over literal type
703
- * @see https://typescript-eslint.io/rules/prefer-as-const
704
- */
705
- "ts/prefer-as-const": 0,
706
- /**
707
- * @desc 要求从数组和/或对象进行解构
708
- * @descEN Require destructuring from arrays and/or objects
709
- * @see https://typescript-eslint.io/rules/prefer-destructuring
710
- */
711
- "ts/prefer-destructuring": 0,
712
- /**
713
- * @desc 要求每个枚举成员值都被显式初始化
714
- * @descEN Require each enum member value to be explicitly initialized
715
- * @see https://typescript-eslint.io/rules/prefer-enum-initializers
716
- */
717
- "ts/prefer-enum-initializers": 0,
718
- /**
719
- * @desc 强制使用 Array.prototype.find 而不是 filter 后跟 [0]
720
- * @descEN Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0]
721
- * @see https://typescript-eslint.io/rules/prefer-find
722
- */
723
- "ts/prefer-find": 2,
724
- /**
725
- * @desc 强制尽可能使用 for-of 循环代替标准 for 循环
726
- * @descEN Enforce the use of for-of loop over the standard for loop where possible
727
- * @see https://typescript-eslint.io/rules/prefer-for-of
728
- */
729
- "ts/prefer-for-of": 0,
730
- /**
731
- * @desc 强制使用函数类型替代带调用签名的接口
732
- * @descEN Enforce using function types instead of interfaces with call signatures
733
- * @see https://typescript-eslint.io/rules/prefer-function-type
734
- */
735
- "ts/prefer-function-type": 2,
736
- /**
737
- * @desc 强制使用 includes 方法代替 indexOf 方法
738
- * @descEN Enforce includes method over indexOf method
739
- * @see https://typescript-eslint.io/rules/prefer-includes
740
- */
741
- "ts/prefer-includes": 0,
742
- /**
743
- * @desc 要求所有枚举成员必须是字面量值
744
- * @descEN Require all enum members to be literal values
745
- * @see https://typescript-eslint.io/rules/prefer-literal-enum-member
746
- */
747
- "ts/prefer-literal-enum-member": 0,
748
- /**
749
- * @desc 要求使用 namespace 关键字而非 module 关键字
750
- * @descEN Require using namespace keyword over module keyword
751
- * @see https://typescript-eslint.io/rules/prefer-namespace-keyword
752
- */
753
- "ts/prefer-namespace-keyword": 2,
754
- /**
755
- * @desc 强制使用空值合并运算符替代逻辑赋值或链式操作
756
- * @descEN Enforce using the nullish coalescing operator instead of logical assignments or chaining
757
- * @see https://typescript-eslint.io/rules/prefer-nullish-coalescing
758
- */
759
- "ts/prefer-nullish-coalescing": 0,
760
- /**
761
- * @desc 强制使用简洁的可选链表达式替代逻辑与链
762
- * @descEN Enforce using concise optional chain expressions instead of chained logical ands
763
- * @see https://typescript-eslint.io/rules/prefer-optional-chain
764
- */
765
- "ts/prefer-optional-chain": 0,
766
- /**
767
- * @desc 要求使用 Error 对象作为 Promise 拒绝原因
768
- * @descEN Require using Error objects as Promise rejection reasons
769
- * @see https://typescript-eslint.io/rules/prefer-promise-reject-errors
770
- */
771
- "ts/prefer-promise-reject-errors": 0,
772
- /**
773
- * @desc 要求如果私有成员不在构造函数外修改,则标记为 readonly
774
- * @descEN Require private members to be marked as readonly if they're never modified outside of the constructor
775
- * @see https://typescript-eslint.io/rules/prefer-readonly
776
- */
777
- "ts/prefer-readonly": 0,
778
- /**
779
- * @desc 要求函数参数类型为 readonly 以防止意外修改输入
780
- * @descEN Require function parameters to be typed as readonly to prevent accidental mutation of inputs
781
- * @see https://typescript-eslint.io/rules/prefer-readonly-parameter-types
782
- */
783
- "ts/prefer-readonly-parameter-types": 0,
784
- /**
785
- * @desc 强制在调用 Array#reduce 时使用类型参数代替类型断言
786
- * @descEN Enforce using type parameter when calling Array#reduce instead of using a type assertion
787
- * @see https://typescript-eslint.io/rules/prefer-reduce-type-parameter
788
- */
789
- "ts/prefer-reduce-type-parameter": 0,
790
- /**
791
- * @desc 强制在没有全局标志时使用 RegExp#exec 而非 String#match
792
- * @descEN Enforce RegExp#exec over String#match if no global flag is provided
793
- * @see https://typescript-eslint.io/rules/prefer-regexp-exec
794
- */
795
- "ts/prefer-regexp-exec": 0,
796
- /**
797
- * @desc 强制当仅返回 this 类型时使用 this
798
- * @descEN Enforce that this is used when only this type is returned
799
- * @see https://typescript-eslint.io/rules/prefer-return-this-type
800
- */
801
- "ts/prefer-return-this-type": 0,
802
- /**
803
- * @desc 强制使用 String#startsWith 和 String#endsWith 替代其他等效方法
804
- * @descEN Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings
805
- * @see https://typescript-eslint.io/rules/prefer-string-starts-ends-with
806
- */
807
- "ts/prefer-string-starts-ends-with": 0,
808
- /**
809
- * @desc 要求返回 Promise 的函数或方法标记为 async
810
- * @descEN Require any function or method that returns a Promise to be marked async
811
- * @see https://typescript-eslint.io/rules/promise-function-async
812
- */
813
- "ts/promise-function-async": 0,
814
- /**
815
- * @desc 强制 get 类型应可赋值给其对应的 set 类型
816
- * @descEN Enforce that get() types should be assignable to their equivalent set() type
817
- * @see https://typescript-eslint.io/rules/related-getter-setter-pairs
818
- */
819
- "ts/related-getter-setter-pairs": 2,
820
- /**
821
- * @desc 要求 Array#sort 调用始终提供 compareFunction
822
- * @descEN Require Array#sort calls to always provide a compareFunction
823
- * @see https://typescript-eslint.io/rules/require-array-sort-compare
824
- */
825
- "ts/require-array-sort-compare": 0,
826
- /**
827
- * @desc 禁止没有 await 表达式的异步函数
828
- * @descEN Disallow async functions which do not have await expression
829
- * @see https://typescript-eslint.io/rules/require-await
830
- */
831
- "ts/require-await": 0,
832
- /**
833
- * @desc 要求加法运算的两个操作数类型相同
834
- * @descEN Require both operands of addition to be the same type and be bigint, number, or string
835
- * @see https://typescript-eslint.io/rules/restrict-plus-operands
836
- */
837
- "ts/restrict-plus-operands": 0,
838
- /**
839
- * @desc 强制模板字面量表达式为 string 类型
840
- * @descEN Enforce template literal expressions to be of string type
841
- * @see https://typescript-eslint.io/rules/restrict-template-expressions
842
- */
843
- "ts/restrict-template-expressions": 0,
844
- /**
845
- * @desc 强制一致等待返回的 Promise
846
- * @descEN Enforce consistent awaiting of returned promises
847
- * @see https://typescript-eslint.io/rules/return-await
848
- */
849
- "ts/return-await": 0,
850
- /**
851
- * @desc 禁止布尔表达式中的某些类型
852
- * @descEN Disallow certain types in boolean expressions
853
- * @see https://typescript-eslint.io/rules/strict-boolean-expressions
854
- */
855
- "ts/strict-boolean-expressions": 0,
856
- /**
857
- * @desc 要求 switch-case 语句穷尽所有可能
858
- * @descEN Require switch-case statements to be exhaustive
859
- * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check
860
- */
861
- "ts/switch-exhaustiveness-check": 0,
862
- /**
863
- * @desc 禁止某些三斜线指令,推荐使用 ES6 导入声明
864
- * @descEN Disallow certain triple slash directives in favor of ES6-style import declarations
865
- * @see https://typescript-eslint.io/rules/triple-slash-reference
866
- */
867
- "ts/triple-slash-reference": [2, {
868
- path: "never",
869
- types: "always",
870
- lib: "always"
871
- }],
872
- /**
873
- * @desc 要求在特定地方使用类型注解
874
- * @descEN Require type annotations in certain places
875
- * @see https://typescript-eslint.io/rules/typedef
876
- */
877
- "ts/typedef": [2, {
878
- arrayDestructuring: false,
879
- arrowParameter: false,
880
- memberVariableDeclaration: false,
881
- objectDestructuring: false,
882
- parameter: false,
883
- propertyDeclaration: true,
884
- variableDeclaration: false
885
- }],
886
- /**
887
- * @desc 强制未绑定的方法在其预期作用域内调用
888
- * @descEN Enforce unbound methods are called with their expected scope
889
- * @see https://typescript-eslint.io/rules/unbound-method
890
- */
891
- "ts/unbound-method": 0,
892
- /**
893
- * @desc 禁止可以统一为一个的多个重载
894
- * @descEN Disallow two overloads that could be unified into one
895
- * @see https://typescript-eslint.io/rules/unified-signatures
896
- */
897
- "ts/unified-signatures": 0,
898
- /**
899
- * @desc 强制 Promise 拒绝回调中的参数类型为 unknown
900
- * @descEN Enforce typing arguments in Promise rejection callbacks as unknown
901
- * @see https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
902
- */
903
- "ts/use-unknown-in-catch-callback-variable": 0
904
- };
905
- //#endregion
906
- export { core_typescript_default as default };