@eslint-react/core 2.7.1 → 2.7.2-beta.1

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.
package/dist/index.d.ts CHANGED
@@ -118,9 +118,13 @@ interface FunctionComponent extends SemanticNode {
118
118
  */
119
119
  initPath: unit | AST.FunctionInitPath;
120
120
  /**
121
- * Indicates if the component is exported as default
121
+ * Indicates if the component is inside an export default declaration
122
122
  */
123
123
  isExportDefault: boolean;
124
+ /**
125
+ * Indicates if the component is itself an export default declaration
126
+ */
127
+ isExportDefaultDeclaration: boolean;
124
128
  /**
125
129
  * List of hook calls within the component
126
130
  */
@@ -176,6 +180,7 @@ type FunctionEntry$1 = {
176
180
  isComponent: boolean;
177
181
  isComponentDefinition: boolean;
178
182
  isExportDefault: boolean;
183
+ isExportDefaultDeclaration: boolean;
179
184
  rets: TSESTree.ReturnStatement["argument"][];
180
185
  };
181
186
  declare namespace useComponentCollector {
@@ -263,7 +268,21 @@ declare function isPureComponent(node: TSESTree.Node): boolean;
263
268
  //#region src/component/component-kind.d.ts
264
269
  type ComponentKind = "classComponent" | "functionComponent";
265
270
  //#endregion
266
- //#region src/component/component-method.d.ts
271
+ //#region src/component/component-method-callback.d.ts
272
+ /**
273
+ * Checks if the node is a function of `componentDidMount`
274
+ * @param node The AST node to check
275
+ * @returns `true` if the node is a function of `componentDidMount`
276
+ */
277
+ declare function isComponentDidMountCallback(node: TSESTree.Node): boolean;
278
+ /**
279
+ * Checks if the node is a function of `componentWillUnmount`
280
+ * @param node The AST node to check
281
+ * @returns `true` if the node is a function of `componentWillUnmount`
282
+ */
283
+ declare function isComponentWillUnmountCallback(node: TSESTree.Node): boolean;
284
+ //#endregion
285
+ //#region src/component/component-method-is.d.ts
267
286
  declare const isRender: (node: TSESTree.Node) => node is AST.TSESTreeMethodOrProperty;
268
287
  declare const isComponentDidCatch: (node: TSESTree.Node) => node is AST.TSESTreeMethodOrProperty;
269
288
  declare const isComponentDidMount: (node: TSESTree.Node) => node is AST.TSESTreeMethodOrProperty;
@@ -283,20 +302,6 @@ declare const isGetDefaultProps: (node: TSESTree.Node) => node is AST.TSESTreeMe
283
302
  declare const isGetDerivedStateFromProps: (node: TSESTree.Node) => node is AST.TSESTreeMethodOrProperty;
284
303
  declare const isGetDerivedStateFromError: (node: TSESTree.Node) => node is AST.TSESTreeMethodOrProperty;
285
304
  //#endregion
286
- //#region src/component/component-method-parts.d.ts
287
- /**
288
- * Checks if the node is a function of `componentDidMount`
289
- * @param node The AST node to check
290
- * @returns `true` if the node is a function of `componentDidMount`
291
- */
292
- declare function isFunctionOfComponentDidMount(node: TSESTree.Node): boolean;
293
- /**
294
- * Checks if the node is a function of `componentWillUnmount`
295
- * @param node The AST node to check
296
- * @returns `true` if the node is a function of `componentWillUnmount`
297
- */
298
- declare function isFunctionOfComponentWillUnmount(node: TSESTree.Node): boolean;
299
- //#endregion
300
305
  //#region src/component/component-name.d.ts
301
306
  /**
302
307
  * Check if a string matches the strict component name pattern
@@ -450,6 +455,18 @@ declare function findEnclosingComponentOrHook(node: TSESTree.Node | unit, test?:
450
455
  */
451
456
  declare function isInsideComponentOrHook(node: TSESTree.Node | unit): boolean;
452
457
  //#endregion
458
+ //#region src/hook/hook-callback.d.ts
459
+ /**
460
+ * Determines if a node is the setup function passed to a useEffect-like hook
461
+ * @param node The AST node to check
462
+ */
463
+ declare function isUseEffectSetupCallback(node: TSESTree.Node | unit): boolean;
464
+ /**
465
+ * Determines if a node is the cleanup function returned by a useEffect-like hook's setup function.
466
+ * @param node The AST node to check
467
+ */
468
+ declare function isUseEffectCleanupCallback(node: TSESTree.Node | unit): boolean;
469
+ //#endregion
453
470
  //#region src/hook/hook-semantic-node.d.ts
454
471
  interface Hook extends SemanticNode {
455
472
  id: AST.FunctionID | unit;
@@ -543,18 +560,6 @@ declare const REACT_BUILTIN_HOOK_NAMES: readonly ["use", "useActionState", "useC
543
560
  */
544
561
  declare function isReactHookName(name: string): boolean;
545
562
  //#endregion
546
- //#region src/hook/hook-parts.d.ts
547
- /**
548
- * Determines if a node is the setup function passed to a useEffect-like hook
549
- * @param node The AST node to check
550
- */
551
- declare function isFunctionOfUseEffectSetup(node: TSESTree.Node | unit): boolean;
552
- /**
553
- * Determines if a node is the cleanup function returned by a useEffect-like hook's setup function.
554
- * @param node The AST node to check
555
- */
556
- declare function isFunctionOfUseEffectCleanup(node: TSESTree.Node | unit): boolean;
557
- //#endregion
558
563
  //#region src/jsx/jsx-attribute.d.ts
559
564
  /**
560
565
  * Creates a helper function to find a specific JSX attribute by name
@@ -842,4 +847,4 @@ declare const isForwardRefCall: isReactAPICall.ReturnType;
842
847
  declare const isMemoCall: isReactAPICall.ReturnType;
843
848
  declare const isLazyCall: isReactAPICall.ReturnType;
844
849
  //#endregion
845
- 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, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, 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, isUseEffectLikeCall, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
850
+ 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 };
package/dist/index.js CHANGED
@@ -40,16 +40,6 @@ function isReactHookName(name) {
40
40
  return name === "use" || /^use[A-Z0-9]/.test(name);
41
41
  }
42
42
 
43
- //#endregion
44
- //#region src/hook/hook-id.ts
45
- function isReactHookId(id) {
46
- switch (id.type) {
47
- case AST_NODE_TYPES.Identifier: return isReactHookName(id.name);
48
- case AST_NODE_TYPES.MemberExpression: return "name" in id.property && isReactHookName(id.property.name);
49
- default: return false;
50
- }
51
- }
52
-
53
43
  //#endregion
54
44
  //#region src/hook/hook-is.ts
55
45
  /**
@@ -144,6 +134,38 @@ const isUseStateCall = flip(isReactHookCallWithName)("useState");
144
134
  const isUseSyncExternalStoreCall = flip(isReactHookCallWithName)("useSyncExternalStore");
145
135
  const isUseTransitionCall = flip(isReactHookCallWithName)("useTransition");
146
136
 
137
+ //#endregion
138
+ //#region src/hook/hook-callback.ts
139
+ /**
140
+ * Determines if a node is the setup function passed to a useEffect-like hook
141
+ * @param node The AST node to check
142
+ */
143
+ function isUseEffectSetupCallback(node) {
144
+ if (node == null) return false;
145
+ return node.parent?.type === AST_NODE_TYPES.CallExpression && node.parent.arguments.at(0) === node && isUseEffectLikeCall(node.parent);
146
+ }
147
+ /**
148
+ * Determines if a node is the cleanup function returned by a useEffect-like hook's setup function.
149
+ * @param node The AST node to check
150
+ */
151
+ function isUseEffectCleanupCallback(node) {
152
+ if (node == null) return false;
153
+ const pReturn = AST.findParentNode(node, AST.is(AST_NODE_TYPES.ReturnStatement));
154
+ const pFunction = AST.findParentNode(node, AST.isFunction);
155
+ if (pFunction !== AST.findParentNode(pReturn, AST.isFunction)) return false;
156
+ return isUseEffectSetupCallback(pFunction);
157
+ }
158
+
159
+ //#endregion
160
+ //#region src/hook/hook-id.ts
161
+ function isReactHookId(id) {
162
+ switch (id.type) {
163
+ case AST_NODE_TYPES.Identifier: return isReactHookName(id.name);
164
+ case AST_NODE_TYPES.MemberExpression: return "name" in id.property && isReactHookName(id.property.name);
165
+ default: return false;
166
+ }
167
+ }
168
+
147
169
  //#endregion
148
170
  //#region src/hook/hook-collector.ts
149
171
  const idGen$2 = new IdGenerator("hook_");
@@ -205,28 +227,6 @@ function useHookCollector(context) {
205
227
  };
206
228
  }
207
229
 
208
- //#endregion
209
- //#region src/hook/hook-parts.ts
210
- /**
211
- * Determines if a node is the setup function passed to a useEffect-like hook
212
- * @param node The AST node to check
213
- */
214
- function isFunctionOfUseEffectSetup(node) {
215
- if (node == null) return false;
216
- return node.parent?.type === AST_NODE_TYPES.CallExpression && node.parent.arguments.at(0) === node && isUseEffectLikeCall(node.parent);
217
- }
218
- /**
219
- * Determines if a node is the cleanup function returned by a useEffect-like hook's setup function.
220
- * @param node The AST node to check
221
- */
222
- function isFunctionOfUseEffectCleanup(node) {
223
- if (node == null) return false;
224
- const pReturn = AST.findParentNode(node, AST.is(AST_NODE_TYPES.ReturnStatement));
225
- const pFunction = AST.findParentNode(node, AST.isFunction);
226
- if (pFunction !== AST.findParentNode(pReturn, AST.isFunction)) return false;
227
- return isFunctionOfUseEffectSetup(pFunction);
228
- }
229
-
230
230
  //#endregion
231
231
  //#region src/jsx/jsx-stringify.ts
232
232
  /**
@@ -776,7 +776,7 @@ const FUNCTION_PATTERNS = {
776
776
  * }
777
777
  * ```
778
778
  */
779
- function isFunctionOfRenderMethod(node) {
779
+ function isRenderMethodCallback(node) {
780
780
  const parent = node.parent;
781
781
  const greatGrandparent = parent.parent?.parent;
782
782
  return greatGrandparent != null && isRenderMethodLike(parent) && isClassComponent(greatGrandparent);
@@ -819,7 +819,7 @@ function isChildrenOfCreateElement(context, node) {
819
819
  * @returns `true` if the node is considered a component definition
820
820
  */
821
821
  function isComponentDefinition(context, node, hint) {
822
- if (isChildrenOfCreateElement(context, node) || isFunctionOfRenderMethod(node)) return false;
822
+ if (isChildrenOfCreateElement(context, node) || isRenderMethodCallback(node)) return false;
823
823
  if (shouldExcludeBasedOnHint(node, hint)) return false;
824
824
  const significantParent = AST.findParentNode(node, AST.isOneOf([
825
825
  AST_NODE_TYPES.ArrayPattern,
@@ -960,13 +960,17 @@ function useComponentCollector(context, options = {}) {
960
960
  const getCurrentEntry = () => functionEntries.at(-1);
961
961
  const onFunctionEnter = (node) => {
962
962
  const key = idGen$1.next();
963
+ const exp = AST.findParentNode(node, (n) => n.type === AST_NODE_TYPES.ExportDefaultDeclaration);
964
+ const isExportDefault = exp != null;
965
+ const isExportDefaultDeclaration = exp != null && AST.getUnderlyingExpression(exp.declaration) === node;
963
966
  functionEntries.push({
964
967
  key,
965
968
  node,
966
969
  hookCalls: [],
967
970
  isComponent: false,
968
971
  isComponentDefinition: isComponentDefinition(context, node, hint),
969
- isExportDefault: AST.findParentNode(node, (n) => n.type === AST_NODE_TYPES.ExportDefaultDeclaration) != null,
972
+ isExportDefault,
973
+ isExportDefaultDeclaration,
970
974
  rets: []
971
975
  });
972
976
  };
@@ -1009,6 +1013,7 @@ function useComponentCollector(context, options = {}) {
1009
1013
  hookCalls: entry.hookCalls,
1010
1014
  initPath,
1011
1015
  isExportDefault: entry.isExportDefault,
1016
+ isExportDefaultDeclaration: entry.isExportDefaultDeclaration,
1012
1017
  rets: [body]
1013
1018
  });
1014
1019
  },
@@ -1050,6 +1055,7 @@ function useComponentCollector(context, options = {}) {
1050
1055
  hookCalls: entry.hookCalls,
1051
1056
  initPath,
1052
1057
  isExportDefault: entry.isExportDefault,
1058
+ isExportDefaultDeclaration: entry.isExportDefaultDeclaration,
1053
1059
  rets: entry.rets
1054
1060
  });
1055
1061
  }
@@ -1117,7 +1123,7 @@ function isAssignmentToThisState(node) {
1117
1123
  }
1118
1124
 
1119
1125
  //#endregion
1120
- //#region src/component/component-method.ts
1126
+ //#region src/component/component-method-is.ts
1121
1127
  /**
1122
1128
  * Create a lifecycle method checker function
1123
1129
  * @param methodName The lifecycle method name
@@ -1148,13 +1154,13 @@ const isGetDerivedStateFromProps = createLifecycleChecker("getDerivedStateFromPr
1148
1154
  const isGetDerivedStateFromError = createLifecycleChecker("getDerivedStateFromError", true);
1149
1155
 
1150
1156
  //#endregion
1151
- //#region src/component/component-method-parts.ts
1157
+ //#region src/component/component-method-callback.ts
1152
1158
  /**
1153
1159
  * Checks if the node is a function of `componentDidMount`
1154
1160
  * @param node The AST node to check
1155
1161
  * @returns `true` if the node is a function of `componentDidMount`
1156
1162
  */
1157
- function isFunctionOfComponentDidMount(node) {
1163
+ function isComponentDidMountCallback(node) {
1158
1164
  return AST.isFunction(node) && isComponentDidMount(node.parent) && node.parent.value === node;
1159
1165
  }
1160
1166
  /**
@@ -1162,7 +1168,7 @@ function isFunctionOfComponentDidMount(node) {
1162
1168
  * @param node The AST node to check
1163
1169
  * @returns `true` if the node is a function of `componentWillUnmount`
1164
1170
  */
1165
- function isFunctionOfComponentWillUnmount(node) {
1171
+ function isComponentWillUnmountCallback(node) {
1166
1172
  return AST.isFunction(node) && isComponentWillUnmount(node.parent) && node.parent.value === node;
1167
1173
  }
1168
1174
 
@@ -1177,7 +1183,7 @@ const ComponentPhaseRelevance = birecord({
1177
1183
  //#region src/component/component-phase-helpers.ts
1178
1184
  const isInversePhase = dual(2, (a, b) => ComponentPhaseRelevance.get(a) === b);
1179
1185
  function getPhaseKindOfFunction(node) {
1180
- return match(node).when(isFunctionOfUseEffectSetup, () => "setup").when(isFunctionOfUseEffectCleanup, () => "cleanup").when(isFunctionOfComponentDidMount, () => "mount").when(isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => null);
1186
+ return match(node).when(isUseEffectSetupCallback, () => "setup").when(isUseEffectCleanupCallback, () => "cleanup").when(isComponentDidMountCallback, () => "mount").when(isComponentWillUnmountCallback, () => "unmount").otherwise(() => null);
1181
1187
  }
1182
1188
 
1183
1189
  //#endregion
@@ -1308,4 +1314,4 @@ function isInsideComponentOrHook(node) {
1308
1314
  }
1309
1315
 
1310
1316
  //#endregion
1311
- 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, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, 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, isUseEffectLikeCall, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
1317
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "2.7.1",
3
+ "version": "2.7.2-beta.1",
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,10 +35,10 @@
35
35
  "@typescript-eslint/utils": "^8.53.0",
36
36
  "birecord": "^0.1.1",
37
37
  "ts-pattern": "^5.9.0",
38
- "@eslint-react/ast": "2.7.1",
39
- "@eslint-react/eff": "2.7.1",
40
- "@eslint-react/shared": "2.7.1",
41
- "@eslint-react/var": "2.7.1"
38
+ "@eslint-react/ast": "2.7.2-beta.1",
39
+ "@eslint-react/eff": "2.7.2-beta.1",
40
+ "@eslint-react/shared": "2.7.2-beta.1",
41
+ "@eslint-react/var": "2.7.2-beta.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsdown": "^0.20.0-beta.3",