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