@eslint-react/core 2.7.4-next.1 → 2.7.4-next.10

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 (3) hide show
  1. package/dist/index.d.ts +131 -132
  2. package/dist/index.js +135 -130
  3. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -1,12 +1,84 @@
1
1
  import * as AST from "@eslint-react/ast";
2
2
  import { unit } from "@eslint-react/eff";
3
- import { RegExpLike, RuleContext } from "@eslint-react/shared";
4
3
  import { TSESTree } from "@typescript-eslint/types";
4
+ import { RegExpLike, RuleContext } from "@eslint-react/shared";
5
5
  import { ESLintUtils, TSESTree as TSESTree$1 } from "@typescript-eslint/utils";
6
6
  import * as birecord0 from "birecord";
7
7
  import { Scope } from "@typescript-eslint/scope-manager";
8
8
  import * as typescript0 from "typescript";
9
9
 
10
+ //#region src/api/is-from-react.d.ts
11
+ /**
12
+ * Checks if a variable is initialized or derived from React import
13
+ * @param name The variable name
14
+ * @param initialScope The initial scope
15
+ * @param importSource Alternative import source of React (e.g., "preact/compat")
16
+ * @returns True if the variable is initialized or derived from React import
17
+ */
18
+ declare function isInitializedFromReact(name: string, initialScope: Scope, importSource?: string): boolean;
19
+ //#endregion
20
+ //#region src/api/is-from-react-native.d.ts
21
+ /**
22
+ * Checks if a variable is initialized from React Native import
23
+ * @param name The variable name
24
+ * @param initialScope The initial scope
25
+ * @param importSource Alternative import source of React Native (e.g., "react-native-web")
26
+ * @returns True if the variable is initialized from React Native import
27
+ */
28
+ declare function isInitializedFromReactNative(name: string, initialScope: Scope, importSource?: string): boolean;
29
+ //#endregion
30
+ //#region src/api/is-react-api.d.ts
31
+ declare namespace isReactAPI {
32
+ type ReturnType = {
33
+ (context: RuleContext, node: unit | null | TSESTree.Node): node is TSESTree.Identifier | TSESTree.MemberExpression;
34
+ (context: RuleContext): (node: unit | null | TSESTree.Node) => node is TSESTree.MemberExpression | TSESTree.Identifier;
35
+ };
36
+ }
37
+ /**
38
+ * Checks if the node is a React API identifier or member expression
39
+ * @param api The React API name to check against (e.g., "useState", "React.memo")
40
+ * @returns A predicate function to check if a node matches the API
41
+ */
42
+ declare function isReactAPI(api: string): isReactAPI.ReturnType;
43
+ declare namespace isReactAPICall {
44
+ type ReturnType = {
45
+ (context: RuleContext, node: unit | null | TSESTree.Node): node is TSESTree.CallExpression;
46
+ (context: RuleContext): (node: unit | null | TSESTree.Node) => node is TSESTree.CallExpression;
47
+ };
48
+ }
49
+ /**
50
+ * Checks if the node is a call expression to a specific React API
51
+ * @param api The React API name to check against
52
+ * @returns A predicate function to check if a node is a call to the API
53
+ */
54
+ declare function isReactAPICall(api: string): isReactAPICall.ReturnType;
55
+ declare const isCaptureOwnerStack: isReactAPI.ReturnType;
56
+ declare const isChildrenCount: isReactAPI.ReturnType;
57
+ declare const isChildrenForEach: isReactAPI.ReturnType;
58
+ declare const isChildrenMap: isReactAPI.ReturnType;
59
+ declare const isChildrenOnly: isReactAPI.ReturnType;
60
+ declare const isChildrenToArray: isReactAPI.ReturnType;
61
+ declare const isCloneElement: isReactAPI.ReturnType;
62
+ declare const isCreateContext: isReactAPI.ReturnType;
63
+ declare const isCreateElement: isReactAPI.ReturnType;
64
+ declare const isCreateRef: isReactAPI.ReturnType;
65
+ declare const isForwardRef: isReactAPI.ReturnType;
66
+ declare const isMemo: isReactAPI.ReturnType;
67
+ declare const isLazy: isReactAPI.ReturnType;
68
+ declare const isCaptureOwnerStackCall: isReactAPICall.ReturnType;
69
+ declare const isChildrenCountCall: isReactAPICall.ReturnType;
70
+ declare const isChildrenForEachCall: isReactAPICall.ReturnType;
71
+ declare const isChildrenMapCall: isReactAPICall.ReturnType;
72
+ declare const isChildrenOnlyCall: isReactAPICall.ReturnType;
73
+ declare const isChildrenToArrayCall: isReactAPICall.ReturnType;
74
+ declare const isCloneElementCall: isReactAPICall.ReturnType;
75
+ declare const isCreateContextCall: isReactAPICall.ReturnType;
76
+ declare const isCreateElementCall: isReactAPICall.ReturnType;
77
+ declare const isCreateRefCall: isReactAPICall.ReturnType;
78
+ declare const isForwardRefCall: isReactAPICall.ReturnType;
79
+ declare const isMemoCall: isReactAPICall.ReturnType;
80
+ declare const isLazyCall: isReactAPICall.ReturnType;
81
+ //#endregion
10
82
  //#region src/component/component-detection-hint.d.ts
