@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,1216 +0,0 @@
1
- //#region src/core.javascript.d.ts
2
- declare const _default: {
3
- /**
4
- * @desc 强制数组回调函数中必须包含 return 语句
5
- * @descEN Enforce return statements in callbacks of array methods
6
- * @see https://eslint.org/docs/latest/rules/array-callback-return
7
- */
8
- "array-callback-return": number;
9
- /**
10
- * @desc 确保构造函数中调用了 super()
11
- * @descEN Require `super()` calls in constructors
12
- * @see https://eslint.org/docs/latest/rules/constructor-super
13
- */
14
- "constructor-super": number;
15
- /**
16
- * @desc 强制 for 循环方向正确
17
- * @descEN Enforce "for" loop update clause moving the counter in the right direction
18
- * @see https://eslint.org/docs/latest/rules/for-direction
19
- */
20
- "for-direction": number;
21
- /**
22
- * @desc 强制 getter 函数中必须有 return 语句
23
- * @descEN Enforce that a getter returns a value
24
- * @see https://eslint.org/docs/latest/rules/getter-return
25
- */
26
- "getter-return": number;
27
- /**
28
- * @desc 禁止使用异步函数作为 Promise 执行器
29
- * @descEN Disallow using an async function as a Promise executor
30
- * @see https://eslint.org/docs/latest/rules/no-async-promise-executor
31
- */
32
- "no-async-promise-executor": number;
33
- /**
34
- * @desc 禁止在循环中使用 await
35
- * @descEN Disallow `await` inside loops
36
- * @see https://eslint.org/docs/latest/rules/no-await-in-loop
37
- */
38
- "no-await-in-loop": number;
39
- /**
40
- * @desc 禁止给类赋值
41
- * @descEN Disallow reassigning class members
42
- * @see https://eslint.org/docs/latest/rules/no-class-assign
43
- */
44
- "no-class-assign": number;
45
- /**
46
- * @desc 禁止与 -0 进行比较
47
- * @descEN Disallow comparing against -0
48
- * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero
49
- */
50
- "no-compare-neg-zero": number;
51
- /**
52
- * @desc 禁止在条件表达式中使用赋值运算符
53
- * @descEN Disallow assignment operators in conditional expressions
54
- * @see https://eslint.org/docs/latest/rules/no-cond-assign
55
- */
56
- "no-cond-assign": number;
57
- /**
58
- * @desc 禁止修改 const 声明的变量
59
- * @descEN Disallow reassigning `const` variables
60
- * @see https://eslint.org/docs/latest/rules/no-const-assign
61
- */
62
- "no-const-assign": number;
63
- /**
64
- * @desc 禁止在常量条件、比较和表达式中出现逻辑错误
65
- * @descEN Disallow expressions where the operation doesn't match the type
66
- * @see https://eslint.org/docs/latest/rules/no-constant-binary-expression
67
- */
68
- "no-constant-binary-expression": number;
69
- /**
70
- * @desc 禁止在条件中使用常量表达式
71
- * @descEN Disallow constant expressions in conditions
72
- * @see https://eslint.org/docs/latest/rules/no-constant-condition
73
- */
74
- "no-constant-condition": number;
75
- /**
76
- * @desc 禁止构造函数中显式 return 值
77
- * @descEN Disallow returning a value from a constructor
78
- * @see https://eslint.org/docs/latest/rules/no-constructor-return
79
- */
80
- "no-constructor-return": number;
81
- /**
82
- * @desc 禁止在正则表达式中使用控制字符
83
- * @descEN Disallow control characters in regular expressions
84
- * @see https://eslint.org/docs/latest/rules/no-control-regex
85
- */
86
- "no-control-regex": number;
87
- /**
88
- * @desc 禁止使用 debugger
89
- * @descEN Disallow the use of `debugger`
90
- * @see https://eslint.org/docs/latest/rules/no-debugger
91
- */
92
- "no-debugger": number;
93
- /**
94
- * @desc 禁止函数参数重复
95
- * @descEN Disallow duplicate arguments in function definitions
96
- * @see https://eslint.org/docs/latest/rules/no-dupe-args
97
- */
98
- "no-dupe-args": number;
99
- /**
100
- * @desc 禁止类成员重复
101
- * @descEN Disallow duplicate class members
102
- * @see https://eslint.org/docs/latest/rules/no-dupe-class-members
103
- */
104
- "no-dupe-class-members": number;
105
- /**
106
- * @desc 禁止 if-else-if 链中出现重复条件
107
- * @descEN Disallow duplicate conditions in if-else-if chains
108
- * @see https://eslint.org/docs/latest/rules/no-dupe-else-if
109
- */
110
- "no-dupe-else-if": number;
111
- /**
112
- * @desc 禁止对象字面量中出现重复键
113
- * @descEN Disallow duplicate keys in object literals
114
- * @see https://eslint.org/docs/latest/rules/no-dupe-keys
115
- */
116
- "no-dupe-keys": number;
117
- /**
118
- * @desc 禁止 switch 中出现重复 case
119
- * @descEN Disallow duplicate case labels
120
- * @see https://eslint.org/docs/latest/rules/no-duplicate-case
121
- */
122
- "no-duplicate-case": number;
123
- /**
124
- * @desc 禁止重复导入
125
- * @descEN Disallow duplicate imports
126
- * @see https://eslint.org/docs/latest/rules/no-duplicate-imports
127
- */
128
- "no-duplicate-imports": number;
129
- /**
130
- * @desc 禁止在正则字符类中使用空字符
131
- * @descEN Disallow empty character classes in regular expressions
132
- * @see https://eslint.org/docs/latest/rules/no-empty-character-class
133
- */
134
- "no-empty-character-class": number;
135
- /**
136
- * @desc 禁止解构赋值中出现空模式
137
- * @descEN Disallow empty destructuring patterns
138
- * @see https://eslint.org/docs/latest/rules/no-empty-pattern
139
- */
140
- "no-empty-pattern": number;
141
- /**
142
- * @desc 禁止对 catch 异常参数赋值
143
- * @descEN Disallow reassigning exceptions in `catch` clauses
144
- * @see https://eslint.org/docs/latest/rules/no-ex-assign
145
- */
146
- "no-ex-assign": number;
147
- /**
148
- * @desc 禁止 switch 穿透
149
- * @descEN Disallow fallthrough of `case` statements
150
- * @see https://eslint.org/docs/latest/rules/no-fallthrough
151
- */
152
- "no-fallthrough": number;
153
- /**
154
- * @desc 禁止对函数声明重新赋值
155
- * @descEN Disallow reassigning function declarations
156
- * @see https://eslint.org/docs/latest/rules/no-func-assign
157
- */
158
- "no-func-assign": number;
159
- /**
160
- * @desc 禁止给导入绑定赋值
161
- * @descEN Disallow assigning to imported bindings
162
- * @see https://eslint.org/docs/latest/rules/no-import-assign
163
- */
164
- "no-import-assign": number;
165
- /**
166
- * @desc 禁止在嵌套代码块中声明变量或函数
167
- * @descEN Disallow variable or function declarations in nested blocks
168
- * @see https://eslint.org/docs/latest/rules/no-inner-declarations
169
- */
170
- "no-inner-declarations": number;
171
- /**
172
- * @desc 禁止使用无效的正则表达式
173
- * @descEN Disallow invalid regular expressions in string literals
174
- * @see https://eslint.org/docs/latest/rules/no-invalid-regexp
175
- */
176
- "no-invalid-regexp": number;
177
- /**
178
- * @desc 禁止不规则的空白字符
179
- * @descEN Disallow irregular whitespace characters
180
- * @see https://eslint.org/docs/latest/rules/no-irregular-whitespace
181
- */
182
- "no-irregular-whitespace": (number | {
183
- skipStrings: boolean;
184
- skipComments: boolean;
185
- skipRegExps: boolean;
186
- skipTemplates: boolean;
187
- skipJSXText: boolean;
188
- })[];
189
- /**
190
- * @desc 禁止数字精度丢失
191
- * @descEN Disallow literal numbers that lose precision
192
- * @see https://eslint.org/docs/latest/rules/no-loss-of-precision
193
- */
194
- "no-loss-of-precision": number;
195
- /**
196
- * @desc 禁止误导性的字符类
197
- * @descEN Disallow characters which are made with multiple code points in character class syntax
198
- * @see https://eslint.org/docs/latest/rules/no-misleading-character-class
199
- */
200
- "no-misleading-character-class": number;
201
- /**
202
- * @desc 禁止使用 new 调用非构造函数
203
- * @descEN Disallow `new` operators with global non-constructor functions
204
- * @see https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
205
- */
206
- "no-new-native-nonconstructor": number;
207
- /**
208
- * @desc 禁止对内置全局对象调用
209
- * @descEN Disallow calling global object properties as functions
210
- * @see https://eslint.org/docs/latest/rules/no-obj-calls
211
- */
212
- "no-obj-calls": number;
213
- /**
214
- * @desc 禁止在 Promise 执行器中返回值
215
- * @descEN Disallow returning values from Promise executor functions
216
- * @see https://eslint.org/docs/latest/rules/no-promise-executor-return
217
- */
218
- "no-promise-executor-return": (number | {
219
- allowVoid: boolean;
220
- })[];
221
- /**
222
- * @desc 禁止直接调用对象原型上的方法
223
- * @descEN Disallow calling some `Object.prototype` methods directly on objects
224
- * @see https://eslint.org/docs/latest/rules/no-prototype-builtins
225
- */
226
- "no-prototype-builtins": number;
227
- /**
228
- * @desc 禁止自身赋值
229
- * @descEN Disallow self-assignment
230
- * @see https://eslint.org/docs/latest/rules/no-self-assign
231
- */
232
- "no-self-assign": number;
233
- /**
234
- * @desc 禁止自身比较
235
- * @descEN Disallow self-comparison
236
- * @see https://eslint.org/docs/latest/rules/no-self-compare
237
- */
238
- "no-self-compare": number;
239
- /**
240
- * @desc 禁止 setter 返回值
241
- * @descEN Disallow returning a value from a setter
242
- * @see https://eslint.org/docs/latest/rules/no-setter-return
243
- */
244
- "no-setter-return": number;
245
- /**
246
- * @desc 禁止稀疏数组
247
- * @descEN Disallow sparse arrays
248
- * @see https://eslint.org/docs/latest/rules/no-sparse-arrays
249
- */
250
- "no-sparse-arrays": number;
251
- /**
252
- * @desc 禁止在字符串中使用模板字面量占位符
253
- * @descEN Disallow template literal placeholder syntax in regular strings
254
- * @see https://eslint.org/docs/latest/rules/no-template-curly-in-string
255
- */
256
- "no-template-curly-in-string": number;
257
- /**
258
- * @desc 确保在构造函数中调用 super() 之前不能访问 this
259
- * @descEN Disallow using `this`/`super` before `super()` is called
260
- * @see https://eslint.org/docs/latest/rules/no-this-before-super
261
- */
262
- "no-this-before-super": number;
263
- /**
264
- * @desc 禁止使用未声明的变量
265
- * @descEN Disallow undeclared variables
266
- * @see https://eslint.org/docs/latest/rules/no-undef
267
- */
268
- "no-undef": number;
269
- /**
270
- * @desc 禁止使用可能引起歧义的多行表达式
271
- * @descEN Disallow confusing multiline expressions
272
- * @see https://eslint.org/docs/latest/rules/no-unexpected-multiline
273
- */
274
- "no-unexpected-multiline": number;
275
- /**
276
- * @desc 禁止未修改的循环条件
277
- * @descEN Disallow unmodified loop conditions
278
- * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
279
- */
280
- "no-unmodified-loop-condition": number;
281
- /**
282
- * @desc 禁止无法到达的代码
283
- * @descEN Disallow unreachable code after control flow statements
284
- * @see https://eslint.org/docs/latest/rules/no-unreachable
285
- */
286
- "no-unreachable": number;
287
- /**
288
- * @desc 禁止只有一次迭代的循环
289
- * @descEN Disallow loops with a body that allows only one iteration
290
- * @see https://eslint.org/docs/latest/rules/no-unreachable-loop
291
- */
292
- "no-unreachable-loop": number;
293
- /**
294
- * @desc 禁止不安全的 finally 语句
295
- * @descEN Disallow control flow statements in `finally` blocks
296
- * @see https://eslint.org/docs/latest/rules/no-unsafe-finally
297
- */
298
- "no-unsafe-finally": number;
299
- /**
300
- * @desc 禁止否定运算符与比较运算符混用
301
- * @descEN Disallow negating the left operand of relational operators
302
- * @see https://eslint.org/docs/latest/rules/no-unsafe-negation
303
- */
304
- "no-unsafe-negation": number;
305
- /**
306
- * @desc 禁止对可选链使用不安全的方式
307
- * @descEN Disallow assignments that can lead to `undefined` in optional chaining
308
- * @see https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining
309
- */
310
- "no-unsafe-optional-chaining": number;
311
- /**
312
- * @desc 禁止使用未使用的私有类成员
313
- * @descEN Disallow unused private class members
314
- * @see https://eslint.org/docs/latest/rules/no-unused-private-class-members
315
- */
316
- "no-unused-private-class-members": number;
317
- /**
318
- * @desc 禁止未使用的变量
319
- * @descEN Disallow unused variables
320
- * @see https://eslint.org/docs/latest/rules/no-unused-vars
321
- */
322
- "no-unused-vars": (number | {
323
- vars: string;
324
- args: string;
325
- caughtErrors: string;
326
- varsIgnorePattern: string;
327
- destructuredArrayIgnorePattern: string;
328
- })[];
329
- /**
330
- * @desc 禁止在定义之前使用变量
331
- * @descEN Disallow the use of variables before they are defined
332
- * @see https://eslint.org/docs/latest/rules/no-use-before-define
333
- */
334
- "no-use-before-define": (number | {
335
- functions: boolean;
336
- classes: boolean;
337
- variables: boolean;
338
- allowNamedExports: boolean;
339
- })[];
340
- /**
341
- * @desc 禁止无用的赋值
342
- * @descEN Disallow useless assignments
343
- * @see https://eslint.org/docs/latest/rules/no-useless-assignment
344
- */
345
- "no-useless-assignment": number;
346
- /**
347
- * @desc 禁止正则表达式中无用的反向引用
348
- * @descEN Disallow useless backreferences in regular expressions
349
- * @see https://eslint.org/docs/latest/rules/no-useless-backreference
350
- */
351
- "no-useless-backreference": number;
352
- /**
353
- * @desc 要求原子更新
354
- * @descEN Require calls to `await` in atomic update expressions
355
- * @see https://eslint.org/docs/latest/rules/require-atomic-updates
356
- */
357
- "require-atomic-updates": (number | {
358
- allowProperties: boolean;
359
- })[];
360
- /**
361
- * @desc 强制使用 isNaN() 检查 NaN
362
- * @descEN Require calls to `isNaN()` when checking for `NaN`
363
- * @see https://eslint.org/docs/latest/rules/use-isnan
364
- */
365
- "use-isnan": number;
366
- /**
367
- * @desc 强制 typeof 比较值是有效的字符串
368
- * @descEN Enforce comparing `typeof` expressions against valid strings
369
- * @see https://eslint.org/docs/latest/rules/valid-typeof
370
- */
371
- "valid-typeof": number;
372
- /**
373
- * @desc 强制 getter/setter 成对出现
374
- * @descEN Enforce getter/setter pairs in objects and classes
375
- * @see https://eslint.org/docs/latest/rules/accessor-pairs
376
- */
377
- "accessor-pairs": (number | {
378
- setWithoutGet: boolean;
379
- getWithoutSet: boolean;
380
- })[];
381
- /**
382
- * @desc 强制箭头函数体风格
383
- * @descEN Require or disallow braces around arrow function bodies
384
- * @see https://eslint.org/docs/latest/rules/arrow-body-style
385
- */
386
- "arrow-body-style": number;
387
- /**
388
- * @desc 要求变量声明在块级作用域内
389
- * @descEN Require variables to be declared in the nearest block scope
390
- * @see https://eslint.org/docs/latest/rules/block-scoped-var
391
- */
392
- "block-scoped-var": number;
393
- /**
394
- * @desc 强制驼峰命名规范
395
- * @descEN Enforce camelcase naming convention
396
- * @see https://eslint.org/docs/latest/rules/camelcase
397
- */
398
- camelcase: number;
399
- /**
400
- * @desc 强制注释首字母大小写
401
- * @descEN Enforce capitalization of the first letter of a comment
402
- * @see https://eslint.org/docs/latest/rules/capitalized-comments
403
- */
404
- "capitalized-comments": number;
405
- /**
406
- * @desc 强制类方法使用 this
407
- * @descEN Require class methods to use `this`
408
- * @see https://eslint.org/docs/latest/rules/class-methods-use-this
409
- */
410
- "class-methods-use-this": number;
411
- /**
412
- * @desc 限制代码复杂度
413
- * @descEN Limit cyclomatic complexity
414
- * @see https://eslint.org/docs/latest/rules/complexity
415
- */
416
- complexity: number;
417
- /**
418
- * @desc 要求一致的 return 语句
419
- * @descEN Require `return` statements to either always or never specify values
420
- * @see https://eslint.org/docs/latest/rules/consistent-return
421
- */
422
- "consistent-return": number;
423
- /**
424
- * @desc 强制一致的 this 别名
425
- * @descEN Require or disallow a consistent naming pattern for `this` aliases
426
- * @see https://eslint.org/docs/latest/rules/consistent-this
427
- */
428
- "consistent-this": number;
429
- /**
430
- * @desc 强制花括号风格
431
- * @descEN Require or disallow braces around all control statements
432
- * @see https://eslint.org/docs/latest/rules/curly
433
- */
434
- curly: number;
435
- /**
436
- * @desc 要求 switch 语句中有 default 分支
437
- * @descEN Require `default` case in switch statements
438
- * @see https://eslint.org/docs/latest/rules/default-case
439
- */
440
- "default-case": number;
441
- /**
442
- * @desc 要求 default 分支放在最后
443
- * @descEN Require `default` case to be the last clause in a switch statement
444
- * @see https://eslint.org/docs/latest/rules/default-case-last
445
- */
446
- "default-case-last": number;
447
- /**
448
- * @desc 强制默认参数放在最后
449
- * @descEN Require default parameters to be last
450
- * @see https://eslint.org/docs/latest/rules/default-param-last
451
- */
452
- "default-param-last": number;
453
- /**
454
- * @desc 强制使用点号表示法
455
- * @descEN Require dot notation when possible
456
- * @see https://eslint.org/docs/latest/rules/dot-notation
457
- */
458
- "dot-notation": number;
459
- /**
460
- * @desc 强制使用 === 和 !==
461
- * @descEN Require the use of `===` and `!==`
462
- * @see https://eslint.org/docs/latest/rules/eqeqeq
463
- */
464
- eqeqeq: number;
465
- /**
466
- * @desc 强制函数名与赋值的变量名匹配
467
- * @descEN Require function names to match the name of the variable to which they are assigned
468
- * @see https://eslint.org/docs/latest/rules/func-name-matching
469
- */
470
- "func-name-matching": number;
471
- /**
472
- * @desc 强制命名函数表达式
473
- * @descEN Require or disallow named function expressions
474
- * @see https://eslint.org/docs/latest/rules/func-names
475
- */
476
- "func-names": number;
477
- /**
478
- * @desc 强制函数声明与函数表达式的风格
479
- * @descEN Require or disallow the use of function declarations
480
- * @see https://eslint.org/docs/latest/rules/func-style
481
- */
482
- "func-style": number;
483
- /**
484
- * @desc 强制访问器属性成对出现
485
- * @descEN Require grouped accessor pairs in object literals and classes
486
- * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs
487
- */
488
- "grouped-accessor-pairs": (string | number)[];
489
- /**
490
- * @desc 强制 for-in 循环中需要 if 保护
491
- * @descEN Require `for-in` loops to include an `if` statement
492
- * @see https://eslint.org/docs/latest/rules/guard-for-in
493
- */
494
- "guard-for-in": number;
495
- /**
496
- * @desc 禁止使用指定标识符名称
497
- * @descEN Disallow specified identifier names
498
- * @see https://eslint.org/docs/latest/rules/id-denylist
499
- */
500
- "id-denylist": number;
501
- /**
502
- * @desc 限制标识符长度
503
- * @descEN Limit minimum and maximum identifier lengths
504
- * @see https://eslint.org/docs/latest/rules/id-length
505
- */
506
- "id-length": number;
507
- /**
508
- * @desc 强制标识符命名匹配指定模式
509
- * @descEN Require identifiers to match a specified regular expression
510
- * @see https://eslint.org/docs/latest/rules/id-match
511
- */
512
- "id-match": number;
513
- /**
514
- * @desc 强制变量初始化
515
- * @descEN Require or disallow initialization in variable declarations
516
- * @see https://eslint.org/docs/latest/rules/init-declarations
517
- */
518
- "init-declarations": number;
519
- /**
520
- * @desc 强制使用逻辑赋值运算符
521
- * @descEN Require or disallow logical assignment operators
522
- * @see https://eslint.org/docs/latest/rules/logical-assignment-operators
523
- */
524
- "logical-assignment-operators": number;
525
- /**
526
- * @desc 限制单个文件中的类数量
527
- * @descEN Limit the number of classes per file
528
- * @see https://eslint.org/docs/latest/rules/max-classes-per-file
529
- */
530
- "max-classes-per-file": number;
531
- /**
532
- * @desc 限制代码块嵌套深度
533
- * @descEN Enforce a maximum depth that blocks can be nested
534
- * @see https://eslint.org/docs/latest/rules/max-depth
535
- */
536
- "max-depth": number[];
537
- /**
538
- * @desc 限制文件行数
539
- * @descEN Enforce a maximum number of lines per file
540
- * @see https://eslint.org/docs/latest/rules/max-lines
541
- */
542
- "max-lines": number;
543
- /**
544
- * @desc 限制函数中的行数
545
- * @descEN Enforce a maximum number of lines per function
546
- * @see https://eslint.org/docs/latest/rules/max-lines-per-function
547
- */
548
- "max-lines-per-function": number;
549
- /**
550
- * @desc 限制回调嵌套深度
551
- * @descEN Enforce a maximum depth that callbacks can be nested
552
- * @see https://eslint.org/docs/latest/rules/max-nested-callbacks
553
- */
554
- "max-nested-callbacks": number;
555
- /**
556
- * @desc 限制参数数量
557
- * @descEN Enforce a maximum number of parameters in function definitions
558
- * @see https://eslint.org/docs/latest/rules/max-params
559
- */
560
- "max-params": number;
561
- /**
562
- * @desc 限制函数中的语句数量
563
- * @descEN Enforce a maximum number of statements allowed in function blocks
564
- * @see https://eslint.org/docs/latest/rules/max-statements
565
- */
566
- "max-statements": number;
567
- /**
568
- * @desc 要求构造函数名以大写字母开头
569
- * @descEN Require constructor names to begin with a capital letter
570
- * @see https://eslint.org/docs/latest/rules/new-cap
571
- */
572
- "new-cap": (number | {
573
- capIsNew: boolean;
574
- })[];
575
- /**
576
- * @desc 禁止使用 alert
577
- * @descEN Disallow the use of `alert`, `confirm`, and `prompt`
578
- * @see https://eslint.org/docs/latest/rules/no-alert
579
- */
580
- "no-alert": number;
581
- /**
582
- * @desc 禁止使用 Array 构造函数
583
- * @descEN Disallow `Array` constructors
584
- * @see https://eslint.org/docs/latest/rules/no-array-constructor
585
- */
586
- "no-array-constructor": number;
587
- /**
588
- * @desc 禁止使用位运算符
589
- * @descEN Disallow bitwise operators
590
- * @see https://eslint.org/docs/latest/rules/no-bitwise
591
- */
592
- "no-bitwise": number;
593
- /**
594
- * @desc 禁止使用 caller 或 callee
595
- * @descEN Disallow the use of `arguments.caller` or `arguments.callee`
596
- * @see https://eslint.org/docs/latest/rules/no-caller
597
- */
598
- "no-caller": number;
599
- /**
600
- * @desc 禁止在 case/default 子句中使用词法声明
601
- * @descEN Disallow lexical declarations in case/default clauses
602
- * @see https://eslint.org/docs/latest/rules/no-case-declarations
603
- */
604
- "no-case-declarations": number;
605
- /**
606
- * @desc 禁止使用 console
607
- * @descEN Disallow the use of `console`
608
- * @see https://eslint.org/docs/latest/rules/no-console
609
- */
610
- "no-console": number;
611
- /**
612
- * @desc 禁止使用 continue
613
- * @descEN Disallow the use of `continue`
614
- * @see https://eslint.org/docs/latest/rules/no-continue
615
- */
616
- "no-continue": number;
617
- /**
618
- * @desc 禁止删除变量
619
- * @descEN Disallow deleting variables
620
- * @see https://eslint.org/docs/latest/rules/no-delete-var
621
- */
622
- "no-delete-var": number;
623
- /**
624
- * @desc 禁止使用正则除法标记
625
- * @descEN Disallow division operators which might be confused with regular expressions
626
- * @see https://eslint.org/docs/latest/rules/no-div-regex
627
- */
628
- "no-div-regex": number;
629
- /**
630
- * @desc 禁止在 else 分支中使用 return
631
- * @descEN Disallow `else` blocks after `return` statements in `if` blocks
632
- * @see https://eslint.org/docs/latest/rules/no-else-return
633
- */
634
- "no-else-return": number;
635
- /**
636
- * @desc 禁止空块语句
637
- * @descEN Disallow empty block statements
638
- * @see https://eslint.org/docs/latest/rules/no-empty
639
- */
640
- "no-empty": (number | {
641
- allowEmptyCatch: boolean;
642
- })[];
643
- /**
644
- * @desc 禁止空函数
645
- * @descEN Disallow empty functions
646
- * @see https://eslint.org/docs/latest/rules/no-empty-function
647
- */
648
- "no-empty-function": number;
649
- /**
650
- * @desc 禁止空静态代码块
651
- * @descEN Disallow empty static blocks
652
- * @see https://eslint.org/docs/latest/rules/no-empty-static-block
653
- */
654
- "no-empty-static-block": number;
655
- /**
656
- * @desc 禁止使用 == 与 null 比较
657
- * @descEN Disallow `==` and `!=` comparisons against `null`
658
- * @see https://eslint.org/docs/latest/rules/no-eq-null
659
- */
660
- "no-eq-null": number;
661
- /**
662
- * @desc 禁止使用 eval
663
- * @descEN Disallow the use of `eval()`
664
- * @see https://eslint.org/docs/latest/rules/no-eval
665
- */
666
- "no-eval": number;
667
- /**
668
- * @desc 禁止扩展原生对象
669
- * @descEN Disallow extending native types
670
- * @see https://eslint.org/docs/latest/rules/no-extend-native
671
- */
672
- "no-extend-native": number;
673
- /**
674
- * @desc 禁止不必要的函数绑定
675
- * @descEN Disallow unnecessary calls to `.bind()`
676
- * @see https://eslint.org/docs/latest/rules/no-extra-bind
677
- */
678
- "no-extra-bind": number;
679
- /**
680
- * @desc 禁止不必要的布尔类型转换
681
- * @descEN Disallow unnecessary boolean casts
682
- * @see https://eslint.org/docs/latest/rules/no-extra-boolean-cast
683
- */
684
- "no-extra-boolean-cast": number;
685
- /**
686
- * @desc 禁止不必要的标签
687
- * @descEN Disallow unnecessary labels
688
- * @see https://eslint.org/docs/latest/rules/no-extra-label
689
- */
690
- "no-extra-label": number;
691
- /**
692
- * @desc 禁止对全局对象赋值
693
- * @descEN Disallow assignments to native objects or read-only global variables
694
- * @see https://eslint.org/docs/latest/rules/no-global-assign
695
- */
696
- "no-global-assign": number;
697
- /**
698
- * @desc 禁止隐式类型转换
699
- * @descEN Disallow shorthand type conversions
700
- * @see https://eslint.org/docs/latest/rules/no-implicit-coercion
701
- */
702
- "no-implicit-coercion": (number | {
703
- allow: string[];
704
- })[];
705
- /**
706
- * @desc 禁止隐式全局变量
707
- * @descEN Disallow declarations in the global scope
708
- * @see https://eslint.org/docs/latest/rules/no-implicit-globals
709
- */
710
- "no-implicit-globals": number;
711
- /**
712
- * @desc 禁止隐式 eval
713
- * @descEN Disallow the use of `eval()`-like methods
714
- * @see https://eslint.org/docs/latest/rules/no-implied-eval
715
- */
716
- "no-implied-eval": number;
717
- /**
718
- * @desc 禁止行内注释
719
- * @descEN Disallow inline comments after code
720
- * @see https://eslint.org/docs/latest/rules/no-inline-comments
721
- */
722
- "no-inline-comments": number;
723
- /**
724
- * @desc 禁止无效的 this
725
- * @descEN Disallow use of `this` in contexts where the value of `this` is `undefined`
726
- * @see https://eslint.org/docs/latest/rules/no-invalid-this
727
- */
728
- "no-invalid-this": number;
729
- /**
730
- * @desc 禁止使用 __iterator__
731
- * @descEN Disallow the use of the `__iterator__` property
732
- * @see https://eslint.org/docs/latest/rules/no-iterator
733
- */
734
- "no-iterator": number;
735
- /**
736
- * @desc 禁止 label 与变量同名
737
- * @descEN Disallow labels that share a name with a variable
738
- * @see https://eslint.org/docs/latest/rules/no-label-var
739
- */
740
- "no-label-var": number;
741
- /**
742
- * @desc 禁止使用标签语句
743
- * @descEN Disallow labeled statements
744
- * @see https://eslint.org/docs/latest/rules/no-labels
745
- */
746
- "no-labels": number;
747
- /**
748
- * @desc 禁止不必要的代码块
749
- * @descEN Disallow unnecessary nested blocks
750
- * @see https://eslint.org/docs/latest/rules/no-lone-blocks
751
- */
752
- "no-lone-blocks": number;
753
- /**
754
- * @desc 禁止 if 作为唯一语句的 else 块
755
- * @descEN Disallow `if` statements as the only statement in `else` blocks
756
- * @see https://eslint.org/docs/latest/rules/no-lonely-if
757
- */
758
- "no-lonely-if": number;
759
- /**
760
- * @desc 禁止在循环中使用函数声明
761
- * @descEN Disallow function declarations inside loops
762
- * @see https://eslint.org/docs/latest/rules/no-loop-func
763
- */
764
- "no-loop-func": number;
765
- /**
766
- * @desc 禁止使用魔术数字
767
- * @descEN Disallow magic numbers
768
- * @see https://eslint.org/docs/latest/rules/no-magic-numbers
769
- */
770
- "no-magic-numbers": number;
771
- /**
772
- * @desc 禁止连续赋值
773
- * @descEN Disallow chained assignments
774
- * @see https://eslint.org/docs/latest/rules/no-multi-assign
775
- */
776
- "no-multi-assign": number;
777
- /**
778
- * @desc 禁止多行字符串
779
- * @descEN Disallow multiline strings
780
- * @see https://eslint.org/docs/latest/rules/no-multi-str
781
- */
782
- "no-multi-str": number;
783
- /**
784
- * @desc 禁止否定条件
785
- * @descEN Disallow negated conditions
786
- * @see https://eslint.org/docs/latest/rules/no-negated-condition
787
- */
788
- "no-negated-condition": number;
789
- /**
790
- * @desc 禁止嵌套三元表达式
791
- * @descEN Disallow nested ternary expressions
792
- * @see https://eslint.org/docs/latest/rules/no-nested-ternary
793
- */
794
- "no-nested-ternary": number;
795
- /**
796
- * @desc 禁止使用 new 而不赋值
797
- * @descEN Disallow `new` operators outside of assignments or comparisons
798
- * @see https://eslint.org/docs/latest/rules/no-new
799
- */
800
- "no-new": number;
801
- /**
802
- * @desc 禁止使用 new Function
803
- * @descEN Disallow `new Function()` expressions
804
- * @see https://eslint.org/docs/latest/rules/no-new-func
805
- */
806
- "no-new-func": number;
807
- /**
808
- * @desc 禁止使用原始包装类型
809
- * @descEN Disallow `new` operators with the `String`, `Number`, and `Boolean` objects
810
- * @see https://eslint.org/docs/latest/rules/no-new-wrappers
811
- */
812
- "no-new-wrappers": number;
813
- /**
814
- * @desc 禁止八进制转义符中的无意义数字
815
- * @descEN Disallow `\8` and `\9` escape sequences in string literals
816
- * @see https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape
817
- */
818
- "no-nonoctal-decimal-escape": number;
819
- /**
820
- * @desc 禁止使用 Object 构造函数
821
- * @descEN Disallow `Object` constructors
822
- * @see https://eslint.org/docs/latest/rules/no-object-constructor
823
- */
824
- "no-object-constructor": number;
825
- /**
826
- * @desc 禁止使用八进制字面量
827
- * @descEN Disallow octal literals
828
- * @see https://eslint.org/docs/latest/rules/no-octal
829
- */
830
- "no-octal": number;
831
- /**
832
- * @desc 禁止八进制转义序列
833
- * @descEN Disallow octal escape sequences in string literals
834
- * @see https://eslint.org/docs/latest/rules/no-octal-escape
835
- */
836
- "no-octal-escape": number;
837
- /**
838
- * @desc 禁止重新分配函数参数
839
- * @descEN Disallow reassigning function parameters
840
- * @see https://eslint.org/docs/latest/rules/no-param-reassign
841
- */
842
- "no-param-reassign": number;
843
- /**
844
- * @desc 禁止使用 ++ 和 --
845
- * @descEN Disallow the unary operators `++` and `--`
846
- * @see https://eslint.org/docs/latest/rules/no-plusplus
847
- */
848
- "no-plusplus": number;
849
- /**
850
- * @desc 禁止使用 __proto__
851
- * @descEN Disallow the use of the `__proto__` property
852
- * @see https://eslint.org/docs/latest/rules/no-proto
853
- */
854
- "no-proto": number;
855
- /**
856
- * @desc 禁止重复声明变量
857
- * @descEN Disallow variable redeclaration
858
- * @see https://eslint.org/docs/latest/rules/no-redeclare
859
- */
860
- "no-redeclare": number;
861
- /**
862
- * @desc 禁止正则表达式中的空格
863
- * @descEN Disallow multiple spaces in regular expression literals
864
- * @see https://eslint.org/docs/latest/rules/no-regex-spaces
865
- */
866
- "no-regex-spaces": number;
867
- /**
868
- * @desc 禁止受限的导出名称
869
- * @descEN Disallow specified names in exports
870
- * @see https://eslint.org/docs/latest/rules/no-restricted-exports
871
- */
872
- "no-restricted-exports": number;
873
- /**
874
- * @desc 禁止受限的全局变量
875
- * @descEN Disallow specified global variables
876
- * @see https://eslint.org/docs/latest/rules/no-restricted-globals
877
- */
878
- "no-restricted-globals": number;
879
- /**
880
- * @desc 禁止受限的导入
881
- * @descEN Disallow specified modules when loaded by `import`
882
- * @see https://eslint.org/docs/latest/rules/no-restricted-imports
883
- */
884
- "no-restricted-imports": number;
885
- /**
886
- * @desc 禁止受限的属性
887
- * @descEN Disallow certain properties on certain objects
888
- * @see https://eslint.org/docs/latest/rules/no-restricted-properties
889
- */
890
- "no-restricted-properties": number;
891
- /**
892
- * @desc 禁止受限的语法
893
- * @descEN Disallow specified syntax
894
- * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
895
- */
896
- "no-restricted-syntax": number;
897
- /**
898
- * @desc 强制 return 赋值
899
- * @descEN Disallow assignment in `return` statements
900
- * @see https://eslint.org/docs/latest/rules/no-return-assign
901
- */
902
- "no-return-assign": (string | number)[];
903
- /**
904
- * @desc 禁止使用 javascript: URL
905
- * @descEN Disallow `javascript:` URLs
906
- * @see https://eslint.org/docs/latest/rules/no-script-url
907
- */
908
- "no-script-url": number;
909
- /**
910
- * @desc 禁止使用逗号表达式
911
- * @descEN Disallow comma operators
912
- * @see https://eslint.org/docs/latest/rules/no-sequences
913
- */
914
- "no-sequences": number;
915
- /**
916
- * @desc 禁止变量声明覆盖外层作用域
917
- * @descEN Disallow variable declarations from shadowing outer scope variables
918
- * @see https://eslint.org/docs/latest/rules/no-shadow
919
- */
920
- "no-shadow": number;
921
- /**
922
- * @desc 禁止遮蔽受限的标识符
923
- * @descEN Disallow identifiers from shadowing restricted names
924
- * @see https://eslint.org/docs/latest/rules/no-shadow-restricted-names
925
- */
926
- "no-shadow-restricted-names": number;
927
- /**
928
- * @desc 禁止使用三元表达式
929
- * @descEN Disallow ternary operators
930
- * @see https://eslint.org/docs/latest/rules/no-ternary
931
- */
932
- "no-ternary": number;
933
- /**
934
- * @desc 禁止抛出字面量
935
- * @descEN Disallow throwing literals as exceptions
936
- * @see https://eslint.org/docs/latest/rules/no-throw-literal
937
- */
938
- "no-throw-literal": number;
939
- /**
940
- * @desc 禁止将 undefined 赋值给变量
941
- * @descEN Disallow initializing variables to `undefined`
942
- * @see https://eslint.org/docs/latest/rules/no-undef-init
943
- */
944
- "no-undef-init": number;
945
- /**
946
- * @desc 禁止使用 undefined
947
- * @descEN Disallow the use of `undefined` as an identifier
948
- * @see https://eslint.org/docs/latest/rules/no-undefined
949
- */
950
- "no-undefined": number;
951
- /**
952
- * @desc 禁止标识符有前导或尾随下划线
953
- * @descEN Disallow dangling underscores in identifiers
954
- * @see https://eslint.org/docs/latest/rules/no-underscore-dangle
955
- */
956
- "no-underscore-dangle": number;
957
- /**
958
- * @desc 禁止不必要的三元表达式
959
- * @descEN Disallow ternary operators when simpler alternatives exist
960
- * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary
961
- */
962
- "no-unneeded-ternary": number;
963
- /**
964
- * @desc 禁止未使用的表达式
965
- * @descEN Disallow unused expressions
966
- * @see https://eslint.org/docs/latest/rules/no-unused-expressions
967
- */
968
- "no-unused-expressions": (number | {
969
- ignoreDirectives: boolean;
970
- allowShortCircuit: boolean;
971
- })[];
972
- /**
973
- * @desc 禁止未使用的标签
974
- * @descEN Disallow unused labels
975
- * @see https://eslint.org/docs/latest/rules/no-unused-labels
976
- */
977
- "no-unused-labels": number;
978
- /**
979
- * @desc 禁止不必要的函数调用
980
- * @descEN Disallow unnecessary calls to `.call()` and `.apply()`
981
- * @see https://eslint.org/docs/latest/rules/no-useless-call
982
- */
983
- "no-useless-call": number;
984
- /**
985
- * @desc 禁止不必要的 catch 语句
986
- * @descEN Disallow unnecessary `catch` clauses
987
- * @see https://eslint.org/docs/latest/rules/no-useless-catch
988
- */
989
- "no-useless-catch": number;
990
- /**
991
- * @desc 禁止不必要的计算属性键
992
- * @descEN Disallow unnecessary computed property keys
993
- * @see https://eslint.org/docs/latest/rules/no-useless-computed-key
994
- */
995
- "no-useless-computed-key": number;
996
- /**
997
- * @desc 禁止无用的字符串拼接
998
- * @descEN Disallow unnecessary concatenation of literals or template literals
999
- * @see https://eslint.org/docs/latest/rules/no-useless-concat
1000
- */
1001
- "no-useless-concat": number;
1002
- /**
1003
- * @desc 禁止无用的构造函数
1004
- * @descEN Disallow unnecessary constructors
1005
- * @see https://eslint.org/docs/latest/rules/no-useless-constructor
1006
- */
1007
- "no-useless-constructor": number;
1008
- /**
1009
- * @desc 禁止不必要的转义
1010
- * @descEN Disallow unnecessary escape characters
1011
- * @see https://eslint.org/docs/latest/rules/no-useless-escape
1012
- */
1013
- "no-useless-escape": number;
1014
- /**
1015
- * @desc 禁止不必要的重命名
1016
- * @descEN Disallow renaming import/export/destructured assignments
1017
- * @see https://eslint.org/docs/latest/rules/no-useless-rename
1018
- */
1019
- "no-useless-rename": number;
1020
- /**
1021
- * @desc 禁止多余的 return
1022
- * @descEN Disallow redundant return statements
1023
- * @see https://eslint.org/docs/latest/rules/no-useless-return
1024
- */
1025
- "no-useless-return": number;
1026
- /**
1027
- * @desc 禁止使用 var
1028
- * @descEN Require `let` or `const` instead of `var`
1029
- * @see https://eslint.org/docs/latest/rules/no-var
1030
- */
1031
- "no-var": number;
1032
- /**
1033
- * @desc 禁止使用 void
1034
- * @descEN Disallow the use of `void` operators
1035
- * @see https://eslint.org/docs/latest/rules/no-void
1036
- */
1037
- "no-void": number;
1038
- /**
1039
- * @desc 禁止警告注释
1040
- * @descEN Disallow specified warning terms in comments
1041
- * @see https://eslint.org/docs/latest/rules/no-warning-comments
1042
- */
1043
- "no-warning-comments": number;
1044
- /**
1045
- * @desc 禁止使用 with
1046
- * @descEN Disallow `with` statements
1047
- * @see https://eslint.org/docs/latest/rules/no-with
1048
- */
1049
- "no-with": number;
1050
- /**
1051
- * @desc 强制对象字面量简写语法
1052
- * @descEN Require or disallow object literal shorthand syntax
1053
- * @see https://eslint.org/docs/latest/rules/object-shorthand
1054
- */
1055
- "object-shorthand": number;
1056
- /**
1057
- * @desc 强制变量声明风格
1058
- * @descEN Enforce the use of `let` or `const` or `var` per declaration
1059
- * @see https://eslint.org/docs/latest/rules/one-var
1060
- */
1061
- "one-var": (string | number)[];
1062
- /**
1063
- * @desc 强制使用复合赋值运算符
1064
- * @descEN Require or disallow assignment operator shorthand
1065
- * @see https://eslint.org/docs/latest/rules/operator-assignment
1066
- */
1067
- "operator-assignment": number;
1068
- /**
1069
- * @desc 强制使用箭头函数作为回调
1070
- * @descEN Require using arrow functions for callbacks
1071
- * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
1072
- */
1073
- "prefer-arrow-callback": number;
1074
- /**
1075
- * @desc 优先使用 const
1076
- * @descEN Require `const` declarations for variables that are never reassigned
1077
- * @see https://eslint.org/docs/latest/rules/prefer-const
1078
- */
1079
- "prefer-const": number;
1080
- /**
1081
- * @desc 优先使用解构赋值
1082
- * @descEN Require destructuring from arrays and/or objects
1083
- * @see https://eslint.org/docs/latest/rules/prefer-destructuring
1084
- */
1085
- "prefer-destructuring": number;
1086
- /**
1087
- * @desc 优先使用指数运算符
1088
- * @descEN Disallow the use of `Math.pow()` in favor of `**`
1089
- * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator
1090
- */
1091
- "prefer-exponentiation-operator": number;
1092
- /**
1093
- * @desc 优先使用命名捕获组
1094
- * @descEN Require named capture groups in regular expressions
1095
- * @see https://eslint.org/docs/latest/rules/prefer-named-capture-group
1096
- */
1097
- "prefer-named-capture-group": number;
1098
- /**
1099
- * @desc 优先使用数字字面量
1100
- * @descEN Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals
1101
- * @see https://eslint.org/docs/latest/rules/prefer-numeric-literals
1102
- */
1103
- "prefer-numeric-literals": number;
1104
- /**
1105
- * @desc 优先使用 Object.hasOwn
1106
- * @descEN Disallow `Object.prototype.hasOwnProperty.call()` in favor of `Object.hasOwn()`
1107
- * @see https://eslint.org/docs/latest/rules/prefer-object-has-own
1108
- */
1109
- "prefer-object-has-own": number;
1110
- /**
1111
- * @desc 优先使用对象展开运算符
1112
- * @descEN Disallow using `Object.assign()` with an object literal as the first argument
1113
- * @see https://eslint.org/docs/latest/rules/prefer-object-spread
1114
- */
1115
- "prefer-object-spread": number;
1116
- /**
1117
- * @desc 优先使用 Promise.reject() 抛出错误
1118
- * @descEN Require using Error objects as Promise rejection reasons
1119
- * @see https://eslint.org/docs/latest/rules/prefer-promise-reject-errors
1120
- */
1121
- "prefer-promise-reject-errors": number;
1122
- /**
1123
- * @desc 优先使用正则字面量
1124
- * @descEN Disallow use of the `RegExp` constructor in favor of regular expression literals
1125
- * @see https://eslint.org/docs/latest/rules/prefer-regex-literals
1126
- */
1127
- "prefer-regex-literals": number;
1128
- /**
1129
- * @desc 优先使用剩余参数
1130
- * @descEN Require rest parameters instead of `arguments`
1131
- * @see https://eslint.org/docs/latest/rules/prefer-rest-params
1132
- */
1133
- "prefer-rest-params": number;
1134
- /**
1135
- * @desc 优先使用展开语法
1136
- * @descEN Require spread operators instead of `.apply()`
1137
- * @see https://eslint.org/docs/latest/rules/prefer-spread
1138
- */
1139
- "prefer-spread": number;
1140
- /**
1141
- * @desc 优先使用模板字符串
1142
- * @descEN Require template literals instead of string concatenation
1143
- * @see https://eslint.org/docs/latest/rules/prefer-template
1144
- */
1145
- "prefer-template": number;
1146
- /**
1147
- * @desc 强制使用 parseInt 时指定基数
1148
- * @descEN Require the use of the second argument in `parseInt()`
1149
- * @see https://eslint.org/docs/latest/rules/radix
1150
- */
1151
- radix: number;
1152
- /**
1153
- * @desc 禁用不必要的 await
1154
- * @descEN Disallow `await` inside of `async` functions when there is no useful work
1155
- * @see https://eslint.org/docs/latest/rules/require-await
1156
- */
1157
- "require-await": number;
1158
- /**
1159
- * @desc 强制在正则表达式中使用 u 或 v 标志
1160
- * @descEN Require the use of the `u` or `v` flag in regular expressions
1161
- * @see https://eslint.org/docs/latest/rules/require-unicode-regexp
1162
- */
1163
- "require-unicode-regexp": number;
1164
- /**
1165
- * @desc 要求 generator 函数中有 yield
1166
- * @descEN Require `yield` statements in generator functions
1167
- * @see https://eslint.org/docs/latest/rules/require-yield
1168
- */
1169
- "require-yield": number;
1170
- /**
1171
- * @desc 强制 import 排序
1172
- * @descEN Enforce sorted import declarations
1173
- * @see https://eslint.org/docs/latest/rules/sort-imports
1174
- */
1175
- "sort-imports": number;
1176
- /**
1177
- * @desc 强制对象键排序
1178
- * @descEN Require object keys to be sorted
1179
- * @see https://eslint.org/docs/latest/rules/sort-keys
1180
- */
1181
- "sort-keys": number;
1182
- /**
1183
- * @desc 强制变量排序
1184
- * @descEN Require variables within the same declaration block to be sorted
1185
- * @see https://eslint.org/docs/latest/rules/sort-vars
1186
- */
1187
- "sort-vars": number;
1188
- /**
1189
- * @desc 强制严格模式
1190
- * @descEN Require or disallow strict mode directives
1191
- * @see https://eslint.org/docs/latest/rules/strict
1192
- */
1193
- strict: number;
1194
- /**
1195
- * @desc 要求 Symbol 描述
1196
- * @descEN Require symbol descriptions
1197
- * @see https://eslint.org/docs/latest/rules/symbol-description
1198
- */
1199
- "symbol-description": number;
1200
- /**
1201
- * @desc 要求 var 声明在作用域顶部
1202
- * @descEN Require `var` declarations to be placed at the top of their containing scope
1203
- * @see https://eslint.org/docs/latest/rules/vars-on-top
1204
- */
1205
- "vars-on-top": number;
1206
- /**
1207
- * @desc 强制比较运算符风格
1208
- * @descEN Require or disallow "yoda" conditions
1209
- * @see https://eslint.org/docs/latest/rules/yoda
1210
- */
1211
- yoda: (string | number | {
1212
- onlyEquality: boolean;
1213
- })[];
1214
- };
1215
- //#endregion
1216
- export { _default as default };