@pawover/kit 0.4.2 → 0.6.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 (74) hide show
  1. package/package.json +166 -29
  2. package/packages/eslint-rules/dist/core.antfu.cjs +78 -0
  3. package/packages/eslint-rules/dist/core.antfu.d.cts +1 -0
  4. package/packages/eslint-rules/dist/core.antfu.d.ts +74 -0
  5. package/packages/eslint-rules/dist/core.antfu.js +79 -0
  6. package/packages/eslint-rules/dist/core.imports.cjs +59 -0
  7. package/packages/eslint-rules/dist/core.imports.d.cts +1 -0
  8. package/packages/eslint-rules/dist/core.imports.d.ts +61 -0
  9. package/packages/eslint-rules/dist/core.imports.js +59 -0
  10. package/packages/eslint-rules/dist/core.importsSort.cjs +7 -0
  11. package/packages/eslint-rules/dist/core.importsSort.d.cts +1 -0
  12. package/packages/eslint-rules/dist/core.importsSort.d.ts +7 -0
  13. package/packages/eslint-rules/dist/core.importsSort.js +7 -0
  14. package/packages/eslint-rules/dist/core.javascript.cjs +1208 -0
  15. package/packages/eslint-rules/dist/core.javascript.d.cts +1 -0
  16. package/packages/eslint-rules/dist/core.javascript.d.ts +1216 -0
  17. package/packages/eslint-rules/dist/core.javascript.js +1208 -0
  18. package/packages/eslint-rules/dist/core.react.cjs +551 -0
  19. package/packages/eslint-rules/dist/core.react.d.cts +1 -0
  20. package/packages/eslint-rules/dist/core.react.d.ts +551 -0
  21. package/packages/eslint-rules/dist/core.react.js +551 -0
  22. package/packages/eslint-rules/dist/core.reactHooks.cjs +107 -0
  23. package/packages/eslint-rules/dist/core.reactHooks.d.cts +1 -0
  24. package/packages/eslint-rules/dist/core.reactHooks.d.ts +107 -0
  25. package/packages/eslint-rules/dist/core.reactHooks.js +107 -0
  26. package/packages/eslint-rules/dist/core.stylistic.cjs +608 -0
  27. package/packages/eslint-rules/dist/core.stylistic.d.cts +1 -0
  28. package/packages/eslint-rules/dist/core.stylistic.d.ts +595 -0
  29. package/packages/eslint-rules/dist/core.stylistic.js +608 -0
  30. package/packages/eslint-rules/dist/core.typescript.cjs +905 -0
  31. package/packages/eslint-rules/dist/core.typescript.d.cts +1 -0
  32. package/packages/eslint-rules/dist/core.typescript.d.ts +917 -0
  33. package/packages/eslint-rules/dist/core.typescript.js +906 -0
  34. package/packages/eslint-rules/dist/core.vue.cjs +312 -0
  35. package/packages/eslint-rules/dist/core.vue.d.cts +1 -0
  36. package/packages/eslint-rules/dist/core.vue.d.ts +293 -0
  37. package/packages/eslint-rules/dist/core.vue.js +313 -0
  38. package/packages/eslint-rules/dist/index.cjs +126 -0
  39. package/packages/eslint-rules/dist/index.d.cts +1 -0
  40. package/packages/eslint-rules/dist/index.d.ts +113 -0
  41. package/packages/eslint-rules/dist/index.js +126 -0
  42. package/packages/eslint-rules/dist/preset-Bk6lxNP0.cjs +107 -0
  43. package/packages/eslint-rules/dist/preset-CQJST7pW.js +102 -0
  44. package/packages/hooks/dist/alova.cjs +53 -0
  45. package/packages/hooks/dist/alova.d.cts +1 -0
  46. package/packages/hooks/dist/index.cjs +0 -0
  47. package/packages/hooks/dist/index.d.cts +1 -0
  48. package/packages/hooks/dist/react.cjs +169 -0
  49. package/packages/hooks/dist/react.d.cts +1 -0
  50. package/packages/hooks/dist/react.d.ts +2 -60
  51. package/packages/hooks/dist/react.js +2 -2441
  52. package/packages/types/dist/index.cjs +0 -0
  53. package/packages/types/dist/index.d.cts +1 -0
  54. package/packages/types/dist/index.d.ts +271 -0
  55. package/packages/types/dist/index.js +0 -0
  56. package/packages/types/dist/react.cjs +0 -0
  57. package/packages/types/dist/react.d.cts +1 -0
  58. package/packages/types/dist/react.d.ts +64 -0
  59. package/packages/types/dist/react.js +0 -0
  60. package/packages/utils/dist/index.cjs +2300 -0
  61. package/packages/utils/dist/index.d.cts +1 -0
  62. package/packages/utils/dist/index.d.ts +156 -2721
  63. package/packages/utils/dist/index.js +122 -35
  64. package/packages/utils/dist/math-BznvO4qI.cjs +1029 -0
  65. package/packages/utils/dist/{math-B5PyWuKn.js → math-DRbCtLQH.js} +31 -27
  66. package/packages/utils/dist/math.cjs +3 -0
  67. package/packages/utils/dist/math.d.cts +1 -0
  68. package/packages/utils/dist/math.d.ts +3 -0
  69. package/packages/utils/dist/math.js +1 -1
  70. package/packages/utils/dist/vite.cjs +44 -0
  71. package/packages/utils/dist/vite.d.cts +1 -0
  72. package/packages/utils/dist/vite.js +12 -8
  73. package/packages/zod/dist/index.cjs +91 -0
  74. package/packages/zod/dist/index.d.cts +1 -0
