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