11
83
  type ComponentDetectionHint = bigint;
12
84
  /**
@@ -14,28 +86,28 @@ type ComponentDetectionHint = bigint;
14
86
  */
15
87
  declare const ComponentDetectionHint: {
16
88
  /**
17
- * Skip function component defined on object method
18
- */
89
+ * Skip function component defined on object method
90
+ */
19
91
  readonly SkipObjectMethod: bigint;
20
92
  /**
21
- * Skip function component defined on class method
22
- */
93
+ * Skip function component defined on class method
94
+ */
23
95
  readonly SkipClassMethod: bigint;
24
96
  /**
25
- * Skip function component defined on class property
26
- */
97
+ * Skip function component defined on class property
98
+ */
27
99
  readonly SkipClassProperty: bigint;
28
100
  /**
29
- * Skip function component defined in array pattern
30
- */
101
+ * Skip function component defined in array pattern
102
+ */
31
103
  readonly SkipArrayPattern: bigint;
32
104
  /**
33
- * Skip function component defined in array expression
34
- */
105
+ * Skip function component defined in array expression
106
+ */
35
107
  readonly SkipArrayExpression: bigint;
36
108
  /**
37
- * Skip function component defined as array map callback
38
- */
109
+ * Skip function component defined as array map callback
110
+ */
39
111
  readonly SkipArrayMapCallback: bigint;
40
112
  readonly None: 0n;
41
113
  readonly SkipUndefined: bigint;
@@ -98,48 +170,48 @@ declare const ComponentFlag: {
98
170
  */
99
171
  interface FunctionComponent extends SemanticNode {
100
172
  /**
101
- * The identifier or identifier sequence of the component
102
- */
173
+ * The identifier or identifier sequence of the component
174
+ */
103
175
  id: unit | AST.FunctionID;
104
176
  /**
105
- * The kind of component
106
- */
177
+ * The kind of component
178
+ */
107
179
  kind: "function";
108
180
  /**
109
- * The AST node of the function
110
- */
181
+ * The AST node of the function
182
+ */
111
183
  node: AST.TSESTreeFunction;
112
184
  /**
113
- * Flags describing the component's characteristics
114
- */
185
+ * Flags describing the component's characteristics
186
+ */
115
187
  flag: ComponentFlag;
116
188
  /**
117
- * Hint for how the component was detected
118
- */
189
+ * Hint for how the component was detected
190
+ */
119
191
  hint: ComponentDetectionHint;
120
192
  /**
121
- * List of expressions returned by the component
122
- */
193
+ * List of expressions returned by the component
194
+ */
123
195
  rets: TSESTree.ReturnStatement["argument"][];
124
196
  /**
125
- * The initialization path of the function
126
- */
197
+ * The initialization path of the function
198
+ */
127
199
  initPath: unit | AST.FunctionInitPath;
128
200
  /**
129
- * Indicates if the component is inside an export default declaration
130
- */
201
+ * Indicates if the component is inside an export default declaration
202
+ */
131
203
  isExportDefault: boolean;
132
204
  /**
133
- * Indicates if the component is itself an export default declaration
134
- */
205
+ * Indicates if the component is itself an export default declaration
206
+ */
135
207
  isExportDefaultDeclaration: boolean;
136
208
  /**
137
- * List of hook calls within the component
138
- */
209
+ * List of hook calls within the component
210
+ */
139
211
  hookCalls: TSESTree.CallExpression[];
140
212
  /**
141
- * The display name of the component
142
- */
213
+ * The display name of the component
214
+ */
143
215
  displayName: unit | TSESTree.Expression;
144
216
  }
145
217
  /**
@@ -147,32 +219,32 @@ interface FunctionComponent extends SemanticNode {
147
219
  */
148
220
  interface ClassComponent extends SemanticNode {
149
221
  /**
150
- * The identifier of the component
151
- */
222
+ * The identifier of the component
223
+ */
152
224
  id: unit | TSESTree.BindingName;
153
225
  /**
154
- * The kind of component
155
- */
226
+ * The kind of component
227
+ */
156
228
  kind: "class";
157
229
  /**
158
- * The AST node of the class
159
- */
230
+ * The AST node of the class
231
+ */
160
232
  node: AST.TSESTreeClass;
161
233
  /**
162
- * Flags describing the component's characteristics
163
- */
234
+ * Flags describing the component's characteristics
235
+ */
164
236
  flag: ComponentFlag;
165
237
  /**
166
- * Hint for how the component was detected
167
- */
238
+ * Hint for how the component was detected
239
+ */
168
240
  hint: ComponentDetectionHint;
169
241
  /**
170
- * List of methods and properties in the class
171
- */
242
+ * List of methods and properties in the class
243
+ */
172
244
  methods: AST.TSESTreeMethodOrProperty[];
173
245
  /**
174
- * The display name of the component
175
- */
246
+ * The display name of the component
247
+ */
176
248
  displayName: unit | TSESTree.Expression;
177
249
  }
178
250
  /**
@@ -431,20 +503,6 @@ declare function isComponentWrapperCallback(context: RuleContext, node: TSESTree
431
503
  */
432
504
  declare function isComponentWrapperCallbackLoose(context: RuleContext, node: TSESTree.Node): boolean;
433
505
  //#endregion
434
- //#region src/hierarchy/find-enclosing-assignment-target.d.ts
435
- /**
436
- * Finds the enclosing assignment target (variable, property, etc.) for a given node
437
- *
438
- * @todo Verify correctness and completeness of this function
439
- * @param node The starting node
440
- * @returns The enclosing assignment target node, or undefined if not found
441
- */
442
- declare function findEnclosingAssignmentTarget(node: TSESTree.Node): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.PrivateIdentifier | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldExpression | undefined;
443
- /**
444
- * Type representing the possible assignment targets returned by `findEnclosingAssignmentTarget`
445
- */
446
- type AssignmentTarget = ReturnType<typeof findEnclosingAssignmentTarget>;
447
- //#endregion
448
506
  //#region src/hierarchy/find-enclosing-component-or-hook.d.ts
449
507
  type FindEnclosingComponentOrHookFilter = (n: TSESTree.Node, name: string | null) => boolean;
450
508
  /**
@@ -784,80 +842,21 @@ declare function findParentJsxAttribute(node: TSESTree.Node, test?: (node: TSEST
784
842
  */
785
843
  declare function stringifyJsx(node: TSESTree$1.JSXIdentifier | TSESTree$1.JSXNamespacedName | TSESTree$1.JSXMemberExpression | TSESTree$1.JSXOpeningElement | TSESTree$1.JSXClosingElement | TSESTree$1.JSXOpeningFragment | TSESTree$1.JSXClosingFragment | TSESTree$1.JSXText): string;
786
844
  //#endregion
787
- //#region src/utils/is-from-react.d.ts
845
+ //#region src/ref/is-from-ref.d.ts
788
846
  /**
789
- * Checks if a variable is initialized from React import
847
+ * Checks if the variable with the given name is initialized or derived from a ref
790
848
  * @param name The variable name
791
849
  * @param initialScope The initial scope
792
- * @param importSource Alternative import source of React (e.g., "preact/compat")
793
- * @returns True if the variable is initialized from React import
794
- */
795
- declare function isInitializedFromReact(name: string, initialScope: Scope, importSource?: string): boolean;
796
- //#endregion
797
- //#region src/utils/is-from-react-native.d.ts
798
- /**
799
- * Checks if a variable is initialized from React Native import
800
- * @param name The variable name
801
- * @param initialScope The initial scope
802
- * @param importSource Alternative import source of React Native (e.g., "react-native-web")
803
- * @returns True if the variable is initialized from React Native import
850
+ * @returns True if the variable is derived from a ref, false otherwise
804
851
  */
805
- declare function isInitializedFromReactNative(name: string, initialScope: Scope, importSource?: string): boolean;
806
- //#endregion
807
- //#region src/utils/is-instance-id-equal.d.ts
808
- /** @internal */
809
- declare function isInstanceIdEqual(context: RuleContext, a: TSESTree.Node, b: TSESTree.Node): boolean;
852
+ declare function isInitializedFromRef(name: string, initialScope: Scope): boolean;
810
853
  //#endregion
811
- //#region src/utils/is-react-api.d.ts
812
- declare namespace isReactAPI {
813
- type ReturnType = {
814
- (context: RuleContext, node: unit | null | TSESTree.Node): node is TSESTree.Identifier | TSESTree.MemberExpression;
815
- (context: RuleContext): (node: unit | null | TSESTree.Node) => node is TSESTree.MemberExpression | TSESTree.Identifier;
816
- };
817
- }
818
- /**
819
- * Checks if the node is a React API identifier or member expression
820
- * @param api The React API name to check against (e.g., "useState", "React.memo")
821
- * @returns A predicate function to check if a node matches the API
822
- */
823
- declare function isReactAPI(api: string): isReactAPI.ReturnType;
824
- declare namespace isReactAPICall {
825
- type ReturnType = {
826
- (context: RuleContext, node: unit | null | TSESTree.Node): node is TSESTree.CallExpression;
827
- (context: RuleContext): (node: unit | null | TSESTree.Node) => node is TSESTree.CallExpression;
828
- };
829
- }
854
+ //#region src/ref/ref-name.d.ts
830
855
  /**
831
- * Checks if the node is a call expression to a specific React API
832
- * @param api The React API name to check against
833
- * @returns A predicate function to check if a node is a call to the API
856
+ * Checks if a given name corresponds to a ref name
857
+ * @param name The name to check
858
+ * @returns True if the name is "ref" or ends with "Ref"
834
859
  */
835
- declare function isReactAPICall(api: string): isReactAPICall.ReturnType;
836
- declare const isCaptureOwnerStack: isReactAPI.ReturnType;
837
- declare const isChildrenCount: isReactAPI.ReturnType;
838
- declare const isChildrenForEach: isReactAPI.ReturnType;
839
- declare const isChildrenMap: isReactAPI.ReturnType;
840
- declare const isChildrenOnly: isReactAPI.ReturnType;
841
- declare const isChildrenToArray: isReactAPI.ReturnType;
842
- declare const isCloneElement: isReactAPI.ReturnType;
843
- declare const isCreateContext: isReactAPI.ReturnType;
844
- declare const isCreateElement: isReactAPI.ReturnType;
845
- declare const isCreateRef: isReactAPI.ReturnType;
846
- declare const isForwardRef: isReactAPI.ReturnType;
847
- declare const isMemo: isReactAPI.ReturnType;
848
- declare const isLazy: isReactAPI.ReturnType;
849
- declare const isCaptureOwnerStackCall: isReactAPICall.ReturnType;
850
- declare const isChildrenCountCall: isReactAPICall.ReturnType;
851
- declare const isChildrenForEachCall: isReactAPICall.ReturnType;
852
- declare const isChildrenMapCall: isReactAPICall.ReturnType;
853
- declare const isChildrenOnlyCall: isReactAPICall.ReturnType;
854
- declare const isChildrenToArrayCall: isReactAPICall.ReturnType;
855
- declare const isCloneElementCall: isReactAPICall.ReturnType;
856
- declare const isCreateContextCall: isReactAPICall.ReturnType;
857
- declare const isCreateElementCall: isReactAPICall.ReturnType;
858
- declare const isCreateRefCall: isReactAPICall.ReturnType;
859
- declare const isForwardRefCall: isReactAPICall.ReturnType;
860
- declare const isMemoCall: isReactAPICall.ReturnType;
861
- declare const isLazyCall: isReactAPICall.ReturnType;
860
+ declare function isRefName(name: string): boolean;
862
861
  //#endregion
863
- export { AssignmentTarget, ClassComponent, Component, ComponentDetectionHint, ComponentEffectPhaseKind, ComponentFlag, ComponentKind, ComponentLifecyclePhaseKind, ComponentPhaseKind, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponent, Hook, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, SemanticEntry, SemanticNode, findEnclosingAssignmentTarget, findEnclosingComponentOrHook, findParentJsxAttribute, getComponentFlagFromInitPath, getFunctionComponentId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, getPhaseKindOfFunction, hasNoneOrLooseComponentName, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDefinition, isComponentDidCatch, isComponentDidMount, isComponentDidMountCallback, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUnmountCallback, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInsideComponentOrHook, isInstanceIdEqual, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRender, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
862
+ export { ClassComponent, Component, ComponentDetectionHint, ComponentEffectPhaseKind, ComponentFlag, ComponentKind, ComponentLifecyclePhaseKind, ComponentPhaseKind, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponent, Hook, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, SemanticEntry, SemanticNode, findEnclosingComponentOrHook, findParentJsxAttribute, getComponentFlagFromInitPath, getFunctionComponentId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, getPhaseKindOfFunction, hasNoneOrLooseComponentName, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDefinition, isComponentDidCatch, isComponentDidMount, isComponentDidMountCallback, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUnmountCallback, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInitializedFromRef, isInsideComponentOrHook, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRefName, isRender, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
package/dist/index.js CHANGED
@@ -1,13 +1,101 @@
1
+ import { findImportSource, findProperty, findVariable, getVariableDefinitionNode } from "@eslint-react/var";
1
2
  import * as AST from "@eslint-react/ast";
2
3
  import { constFalse, constTrue, dual, flip, getOrElseUpdate, identity, unit } from "@eslint-react/eff";
3
- import { IdGenerator, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared";
4
4
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
5
- import { findImportSource, findProperty, findVariable, getVariableDefinitionNode, isNodeValueEqual } from "@eslint-react/var";
5
+ import { IdGenerator, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared";
6
6
  import { getStaticValue } from "@typescript-eslint/utils/ast-utils";
7
7
  import { P, match } from "ts-pattern";
8
8
  import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from "@typescript-eslint/utils";
9
9
  import birecord from "birecord";
10
10
 
11
+ //#region src/api/is-from-react.ts
12
+ /**
13
+ * Checks if a variable is initialized or derived from React import
14
+ * @param name The variable name
15
+ * @param initialScope The initial scope
16
+ * @param importSource Alternative import source of React (e.g., "preact/compat")
17
+ * @returns True if the variable is initialized or derived from React import
18
+ */
19
+ function isInitializedFromReact(name, initialScope, importSource = "react") {
20
+ return name.toLowerCase() === "react" || Boolean(findImportSource(name, initialScope)?.startsWith(importSource));
21
+ }
22
+
23
+ //#endregion
24
+ //#region src/api/is-from-react-native.ts
25
+ /**
26
+ * Checks if a variable is initialized from React Native import
27
+ * @param name The variable name
28
+ * @param initialScope The initial scope
29
+ * @param importSource Alternative import source of React Native (e.g., "react-native-web")
30
+ * @returns True if the variable is initialized from React Native import
31
+ */
32
+ function isInitializedFromReactNative(name, initialScope, importSource = "react-native") {
33
+ return [
34
+ "react_native",
35
+ "reactnative",
36
+ "rn"
37
+ ].includes(name.toLowerCase()) || Boolean(findImportSource(name, initialScope)?.startsWith(importSource));
38
+ }
39
+
40
+ //#endregion
41
+ //#region src/api/is-react-api.ts
42
+ /**
43
+ * Checks if the node is a React API identifier or member expression
44
+ * @param api The React API name to check against (e.g., "useState", "React.memo")
45
+ * @returns A predicate function to check if a node matches the API
46
+ */
47
+ function isReactAPI(api) {
48
+ const func = (context, node) => {
49
+ if (node == null) return false;
50
+ const getText = (n) => context.sourceCode.getText(n);
51
+ const name = AST.toStringFormat(node, getText);
52
+ if (name === api) return true;
53
+ if (name.substring(name.indexOf(".") + 1) === api) return true;
54
+ return false;
55
+ };
56
+ return dual(2, func);
57
+ }
58
+ /**
59
+ * Checks if the node is a call expression to a specific React API
60
+ * @param api The React API name to check against
61
+ * @returns A predicate function to check if a node is a call to the API
62
+ */
63
+ function isReactAPICall(api) {
64
+ const func = (context, node) => {
65
+ if (node == null) return false;
66
+ if (node.type !== AST_NODE_TYPES.CallExpression) return false;
67
+ return isReactAPI(api)(context, node.callee);
68
+ };
69
+ return dual(2, func);
70
+ }
71
+ const isCaptureOwnerStack = isReactAPI("captureOwnerStack");
72
+ const isChildrenCount = isReactAPI("Children.count");
73
+ const isChildrenForEach = isReactAPI("Children.forEach");
74
+ const isChildrenMap = isReactAPI("Children.map");
75
+ const isChildrenOnly = isReactAPI("Children.only");
76
+ const isChildrenToArray = isReactAPI("Children.toArray");
77
+ const isCloneElement = isReactAPI("cloneElement");
78
+ const isCreateContext = isReactAPI("createContext");
79
+ const isCreateElement = isReactAPI("createElement");
80
+ const isCreateRef = isReactAPI("createRef");
81
+ const isForwardRef = isReactAPI("forwardRef");
82
+ const isMemo = isReactAPI("memo");
83
+ const isLazy = isReactAPI("lazy");
84
+ const isCaptureOwnerStackCall = isReactAPICall("captureOwnerStack");
85
+ const isChildrenCountCall = isReactAPICall("Children.count");
86
+ const isChildrenForEachCall = isReactAPICall("Children.forEach");
87
+ const isChildrenMapCall = isReactAPICall("Children.map");
88
+ const isChildrenOnlyCall = isReactAPICall("Children.only");
89
+ const isChildrenToArrayCall = isReactAPICall("Children.toArray");
90
+ const isCloneElementCall = isReactAPICall("cloneElement");
91
+ const isCreateContextCall = isReactAPICall("createContext");
92
+ const isCreateElementCall = isReactAPICall("createElement");
93
+ const isCreateRefCall = isReactAPICall("createRef");
94
+ const isForwardRefCall = isReactAPICall("forwardRef");
95
+ const isMemoCall = isReactAPICall("memo");
96
+ const isLazyCall = isReactAPICall("lazy");
97
+
98
+ //#endregion
11
99
  //#region src/hook/hook-name.ts
12
100
  const REACT_BUILTIN_HOOK_NAMES = [
13
101
  "use",
@@ -488,16 +576,16 @@ function isJsxLike(code, node, hint = DEFAULT_JSX_DETECTION_HINT) {
488
576
  if (hint & JsxDetectionHint.StrictLogical) return isJsxLike(code, node.left, hint) && isJsxLike(code, node.right, hint);
489
577
  return isJsxLike(code, node.left, hint) || isJsxLike(code, node.right, hint);
490
578
  case AST_NODE_TYPES.ConditionalExpression: {
491
- function leftHasJSX(node$1) {
492
- if (Array.isArray(node$1.consequent)) {
493
- if (node$1.consequent.length === 0) return !(hint & JsxDetectionHint.SkipEmptyArray);
494
- if (hint & JsxDetectionHint.StrictArray) return node$1.consequent.every((n) => isJsxLike(code, n, hint));
495
- return node$1.consequent.some((n) => isJsxLike(code, n, hint));
579
+ function leftHasJSX(node) {
580
+ if (Array.isArray(node.consequent)) {
581
+ if (node.consequent.length === 0) return !(hint & JsxDetectionHint.SkipEmptyArray);
582
+ if (hint & JsxDetectionHint.StrictArray) return node.consequent.every((n) => isJsxLike(code, n, hint));
583
+ return node.consequent.some((n) => isJsxLike(code, n, hint));
496
584
  }
497
- return isJsxLike(code, node$1.consequent, hint);
585
+ return isJsxLike(code, node.consequent, hint);
498
586
  }
499
- function rightHasJSX(node$1) {
500
- return isJsxLike(code, node$1.alternate, hint);
587
+ function rightHasJSX(node) {
588
+ return isJsxLike(code, node.alternate, hint);
501
589
  }
502
590
  if (hint & JsxDetectionHint.StrictConditional) return leftHasJSX(node) && rightHasJSX(node);
503
591
  return leftHasJSX(node) || rightHasJSX(node);
@@ -576,107 +664,12 @@ function isJsxFragmentElement(context, node, jsxConfig) {
576
664
  * @returns The first matching JSX attribute node found when traversing upwards, or undefined
577
665
  */
578
666
  function findParentJsxAttribute(node, test = constTrue) {
579
- const guard = (node$1) => {
580
- return node$1.type === AST_NODE_TYPES.JSXAttribute && test(node$1);
667
+ const guard = (node) => {
668
+ return node.type === AST_NODE_TYPES.JSXAttribute && test(node);
581
669
  };
582
670
  return AST.findParentNode(node, guard);
583
671
  }
584
672
 
585
- //#endregion
586
- //#region src/utils/is-from-react.ts
587
- /**
588
- * Checks if a variable is initialized from React import
589
- * @param name The variable name
590
- * @param initialScope The initial scope
591
- * @param importSource Alternative import source of React (e.g., "preact/compat")
592
- * @returns True if the variable is initialized from React import
593
- */
594
- function isInitializedFromReact(name, initialScope, importSource = "react") {
595
- return name.toLowerCase() === "react" || Boolean(findImportSource(name, initialScope)?.startsWith(importSource));
596
- }
597
-
598
- //#endregion
599
- //#region src/utils/is-from-react-native.ts
600
- /**
601
- * Checks if a variable is initialized from React Native import
602
- * @param name The variable name
603
- * @param initialScope The initial scope
604
- * @param importSource Alternative import source of React Native (e.g., "react-native-web")
605
- * @returns True if the variable is initialized from React Native import
606
- */
607
- function isInitializedFromReactNative(name, initialScope, importSource = "react-native") {
608
- return [
609
- "react_native",
610
- "reactnative",
611
- "rn"
612
- ].includes(name.toLowerCase()) || Boolean(findImportSource(name, initialScope)?.startsWith(importSource));
613
- }
614
-
615
- //#endregion
616
- //#region src/utils/is-instance-id-equal.ts
617
- /** @internal */
618
- function isInstanceIdEqual(context, a, b) {
619
- return AST.isNodeEqual(a, b) || isNodeValueEqual(a, b, [context.sourceCode.getScope(a), context.sourceCode.getScope(b)]);
620
- }
621
-
622
- //#endregion
623
- //#region src/utils/is-react-api.ts
624
- /**
625
- * Checks if the node is a React API identifier or member expression
626
- * @param api The React API name to check against (e.g., "useState", "React.memo")
627
- * @returns A predicate function to check if a node matches the API
628
- */
629
- function isReactAPI(api) {
630
- const func = (context, node) => {
631
- if (node == null) return false;
632
- const getText = (n) => context.sourceCode.getText(n);
633
- const name = AST.toStringFormat(node, getText);
634
- if (name === api) return true;
635
- if (name.substring(name.indexOf(".") + 1) === api) return true;
636
- return false;
637
- };
638
- return dual(2, func);
639
- }
640
- /**
641
- * Checks if the node is a call expression to a specific React API
642
- * @param api The React API name to check against
643
- * @returns A predicate function to check if a node is a call to the API
644
- */
645
- function isReactAPICall(api) {
646
- const func = (context, node) => {
647
- if (node == null) return false;
648
- if (node.type !== AST_NODE_TYPES.CallExpression) return false;
649
- return isReactAPI(api)(context, node.callee);
650
- };
651
- return dual(2, func);
652
- }
653
- const isCaptureOwnerStack = isReactAPI("captureOwnerStack");
654
- const isChildrenCount = isReactAPI("Children.count");
655
- const isChildrenForEach = isReactAPI("Children.forEach");
656
- const isChildrenMap = isReactAPI("Children.map");
657
- const isChildrenOnly = isReactAPI("Children.only");
658
- const isChildrenToArray = isReactAPI("Children.toArray");
659
- const isCloneElement = isReactAPI("cloneElement");
660
- const isCreateContext = isReactAPI("createContext");
661
- const isCreateElement = isReactAPI("createElement");
662
- const isCreateRef = isReactAPI("createRef");
663
- const isForwardRef = isReactAPI("forwardRef");
664
- const isMemo = isReactAPI("memo");
665
- const isLazy = isReactAPI("lazy");
666
- const isCaptureOwnerStackCall = isReactAPICall("captureOwnerStack");
667
- const isChildrenCountCall = isReactAPICall("Children.count");
668
- const isChildrenForEachCall = isReactAPICall("Children.forEach");
669
- const isChildrenMapCall = isReactAPICall("Children.map");
670
- const isChildrenOnlyCall = isReactAPICall("Children.only");
671
- const isChildrenToArrayCall = isReactAPICall("Children.toArray");
672
- const isCloneElementCall = isReactAPICall("cloneElement");
673
- const isCreateContextCall = isReactAPICall("createContext");
674
- const isCreateElementCall = isReactAPICall("createElement");
675
- const isCreateRefCall = isReactAPICall("createRef");
676
- const isForwardRefCall = isReactAPICall("forwardRef");
677
- const isMemoCall = isReactAPICall("memo");
678
- const isLazyCall = isReactAPICall("lazy");
679
-
680
673
  //#endregion
681
674
  //#region src/component/component-detection-hint.ts
682
675
  /**
@@ -1222,8 +1215,8 @@ function isRenderPropLoose(context, node) {
1222
1215
  * @returns `true` if component is declared inside a render property, `false` if not
1223
1216
  */
1224
1217
  function isDirectValueOfRenderPropertyLoose(node) {
1225
- const matching = (node$1) => {
1226
- return node$1.type === AST_NODE_TYPES.Property && node$1.key.type === AST_NODE_TYPES.Identifier && node$1.key.name.startsWith("render");
1218
+ const matching = (node) => {
1219
+ return node.type === AST_NODE_TYPES.Property && node.key.type === AST_NODE_TYPES.Identifier && node.key.name.startsWith("render");
1227
1220
  };
1228
1221
  return matching(node) || node.parent != null && matching(node.parent);
1229
1222
  }
@@ -1245,26 +1238,6 @@ function isDeclaredInRenderPropLoose(node) {
1245
1238
  return parent.name.type === AST_NODE_TYPES.JSXIdentifier && parent.name.name.startsWith("render");
1246
1239
  }
1247
1240
 
1248
- //#endregion
1249
- //#region src/hierarchy/find-enclosing-assignment-target.ts
1250
- /** eslint-disable jsdoc/require-param */
1251
- /**
1252
- * Finds the enclosing assignment target (variable, property, etc.) for a given node
1253
- *
1254
- * @todo Verify correctness and completeness of this function
1255
- * @param node The starting node
1256
- * @returns The enclosing assignment target node, or undefined if not found
1257
- */
1258
- function findEnclosingAssignmentTarget(node) {
1259
- switch (true) {
1260
- case node.type === AST_NODE_TYPES.VariableDeclarator: return node.id;
1261
- case node.type === AST_NODE_TYPES.AssignmentExpression: return node.left;
1262
- case node.type === AST_NODE_TYPES.PropertyDefinition: return node.key;
1263
- case node.type === AST_NODE_TYPES.BlockStatement || node.type === AST_NODE_TYPES.Program || node.parent === node: return unit;
1264
- default: return findEnclosingAssignmentTarget(node.parent);
1265
- }
1266
- }
1267
-
1268
1241
  //#endregion
1269
1242
  //#region src/hierarchy/find-enclosing-component-or-hook.ts
1270
1243
  /**
@@ -1299,4 +1272,36 @@ function isInsideComponentOrHook(node) {
1299
1272
  }
1300
1273
 
1301
1274
  //#endregion
1302
- export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, findEnclosingAssignmentTarget, findEnclosingComponentOrHook, findParentJsxAttribute, getComponentFlagFromInitPath, getFunctionComponentId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, getPhaseKindOfFunction, hasNoneOrLooseComponentName, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDefinition, isComponentDidCatch, isComponentDidMount, isComponentDidMountCallback, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUnmountCallback, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInsideComponentOrHook, isInstanceIdEqual, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRender, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
1275
+ //#region src/ref/ref-name.ts
1276
+ /**
1277
+ * Checks if a given name corresponds to a ref name
1278
+ * @param name The name to check
1279
+ * @returns True if the name is "ref" or ends with "Ref"
1280
+ */
1281
+ function isRefName(name) {
1282
+ return name === "ref" || name.endsWith("Ref");
1283
+ }
1284
+
1285
+ //#endregion
1286
+ //#region src/ref/is-from-ref.ts
1287
+ /**
1288
+ * Checks if the variable with the given name is initialized or derived from a ref
1289
+ * @param name The variable name
1290
+ * @param initialScope The initial scope
1291
+ * @returns True if the variable is derived from a ref, false otherwise
1292
+ */
1293
+ function isInitializedFromRef(name, initialScope) {
1294
+ for (const { node } of findVariable(initialScope)(name)?.defs ?? []) {
1295
+ if (node.type !== AST_NODE_TYPES$1.VariableDeclarator) continue;
1296
+ const init = node.init;
1297
+ if (init == null) continue;
1298
+ switch (true) {
1299
+ case init.type === AST_NODE_TYPES$1.MemberExpression && init.object.type === AST_NODE_TYPES$1.Identifier && isRefName(init.object.name): return true;
1300
+ case init.type === AST_NODE_TYPES$1.CallExpression && isUseRefCall(init): return true;
1301
+ }
1302
+ }
1303
+ return false;
1304
+ }
1305
+
1306
+ //#endregion
1307
+ export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, findEnclosingComponentOrHook, findParentJsxAttribute, getComponentFlagFromInitPath, getFunctionComponentId, getJsxAttribute, getJsxAttributeName, getJsxConfigFromAnnotation, getJsxConfigFromContext, getJsxElementType, getPhaseKindOfFunction, hasNoneOrLooseComponentName, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDefinition, isComponentDidCatch, isComponentDidMount, isComponentDidMountCallback, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUnmountCallback, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInitializedFromRef, isInsideComponentOrHook, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRefName, isRender, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "2.7.4-next.1",
3
+ "version": "2.7.4-next.10",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -35,13 +35,13 @@
35
35
  "@typescript-eslint/utils": "^8.53.1",
36
36
  "birecord": "^0.1.1",
37
37
  "ts-pattern": "^5.9.0",
38
- "@eslint-react/ast": "2.7.4-next.1",
39
- "@eslint-react/eff": "2.7.4-next.1",
40
- "@eslint-react/shared": "2.7.4-next.1",
41
- "@eslint-react/var": "2.7.4-next.1"
38
+ "@eslint-react/ast": "2.7.4-next.10",
39
+ "@eslint-react/eff": "2.7.4-next.10",
40
+ "@eslint-react/var": "2.7.4-next.10",
41
+ "@eslint-react/shared": "2.7.4-next.10"
42
42
  },
43
43
  "devDependencies": {
44
- "tsdown": "^0.20.0-beta.4",
44
+ "tsdown": "^0.20.1",
45
45
  "@local/configs": "0.0.0"
46
46
  },
47
47
  "peerDependencies": {