@@ -0,0 +1,551 @@
1
+ //#region src/core.react.ts
2
+ var core_react_default = {
3
+ /**
4
+ * @desc 验证子组件错误是否使用 Error Boundaries 而非 try/catch
5
+ * @descEN Validates usage of Error Boundaries instead of try/catch for errors in child components
6
+ * @see https://www.eslint-react.xyz/docs/rules/error-boundaries
7
+ */
8
+ "react/error-boundaries": 2,
9
+ /**
10
+ * @desc 验证 useEffect 等 Hooks 的依赖列表完整性
11
+ * @descEN Verifies the list of dependencies for Hooks like useEffect and similar
12
+ * @see https://www.eslint-react.xyz/docs/rules/exhaustive-deps
13
+ */
14
+ "react/exhaustive-deps": 1,
15
+ /**
16
+ * @desc 禁止在 render 期间对全局变量赋值/修改
17
+ * @descEN Validates against assignment/mutation of globals during render
18
+ * @see https://www.eslint-react.xyz/docs/rules/globals
19
+ */
20
+ "react/globals": 0,
21
+ /**
22
+ * @desc 禁止修改 props、state 等不可变值
23
+ * @descEN Validates against mutating props, state, and other values that are immutable
24
+ * @see https://www.eslint-react.xyz/docs/rules/immutability
25
+ */
26
+ "react/immutability": 2,
27
+ /**
28
+ * @desc 禁止在 setState 回调中访问 this.state
29
+ * @descEN Disallows accessing this.state inside setState calls
30
+ * @see https://www.eslint-react.xyz/docs/rules/no-access-state-in-setstate
31
+ */
32
+ "react/no-access-state-in-setstate": 2,
33
+ /**
34
+ * @desc 禁止使用数组索引作为 key
35
+ * @descEN Disallows using an item's index in the array as its key
36
+ * @see https://www.eslint-react.xyz/docs/rules/no-array-index-key
37
+ */
38
+ "react/no-array-index-key": 1,
39
+ /**
40
+ * @desc 禁止使用 Children.count
41
+ * @descEN Disallows the use of Children.count from the react package
42
+ * @see https://www.eslint-react.xyz/docs/rules/no-children-count
43
+ */
44
+ "react/no-children-count": 1,
45
+ /**
46
+ * @desc 禁止使用 Children.forEach
47
+ * @descEN Disallows the use of Children.forEach from the react package
48
+ * @see https://www.eslint-react.xyz/docs/rules/no-children-for-each
49
+ */
50
+ "react/no-children-for-each": 1,
51
+ /**
52
+ * @desc 禁止使用 Children.map
53
+ * @descEN Disallows the use of Children.map from the react package
54
+ * @see https://www.eslint-react.xyz/docs/rules/no-children-map
55
+ */
56
+ "react/no-children-map": 1,
57
+ /**
58
+ * @desc 禁止使用 Children.only
59
+ * @descEN Disallows the use of Children.only from the react package
60
+ * @see https://www.eslint-react.xyz/docs/rules/no-children-only
61
+ */
62
+ "react/no-children-only": 1,
63
+ /**
64
+ * @desc 禁止使用 Children.toArray
65
+ * @descEN Disallows the use of Children.toArray from the react package
66
+ * @see https://www.eslint-react.xyz/docs/rules/no-children-to-array
67
+ */
68
+ "react/no-children-to-array": 1,
69
+ /**
70
+ * @desc 禁止使用类组件(错误边界除外)
71
+ * @descEN Disallows class components except for error boundaries
72
+ * @see https://www.eslint-react.xyz/docs/rules/no-class-component
73
+ */
74
+ "react/no-class-component": 2,
75
+ /**
76
+ * @desc 禁止使用 cloneElement
77
+ * @descEN Disallows cloneElement
78
+ * @see https://www.eslint-react.xyz/docs/rules/no-clone-element
79
+ */
80
+ "react/no-clone-element": 1,
81
+ /**
82
+ * @desc 禁止使用 componentWillMount,替换为 UNSAFE_componentWillMount
83
+ * @descEN Replaces usage of componentWillMount with UNSAFE_componentWillMount
84
+ * @see https://www.eslint-react.xyz/docs/rules/no-component-will-mount
85
+ */
86
+ "react/no-component-will-mount": 2,
87
+ /**
88
+ * @desc 禁止使用 componentWillReceiveProps,替换为 UNSAFE_componentWillReceiveProps
89
+ * @descEN Replaces usage of componentWillReceiveProps with UNSAFE_componentWillReceiveProps
90
+ * @see https://www.eslint-react.xyz/docs/rules/no-component-will-receive-props
91
+ */
92
+ "react/no-component-will-receive-props": 2,
93
+ /**
94
+ * @desc 禁止使用 componentWillUpdate,替换为 UNSAFE_componentWillUpdate
95
+ * @descEN Replaces usage of componentWillUpdate with UNSAFE_componentWillUpdate
96
+ * @see https://www.eslint-react.xyz/docs/rules/no-component-will-update
97
+ */
98
+ "react/no-component-will-update": 2,
99
+ /**
100
+ * @desc 禁止使用 Context.Provider,替换为 Context
101
+ * @descEN Replaces usage of Context.Provider with Context
102
+ * @see https://www.eslint-react.xyz/docs/rules/no-context-provider
103
+ */
104
+ "react/no-context-provider": 2,
105
+ /**
106
+ * @desc 禁止在函数组件中使用 createRef
107
+ * @descEN Disallows createRef in function components
108
+ * @see https://www.eslint-react.xyz/docs/rules/no-create-ref
109
+ */
110
+ "react/no-create-ref": 2,
111
+ /**
112
+ * @desc 禁止直接修改 this.state
113
+ * @descEN Disallows direct mutation of this.state
114
+ * @see https://www.eslint-react.xyz/docs/rules/no-direct-mutation-state
115
+ */
116
+ "react/no-direct-mutation-state": 2,
117
+ /**
118
+ * @desc 防止渲染列表时兄弟元素存在重复 key
119
+ * @descEN Prevents duplicate key props on sibling elements when rendering lists
120
+ * @see https://www.eslint-react.xyz/docs/rules/no-duplicate-key
121
+ */
122
+ "react/no-duplicate-key": 1,
123
+ /**
124
+ * @desc 禁止使用 forwardRef,改为将 ref 作为 prop 传递
125
+ * @descEN Replaces usage of forwardRef with passing ref as a prop
126
+ * @see https://www.eslint-react.xyz/docs/rules/no-forward-ref
127
+ */
128
+ "react/no-forward-ref": 2,
129
+ /**
130
+ * @desc 防止隐式传递 children prop
131
+ * @descEN Prevents implicitly passing the children prop to components
132
+ * @see https://www.eslint-react.xyz/docs/rules/no-implicit-children
133
+ */
134
+ "react/no-implicit-children": 0,
135
+ /**
136
+ * @desc 防止隐式传递 key prop
137
+ * @descEN Prevents implicitly passing the key prop to components
138
+ * @see https://www.eslint-react.xyz/docs/rules/no-implicit-key
139
+ */
140
+ "react/no-implicit-key": 1,
141
+ /**
142
+ * @desc 防止隐式传递 ref prop
143
+ * @descEN Prevents implicitly passing the ref prop to components
144
+ * @see https://www.eslint-react.xyz/docs/rules/no-implicit-ref
145
+ */
146
+ "react/no-implicit-ref": 1,
147
+ /**
148
+ * @desc 防止有问题的泄漏值被渲染
149
+ * @descEN Prevents problematic leaked values from being rendered
150
+ * @see https://www.eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
151
+ */
152
+ "react/no-leaked-conditional-rendering": 2,
153
+ /**
154
+ * @desc 要求所有组件都有 displayName
155
+ * @descEN Enforces that all components have a displayName that can be used in DevTools
156
+ * @see https://www.eslint-react.xyz/docs/rules/no-missing-component-display-name
157
+ */
158
+ "react/no-missing-component-display-name": 1,
159
+ /**
160
+ * @desc 要求所有 context 都有 displayName
161
+ * @descEN Enforces that all contexts have a displayName that can be used in DevTools
162
+ * @see https://www.eslint-react.xyz/docs/rules/no-missing-context-display-name
163
+ */
164
+ "react/no-missing-context-display-name": 1,
165
+ /**
166
+ * @desc 禁止列表渲染中缺少 key
167
+ * @descEN Disallows missing key on items in list rendering
168
+ * @see https://www.eslint-react.xyz/docs/rules/no-missing-key
169
+ */
170
+ "react/no-missing-key": 2,
171
+ /**
172
+ * @desc 防止错误使用 captureOwnerStack
173
+ * @descEN Prevents incorrect usage of captureOwnerStack
174
+ * @see https://www.eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
175
+ */
176
+ "react/no-misused-capture-owner-stack": 2,
177
+ /**
178
+ * @desc 禁止在其他组件内部嵌套定义组件
179
+ * @descEN Disallows nesting component definitions inside other components
180
+ * @see https://www.eslint-react.xyz/docs/rules/no-nested-component-definitions
181
+ */
182
+ "react/no-nested-component-definitions": 2,
183
+ /**
184
+ * @desc 禁止在其他组件或 hooks 内嵌套 lazy 组件声明
185
+ * @descEN Disallows nesting lazy component declarations inside other components or hooks
186
+ * @see https://www.eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
187
+ */
188
+ "react/no-nested-lazy-component-declarations": 2,
189
+ /**
190
+ * @desc 禁止在 componentDidMount 中调用 setState
191
+ * @descEN Disallows calling this.setState in componentDidMount outside functions such as callbacks
192
+ * @see https://www.eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
193
+ */
194
+ "react/no-set-state-in-component-did-mount": 2,
195
+ /**
196
+ * @desc 禁止在 componentDidUpdate 中调用 setState
197
+ * @descEN Disallows calling this.setState in componentDidUpdate outside functions such as callbacks
198
+ * @see https://www.eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
199
+ */
200
+ "react/no-set-state-in-component-did-update": 2,
201
+ /**
202
+ * @desc 禁止在 componentWillUpdate 中调用 setState
203
+ * @descEN Disallows calling this.setState in componentWillUpdate outside functions such as callbacks
204
+ * @see https://www.eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
205
+ */
206
+ "react/no-set-state-in-component-will-update": 2,
207
+ /**
208
+ * @desc 要求以 use 为前缀的函数体内至少使用一个 Hook
209
+ * @descEN Enforces that a function with the use prefix uses at least one Hook inside it
210
+ * @see https://www.eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
211
+ */
212
+ "react/no-unnecessary-use-prefix": 2,
213
+ /**
214
+ * @desc 警告使用 UNSAFE_componentWillMount
215
+ * @descEN Warns about the use of UNSAFE_componentWillMount in class components
216
+ * @see https://www.eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
217
+ */
218
+ "react/no-unsafe-component-will-mount": 2,
219
+ /**
220
+ * @desc 警告使用 UNSAFE_componentWillReceiveProps
221
+ * @descEN Warns about the use of UNSAFE_componentWillReceiveProps in class components
222
+ * @see https://www.eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
223
+ */
224
+ "react/no-unsafe-component-will-receive-props": 2,
225
+ /**
226
+ * @desc 警告使用 UNSAFE_componentWillUpdate
227
+ * @descEN Warns about the use of UNSAFE_componentWillUpdate in class components
228
+ * @see https://www.eslint-react.xyz/docs/rules/no-unsafe-component-will-update
229
+ */
230
+ "react/no-unsafe-component-will-update": 2,
231
+ /**
232
+ * @desc 防止非稳定值作为 Context.Provider 的 value
233
+ * @descEN Prevents non-stable values from being used as a value for Context.Provider
234
+ * @see https://www.eslint-react.xyz/docs/rules/no-unstable-context-value
235
+ */
236
+ "react/no-unstable-context-value": 2,
237
+ /**
238
+ * @desc 防止引用类型值用作对象解构的默认 props
239
+ * @descEN Prevents using referential-type values as default props in object destructuring
240
+ * @see https://www.eslint-react.xyz/docs/rules/no-unstable-default-props
241
+ */
242
+ "react/no-unstable-default-props": 2,
243
+ /**
244
+ * @desc 警告未使用的类组件方法和属性
245
+ * @descEN Warns about unused class component methods and properties
246
+ * @see https://www.eslint-react.xyz/docs/rules/no-unused-class-component-members
247
+ */
248
+ "react/no-unused-class-component-members": 1,
249
+ /**
250
+ * @desc 警告已定义但从未使用的组件 props
251
+ * @descEN Warns about component props that are defined but never used
252
+ * @see https://www.eslint-react.xyz/docs/rules/no-unused-props
253
+ */
254
+ "react/no-unused-props": 1,
255
+ /**
256
+ * @desc 将 useContext 替换为 use
257
+ * @descEN Replaces usage of useContext with use
258
+ * @see https://www.eslint-react.xyz/docs/rules/no-use-context
259
+ */
260
+ "react/no-use-context": 2,
261
+ /**
262
+ * @desc 验证组件和 hooks 在 render 期间不调用已知的不纯函数
263
+ * @descEN Validates that components and hooks are pure by checking that they do not call known-impure functions during render
264
+ * @see https://www.eslint-react.xyz/docs/rules/purity
265
+ */
266
+ "react/purity": 2,
267
+ /**
268
+ * @desc 验证 ref 的正确使用,禁止在 render 期间读写 ref.current
269
+ * @descEN Validates correct usage of refs by checking that ref.current is not read or written during render
270
+ * @see https://www.eslint-react.xyz/docs/rules/refs
271
+ */
272
+ "react/refs": 2,
273
+ /**
274
+ * @desc 强制 Hooks 规则
275
+ * @descEN Enforces the Rules of Hooks
276
+ * @see https://www.eslint-react.xyz/docs/rules/rules-of-hooks
277
+ */
278
+ "react/rules-of-hooks": 2,
279
+ /**
280
+ * @desc 禁止在 effect 中同步设置状态
281
+ * @descEN Validates against setting state synchronously in an effect
282
+ * @see https://www.eslint-react.xyz/docs/rules/set-state-in-effect
283
+ */
284
+ "react/set-state-in-effect": 2,
285
+ /**
286
+ * @desc 禁止在 render 期间无条件设置状态
287
+ * @descEN Validates against unconditionally setting state during render
288
+ * @see https://www.eslint-react.xyz/docs/rules/set-state-in-render
289
+ */
290
+ "react/set-state-in-render": 2,
291
+ /**
292
+ * @desc 验证组件是静态的,不会在每次 render 时重建
293
+ * @descEN Validates that components are static, not recreated every render
294
+ * @see https://www.eslint-react.xyz/docs/rules/static-components
295
+ */
296
+ "react/static-components": 2,
297
+ /**
298
+ * @desc 验证 React Compiler 不支持的语法
299
+ * @descEN Validates against syntax that React Compiler does not support
300
+ * @see https://www.eslint-react.xyz/docs/rules/unsupported-syntax
301
+ */
302
+ "react/unsupported-syntax": 2,
303
+ /**
304
+ * @desc 验证 useMemo 的回调返回一个值
305
+ * @descEN Validates that useMemo is called with a callback that returns a value
306
+ * @see https://www.eslint-react.xyz/docs/rules/use-memo
307
+ */
308
+ "react/use-memo": 2,
309
+ /**
310
+ * @desc 强制正确使用 useState,包括解构和对称命名
311
+ * @descEN Enforces correct usage of useState, including destructuring, symmetric naming of the value and setter
312
+ * @see https://www.eslint-react.xyz/docs/rules/use-state
313
+ */
314
+ "react/use-state": 2,
315
+ /**
316
+ * @desc 禁止将 children 作为 prop 传递
317
+ * @descEN Disallows passing children as a prop
318
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-children-prop
319
+ */
320
+ "react/jsx-no-children-prop": 0,
321
+ /**
322
+ * @desc 禁止同时将 children 作为 prop 与嵌套内容传递
323
+ * @descEN Disallows passing children as a prop when children are also passed as nested content
324
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-children-prop-with-children
325
+ */
326
+ "react/jsx-no-children-prop-with-children": 2,
327
+ /**
328
+ * @desc 防止注释字符串被意外插入 JSX 文本节点
329
+ * @descEN Prevents comment strings from being accidentally inserted into a JSX element's text nodes
330
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
331
+ */
332
+ "react/jsx-no-comment-textnodes": 1,
333
+ /**
334
+ * @desc 防止展开操作符后使用 key 导致自动 JSX 运行时去优化
335
+ * @descEN Prevent patterns that cause deoptimization when using the automatic JSX runtime
336
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-key-after-spread
337
+ */
338
+ "react/jsx-no-key-after-spread": 2,
339
+ /**
340
+ * @desc 捕获 JSX 中从模板字符串复制遗留的 $ 符号
341
+ * @descEN Catches $ before {expr} in JSX — typically from template literal ${expr} being copy-pasted into JSX
342
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-leaked-dollar
343
+ */
344
+ "react/jsx-no-leaked-dollar": 2,
345
+ /**
346
+ * @desc 捕获 JSX 文本节点开头的分号
347
+ * @descEN Catches ; at the start of JSX text nodes — typically from accidentally placing a statement-ending ; inside JSX
348
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-leaked-semicolon
349
+ */
350
+ "react/jsx-no-leaked-semicolon": 2,
351
+ /**
352
+ * @desc 禁止 JSX 命名空间语法
353
+ * @descEN Disallow JSX namespace syntax, as React does not support them
354
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-namespace
355
+ */
356
+ "react/jsx-no-namespace": 2,
357
+ /**
358
+ * @desc 禁止无用的 Fragment 元素
359
+ * @descEN Disallows useless fragment elements
360
+ * @see https://www.eslint-react.xyz/docs/rules/jsx-no-useless-fragment
361
+ */
362
+ "react/jsx-no-useless-fragment": 2,
363
+ /**
364
+ * @desc 验证和转换 React Client/Server 函数定义
365
+ * @descEN Validates and transforms React Client/Server Function definitions
366
+ * @see https://www.eslint-react.xyz/docs/rules/rsc-function-definition
367
+ */
368
+ "react/rsc-function-definition": 0,
369
+ /**
370
+ * @desc 禁止 DOM 元素使用 dangerouslySetInnerHTML
371
+ * @descEN Disallows DOM elements from using dangerouslySetInnerHTML
372
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
373
+ */
374
+ "react/dom-no-dangerously-set-innerhtml": 1,
375
+ /**
376
+ * @desc 禁止同时使用 dangerouslySetInnerHTML 和 children
377
+ * @descEN Disallows DOM elements from using dangerouslySetInnerHTML and children at the same time
378
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
379
+ */
380
+ "react/dom-no-dangerously-set-innerhtml-with-children": 2,
381
+ /**
382
+ * @desc 禁止使用 findDOMNode
383
+ * @descEN Disallows findDOMNode
384
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-find-dom-node
385
+ */
386
+ "react/dom-no-find-dom-node": 2,
387
+ /**
388
+ * @desc 禁止使用 flushSync
389
+ * @descEN Disallows flushSync
390
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-flush-sync
391
+ */
392
+ "react/dom-no-flush-sync": 2,
393
+ /**
394
+ * @desc 禁止使用 ReactDOM.hydrate,替换为 hydrateRoot
395
+ * @descEN Replaces usage of ReactDOM.hydrate with hydrateRoot
396
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-hydrate
397
+ */
398
+ "react/dom-no-hydrate": 2,
399
+ /**
400
+ * @desc 要求 button 元素使用显式 type 属性
401
+ * @descEN Enforces an explicit type attribute for button elements
402
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-missing-button-type
403
+ */
404
+ "react/dom-no-missing-button-type": 1,
405
+ /**
406
+ * @desc 要求 iframe 元素使用显式 sandbox 属性
407
+ * @descEN Enforces an explicit sandbox attribute for iframe elements
408
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
409
+ */
410
+ "react/dom-no-missing-iframe-sandbox": 1,
411
+ /**
412
+ * @desc 禁止使用 ReactDOM.render,替换为 createRoot
413
+ * @descEN Replaces usage of ReactDOM.render with createRoot(node).render
414
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-render
415
+ */
416
+ "react/dom-no-render": 2,
417
+ /**
418
+ * @desc 禁止使用 ReactDOM.render 的返回值
419
+ * @descEN Disallows the return value of ReactDOM.render
420
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-render-return-value
421
+ */
422
+ "react/dom-no-render-return-value": 2,
423
+ /**
424
+ * @desc 禁止使用 javascript: URL 作为属性值
425
+ * @descEN Disallows javascript: URLs as attribute values
426
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-script-url
427
+ */
428
+ "react/dom-no-script-url": 1,
429
+ /**
430
+ * @desc 禁止使用字符串 style prop,应使用对象
431
+ * @descEN Disallows the use of string style prop in JSX. Use an object instead
432
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-string-style-prop
433
+ */
434
+ "react/dom-no-string-style-prop": 2,
435
+ /**
436
+ * @desc 禁止未知的 DOM 属性
437
+ * @descEN Disallows unknown DOM properties
438
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-unknown-property
439
+ */
440
+ "react/dom-no-unknown-property": 2,
441
+ /**
442
+ * @desc 强制 iframe 的 sandbox 属性不能设置为不安全组合
443
+ * @descEN Enforces that the sandbox attribute for iframe elements is not set to unsafe combinations
444
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
445
+ */
446
+ "react/dom-no-unsafe-iframe-sandbox": 1,
447
+ /**
448
+ * @desc 禁止 target=_blank 缺少 rel=noreferrer noopener
449
+ * @descEN Disallows target=_blank without rel=noreferrer noopener
450
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
451
+ */
452
+ "react/dom-no-unsafe-target-blank": 1,
453
+ /**
454
+ * @desc 禁止使用 useFormState,替换为 useActionState
455
+ * @descEN Replaces usage of useFormState with useActionState
456
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-use-form-state
457
+ */
458
+ "react/dom-no-use-form-state": 2,
459
+ /**
460
+ * @desc 禁止在 void DOM 元素中使用 children
461
+ * @descEN Disallows children in void DOM elements
462
+ * @see https://www.eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
463
+ */
464
+ "react/dom-no-void-elements-with-children": 2,
465
+ /**
466
+ * @desc 要求 addEventListener 有对应的 removeEventListener
467
+ * @descEN Enforces that every addEventListener has a corresponding removeEventListener
468
+ * @see https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
469
+ */
470
+ "react/web-api-no-leaked-event-listener": 2,
471
+ /**
472
+ * @desc 要求 fetch 有对应的 AbortController 中止
473
+ * @descEN Enforces that every fetch has a corresponding AbortController abort in the cleanup function
474
+ * @see https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
475
+ */
476
+ "react/web-api-no-leaked-fetch": 2,
477
+ /**
478
+ * @desc 要求 setInterval 有对应的 clearInterval
479
+ * @descEN Enforces that every setInterval has a corresponding clearInterval
480
+ * @see https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-interval
481
+ */
482
+ "react/web-api-no-leaked-interval": 2,
483
+ /**
484
+ * @desc 要求 ResizeObserver 有对应的 disconnect
485
+ * @descEN Enforces that every ResizeObserver created has a corresponding disconnect
486
+ * @see https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
487
+ */
488
+ "react/web-api-no-leaked-resize-observer": 2,
489
+ /**
490
+ * @desc 要求 setTimeout 有对应的 clearTimeout
491
+ * @descEN Enforces that every setTimeout has a corresponding clearTimeout
492
+ * @see https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
493
+ */
494
+ "react/web-api-no-leaked-timeout": 2,
495
+ /**
496
+ * @desc 要求 IntersectionObserver 有对应的 disconnect
497
+ * @descEN Enforces that every IntersectionObserver created has a corresponding disconnect
498
+ * @see https://www.eslint-react.xyz/docs/rules/web-api-no-leaked-intersection-observer
499
+ */
500
+ "react/web-api-no-leaked-intersection-observer": 2,
501
+ /**
502
+ * @desc 强制 context 名称为有效组件名并以 Context 结尾
503
+ * @descEN Enforces the context name to be a valid component name with the suffix Context
504
+ * @see https://www.eslint-react.xyz/docs/rules/naming-convention-context-name
505
+ */
506
+ "react/naming-convention-context-name": 2,
507
+ /**
508
+ * @desc 强制 useId 赋值的标识符命名为 id 或以 Id 结尾
509
+ * @descEN Enforces identifier names assigned from useId calls to be either id or end with Id
510
+ * @see https://www.eslint-react.xyz/docs/rules/naming-convention-id-name
511
+ */
512
+ "react/naming-convention-id-name": 2,
513
+ /**
514
+ * @desc 强制 useRef 赋值的标识符命名为 ref 或以 Ref 结尾
515
+ * @descEN Enforces identifier names assigned from useRef calls to be either ref or end with Ref
516
+ * @see https://www.eslint-react.xyz/docs/rules/naming-convention-ref-name
517
+ */
518
+ "react/naming-convention-ref-name": 2,
519
+ /**
520
+ * @desc 以 JSON 格式报告所有函数组件
521
+ * @descEN Reports all function components in JSON format
522
+ * @see https://www.eslint-react.xyz/docs/rules/debug-function-component
523
+ */
524
+ "react/debug-function-component": 0,
525
+ /**
526
+ * @desc 以 JSON 格式报告所有 Hooks
527
+ * @descEN Reports all React Hooks in JSON format
528
+ * @see https://www.eslint-react.xyz/docs/rules/debug-hook
529
+ */
530
+ "react/debug-hook": 0,
531
+ /**
532
+ * @desc 以 JSON 格式报告所有从 React 初始化的标识符
533
+ * @descEN Reports all identifiers initialized from React in JSON format
534
+ * @see https://www.eslint-react.xyz/docs/rules/debug-is-from-react
535
+ */
536
+ "react/debug-is-from-react": 0,
537
+ /**
538
+ * @desc 以 JSON 格式报告所有从 ref 初始化或派生的标识符
539
+ * @descEN Reports all identifiers initialized or derived from refs in JSON format
540
+ * @see https://www.eslint-react.xyz/docs/rules/debug-is-from-ref
541
+ */
542
+ "react/debug-is-from-ref": 0,
543
+ /**
544
+ * @desc 以 JSON 格式报告所有 JSX 元素和片段
545
+ * @descEN Reports all JSX elements and fragments in JSON format
546
+ * @see https://www.eslint-react.xyz/docs/rules/debug-jsx
547
+ */
548
+ "react/debug-jsx": 0
549
+ };
550
+ //#endregion
551
+ export { core_react_default as default };
@@ -0,0 +1,107 @@
1
+ //#region src/core.reactHooks.ts
2
+ var core_reactHooks_default = {
3
+ /**
4
+ * @desc 验证 Hooks 依赖数组包含所有必要的依赖
5
+ * @descEN Validates that dependency arrays for React hooks contain all necessary dependencies
6
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/exhaustive-deps
7
+ */
8
+ "react-hooks/exhaustive-deps": 0,
9
+ /**
10
+ * @desc 验证组件和 hooks 遵循 Hooks 规则
11
+ * @descEN Validates that components and hooks follow the Rules of Hooks
12
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/rules-of-hooks
13
+ */
14
+ "react-hooks/rules-of-hooks": 0,
15
+ /**
16
+ * @desc 验证定义嵌套组件或 hooks 的高阶函数
17
+ * @descEN Validates higher order functions defining nested components or hooks
18
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/component-hook-factories
19
+ */
20
+ "react-hooks/component-hook-factories": 0,
21
+ /**
22
+ * @desc 验证编译器配置选项
23
+ * @descEN Validates the compiler configuration options
24
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/config
25
+ */
26
+ "react-hooks/config": 2,
27
+ /**
28
+ * @desc 验证子组件错误是否使用 Error Boundaries
29
+ * @descEN Validates usage of Error Boundaries instead of try/catch for child errors
30
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/error-boundaries
31
+ */
32
+ "react-hooks/error-boundaries": 0,
33
+ /**
34
+ * @desc 验证 gating 模式的配置
35
+ * @descEN Validates configuration of gating mode
36
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/gating
37
+ */
38
+ "react-hooks/gating": 2,
39
+ /**
40
+ * @desc 禁止在 render 期间对全局变量赋值/修改
41
+ * @descEN Validates against assignment/mutation of globals during render
42
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/globals
43
+ */
44
+ "react-hooks/globals": 2,
45
+ /**
46
+ * @desc 禁止修改 props、state 等不可变值
47
+ * @descEN Validates against mutating props, state, and other immutable values
48
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/immutability
49
+ */
50
+ "react-hooks/immutability": 0,
51
+ /**
52
+ * @desc 禁止使用与记忆化不兼容的库
53
+ * @descEN Validates against usage of libraries which are incompatible with memoization
54
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/incompatible-library
55
+ */
56
+ "react-hooks/incompatible-library": 2,
57
+ /**
58
+ * @desc 验证现有手动的记忆化被编译器保留
59
+ * @descEN Validates that existing manual memoization is preserved by the compiler
60
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/preserve-manual-memoization
61
+ */
62
+ "react-hooks/preserve-manual-memoization": 2,
63
+ /**
64
+ * @desc 验证组件和 hooks 不调用已知的不纯函数
65
+ * @descEN Validates that components/hooks are pure by checking known-impure functions
66
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/purity
67
+ */
68
+ "react-hooks/purity": 0,
69
+ /**
70
+ * @desc 验证 ref 的正确使用,禁止在 render 期间读写 ref.current
71
+ * @descEN Validates correct usage of refs, not reading/writing during render
72
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/refs
73
+ */
74
+ "react-hooks/refs": 0,
75
+ /**
76
+ * @desc 禁止在 effect 中同步调用 setState
77
+ * @descEN Validates against calling setState synchronously in an effect
78
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-effect
79
+ */
80
+ "react-hooks/set-state-in-effect": 0,
81
+ /**
82
+ * @desc 禁止在 render 期间设置状态
83
+ * @descEN Validates against setting state during render
84
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-render
85
+ */
86
+ "react-hooks/set-state-in-render": 0,
87
+ /**
88
+ * @desc 验证组件是静态的,不会在每次 render 时重建
89
+ * @descEN Validates that components are static, not recreated every render
90
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/static-components
91
+ */
92
+ "react-hooks/static-components": 0,
93
+ /**
94
+ * @desc 验证 React Compiler 不支持的语法
95
+ * @descEN Validates against syntax that React Compiler does not support
96
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/unsupported-syntax
97
+ */
98
+ "react-hooks/unsupported-syntax": 0,
99
+ /**
100
+ * @desc 验证 useMemo 回调的使用是否没有返回值
101
+ * @descEN Validates usage of the useMemo hook without a return value
102
+ * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/use-memo
103
+ */
104
+ "react-hooks/use-memo": 0
105
+ };
106
+ //#endregion
107
+ module.exports = core_reactHooks_default;
@@ -0,0 +1 @@
1
+ export type * from './core.reactHooks.d.ts'