@eslint-react/core 1.22.2-next.1 → 1.22.2-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.
package/dist/index.d.mts CHANGED
@@ -177,7 +177,6 @@ declare function isChildrenOfCreateElement(node: TSESTree.Node, context: RuleCon
177
177
  declare function isFragmentElement(node: TSESTree.JSXElement, context: RuleContext): boolean;
178
178
 
179
179
  declare function isInsideReactHook(node: TSESTree.Node): boolean;
180
- declare function isInsideReactHookCall(node: TSESTree.Node): boolean;
181
180
 
182
181
  interface ERHook extends ERSemanticNode {
183
182
  id: O.Some<TSESTree.Identifier>;
@@ -209,7 +208,7 @@ declare function isReactHook(node: AST.TSESTreeFunction): boolean;
209
208
  * @param node The node to check.
210
209
  * @returns `true` if the node is a React Hook call, `false` otherwise.
211
210
  */
212
- declare function isReactHookCall(node: TSESTree.CallExpression): boolean;
211
+ declare function isReactHookCall(node: TSESTree.Node): boolean;
213
212
  declare function isReactHookCallWithName(node: TSESTree.CallExpression, context: RuleContext): (name: string) => boolean;
214
213
  declare function isReactHookCallWithNameLoose(node: TSESTree.CallExpression): (name: string) => boolean;
215
214
  declare function isReactHookCallWithNameAlias(name: string, context: RuleContext, alias: string[]): (node: TSESTree.CallExpression) => boolean;
@@ -2374,4 +2373,4 @@ declare const isCreateRefCall: (node: CallExpression, context: _eslint_react_typ
2374
2373
  declare const isForwardRefCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2375
2374
  declare const isMemoCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2376
2375
 
2377
- export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getElementRepresentName, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideReactHookCall, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
2376
+ export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getElementRepresentName, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
package/dist/index.d.ts CHANGED
@@ -177,7 +177,6 @@ declare function isChildrenOfCreateElement(node: TSESTree.Node, context: RuleCon
177
177
  declare function isFragmentElement(node: TSESTree.JSXElement, context: RuleContext): boolean;
178
178
 
179
179
  declare function isInsideReactHook(node: TSESTree.Node): boolean;
180
- declare function isInsideReactHookCall(node: TSESTree.Node): boolean;
181
180
 
182
181
  interface ERHook extends ERSemanticNode {
183
182
  id: O.Some<TSESTree.Identifier>;
@@ -209,7 +208,7 @@ declare function isReactHook(node: AST.TSESTreeFunction): boolean;
209
208
  * @param node The node to check.
210
209
  * @returns `true` if the node is a React Hook call, `false` otherwise.
211
210
  */
212
- declare function isReactHookCall(node: TSESTree.CallExpression): boolean;
211
+ declare function isReactHookCall(node: TSESTree.Node): boolean;
213
212
  declare function isReactHookCallWithName(node: TSESTree.CallExpression, context: RuleContext): (name: string) => boolean;
214
213
  declare function isReactHookCallWithNameLoose(node: TSESTree.CallExpression): (name: string) => boolean;
215
214
  declare function isReactHookCallWithNameAlias(name: string, context: RuleContext, alias: string[]): (node: TSESTree.CallExpression) => boolean;
@@ -2374,4 +2373,4 @@ declare const isCreateRefCall: (node: CallExpression, context: _eslint_react_typ
2374
2373
  declare const isForwardRefCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2375
2374
  declare const isMemoCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2376
2375
 
2377
- export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getElementRepresentName, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideReactHookCall, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
2376
+ export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getElementRepresentName, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
package/dist/index.js CHANGED
@@ -170,6 +170,7 @@ function isReactHook(node) {
170
170
  );
171
171
  }
172
172
  function isReactHookCall(node) {
173
+ if (node.type !== types.AST_NODE_TYPES.CallExpression) return false;
173
174
  if (node.callee.type === types.AST_NODE_TYPES.Identifier) return isReactHookName(node.callee.name);
174
175
  if (node.callee.type === types.AST_NODE_TYPES.MemberExpression) {
175
176
  return node.callee.property.type === types.AST_NODE_TYPES.Identifier && isReactHookName(node.callee.property.name);
@@ -247,9 +248,6 @@ var isUseTransitionCall = eff.F.flip(isReactHookCallWithName)("useTransition");
247
248
  function isInsideReactHook(node) {
248
249
  return eff.O.exists(AST9__namespace.traverseUpGuard(node, AST9__namespace.isFunction), isReactHook);
249
250
  }
250
- function isInsideReactHookCall(node) {
251
- return eff.O.isSome(AST9__namespace.traverseUp(node, (n) => AST9__namespace.is(types.AST_NODE_TYPES.CallExpression)(n) && isReactHookCall(n)));
252
- }
253
251
  var uid = new ShortUniqueId__default.default({ length: 10 });
254
252
  function useHookCollector() {
255
253
  const hooks = /* @__PURE__ */ new Map();
@@ -257,23 +255,22 @@ function useHookCollector() {
257
255
  const onFunctionEnter = (node) => {
258
256
  const id = AST9__namespace.getFunctionIdentifier(node);
259
257
  const name = eff.O.flatMapNullable(id, (id2) => id2.name);
260
- const isHook = eff.O.isSome(id) && eff.O.isSome(name) && isReactHookName(name.value);
261
- if (!isHook) {
262
- fStack.push([node, eff.O.none()]);
258
+ if (eff.O.isSome(id) && eff.O.isSome(name) && isReactHookName(name.value)) {
259
+ const key = uid.rnd();
260
+ fStack.push([node, eff.O.some(key)]);
261
+ hooks.set(key, {
262
+ _: key,
263
+ id,
264
+ kind: "function",
265
+ name,
266
+ node,
267
+ flag: 0n,
268
+ hint: 0n,
269
+ hookCalls: []
270
+ });
263
271
  return;
264
272
  }
265
- const key = uid.rnd();
266
- fStack.push([node, eff.O.some(key)]);
267
- hooks.set(key, {
268
- _: key,
269
- id,
270
- kind: "function",
271
- name,
272
- node,
273
- flag: 0n,
274
- hint: 0n,
275
- hookCalls: []
276
- });
273
+ fStack.push([node, eff.O.none()]);
277
274
  };
278
275
  const onFunctionExit = () => {
279
276
  fStack.pop();
@@ -466,10 +463,9 @@ function isFunctionOfRenderMethod(node) {
466
463
  return isClassComponent(node.parent.parent.parent);
467
464
  }
468
465
  function isInsideRenderMethod(node) {
469
- const predicate = (node2) => {
466
+ return eff.O.isSome(AST9__namespace.traverseUp(node, (node2) => {
470
467
  return isRenderMethodLike(node2) && isClassComponent(node2.parent.parent);
471
- };
472
- return eff.O.isSome(AST9__namespace.traverseUp(node, predicate));
468
+ }));
473
469
  }
474
470
  function hasNoneOrValidComponentName(node, context) {
475
471
  return eff.O.match(
@@ -672,14 +668,14 @@ function isDeclaredInRenderPropLoose(node) {
672
668
  }
673
669
  function isRenderFunctionLoose(node, context) {
674
670
  const { body, parent } = node;
675
- const maybeId = AST9__namespace.getFunctionIdentifier(node);
676
- if (eff.O.isSome(maybeId) && !maybeId.value.name.startsWith("render")) {
671
+ if (eff.O.exists(AST9__namespace.getFunctionIdentifier(node), (id) => id.name.startsWith("render"))) {
677
672
  return parent.type === types.AST_NODE_TYPES.JSXExpressionContainer && parent.parent.type === types.AST_NODE_TYPES.JSXAttribute && parent.parent.name.type === types.AST_NODE_TYPES.JSXIdentifier && parent.parent.name.name.startsWith("render");
678
673
  }
679
- const jsxCtx = { getScope: (node2) => context.sourceCode.getScope(node2) };
680
674
  return JSX4__namespace.isJSXValue(
681
675
  body,
682
- jsxCtx,
676
+ {
677
+ getScope: (node2) => context.sourceCode.getScope(node2)
678
+ },
683
679
  JSX4__namespace.JSXValueHint.SkipNullLiteral | JSX4__namespace.JSXValueHint.SkipUndefinedLiteral | JSX4__namespace.JSXValueHint.StrictLogical | JSX4__namespace.JSXValueHint.StrictConditional
684
680
  );
685
681
  }
@@ -742,7 +738,6 @@ exports.isFunctionOfRenderMethod = isFunctionOfRenderMethod;
742
738
  exports.isInitializedFromReact = isInitializedFromReact;
743
739
  exports.isInsideCreateElementProps = isInsideCreateElementProps;
744
740
  exports.isInsideReactHook = isInsideReactHook;
745
- exports.isInsideReactHookCall = isInsideReactHookCall;
746
741
  exports.isInsideRenderMethod = isInsideRenderMethod;
747
742
  exports.isInversePhase = isInversePhase;
748
743
  exports.isMemo = isMemo;
package/dist/index.mjs CHANGED
@@ -143,6 +143,7 @@ function isReactHook(node) {
143
143
  );
144
144
  }
145
145
  function isReactHookCall(node) {
146
+ if (node.type !== AST_NODE_TYPES.CallExpression) return false;
146
147
  if (node.callee.type === AST_NODE_TYPES.Identifier) return isReactHookName(node.callee.name);
147
148
  if (node.callee.type === AST_NODE_TYPES.MemberExpression) {
148
149
  return node.callee.property.type === AST_NODE_TYPES.Identifier && isReactHookName(node.callee.property.name);
@@ -220,9 +221,6 @@ var isUseTransitionCall = F.flip(isReactHookCallWithName)("useTransition");
220
221
  function isInsideReactHook(node) {
221
222
  return O.exists(AST9.traverseUpGuard(node, AST9.isFunction), isReactHook);
222
223
  }
223
- function isInsideReactHookCall(node) {
224
- return O.isSome(AST9.traverseUp(node, (n) => AST9.is(AST_NODE_TYPES.CallExpression)(n) && isReactHookCall(n)));
225
- }
226
224
  var uid = new ShortUniqueId({ length: 10 });
227
225
  function useHookCollector() {
228
226
  const hooks = /* @__PURE__ */ new Map();
@@ -230,23 +228,22 @@ function useHookCollector() {
230
228
  const onFunctionEnter = (node) => {
231
229
  const id = AST9.getFunctionIdentifier(node);
232
230
  const name = O.flatMapNullable(id, (id2) => id2.name);
233
- const isHook = O.isSome(id) && O.isSome(name) && isReactHookName(name.value);
234
- if (!isHook) {
235
- fStack.push([node, O.none()]);
231
+ if (O.isSome(id) && O.isSome(name) && isReactHookName(name.value)) {
232
+ const key = uid.rnd();
233
+ fStack.push([node, O.some(key)]);
234
+ hooks.set(key, {
235
+ _: key,
236
+ id,
237
+ kind: "function",
238
+ name,
239
+ node,
240
+ flag: 0n,
241
+ hint: 0n,
242
+ hookCalls: []
243
+ });
236
244
  return;
237
245
  }
238
- const key = uid.rnd();
239
- fStack.push([node, O.some(key)]);
240
- hooks.set(key, {
241
- _: key,
242
- id,
243
- kind: "function",
244
- name,
245
- node,
246
- flag: 0n,
247
- hint: 0n,
248
- hookCalls: []
249
- });
246
+ fStack.push([node, O.none()]);
250
247
  };
251
248
  const onFunctionExit = () => {
252
249
  fStack.pop();
@@ -439,10 +436,9 @@ function isFunctionOfRenderMethod(node) {
439
436
  return isClassComponent(node.parent.parent.parent);
440
437
  }
441
438
  function isInsideRenderMethod(node) {
442
- const predicate = (node2) => {
439
+ return O.isSome(AST9.traverseUp(node, (node2) => {
443
440
  return isRenderMethodLike(node2) && isClassComponent(node2.parent.parent);
444
- };
445
- return O.isSome(AST9.traverseUp(node, predicate));
441
+ }));
446
442
  }
447
443
  function hasNoneOrValidComponentName(node, context) {
448
444
  return O.match(
@@ -645,14 +641,14 @@ function isDeclaredInRenderPropLoose(node) {
645
641
  }
646
642
  function isRenderFunctionLoose(node, context) {
647
643
  const { body, parent } = node;
648
- const maybeId = AST9.getFunctionIdentifier(node);
649
- if (O.isSome(maybeId) && !maybeId.value.name.startsWith("render")) {
644
+ if (O.exists(AST9.getFunctionIdentifier(node), (id) => id.name.startsWith("render"))) {
650
645
  return parent.type === AST_NODE_TYPES.JSXExpressionContainer && parent.parent.type === AST_NODE_TYPES.JSXAttribute && parent.parent.name.type === AST_NODE_TYPES.JSXIdentifier && parent.parent.name.name.startsWith("render");
651
646
  }
652
- const jsxCtx = { getScope: (node2) => context.sourceCode.getScope(node2) };
653
647
  return JSX4.isJSXValue(
654
648
  body,
655
- jsxCtx,
649
+ {
650
+ getScope: (node2) => context.sourceCode.getScope(node2)
651
+ },
656
652
  JSX4.JSXValueHint.SkipNullLiteral | JSX4.JSXValueHint.SkipUndefinedLiteral | JSX4.JSXValueHint.StrictLogical | JSX4.JSXValueHint.StrictConditional
657
653
  );
658
654
  }
@@ -665,4 +661,4 @@ function isThisSetState(node) {
665
661
  return callee.type === AST_NODE_TYPES.MemberExpression && AST9.isThisExpression(callee.object) && callee.property.type === AST_NODE_TYPES.Identifier && callee.property.name === "setState";
666
662
  }
667
663
 
668
- export { DEFAULT_COMPONENT_HINT, ERClassComponentFlag, ERComponentHint, ERFunctionComponentFlag, ERPhaseRelevance, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getElementRepresentName, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideReactHookCall, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
664
+ export { DEFAULT_COMPONENT_HINT, ERClassComponentFlag, ERComponentHint, ERFunctionComponentFlag, ERPhaseRelevance, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getElementRepresentName, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "1.22.2-next.1",
3
+ "version": "1.22.2-next.10",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
5
- "homepage": "https://github.com/rel1cx/eslint-react",
5
+ "homepage": "https://github.com/rEl1cx/eslint-react",
6
6
  "bugs": {
7
- "url": "https://github.com/rel1cx/eslint-react/issues"
7
+ "url": "https://github.com/rEl1cx/eslint-react/issues"
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/Rel1cx/eslint-react.git",
11
+ "url": "git+https://github.com/rEl1cx/eslint-react.git",
12
12
  "directory": "packages/core"
13
13
  },
14
14
  "license": "MIT",
@@ -39,17 +39,21 @@
39
39
  "@typescript-eslint/utils": "^8.18.2",
40
40
  "short-unique-id": "^5.2.0",
41
41
  "ts-pattern": "^5.6.0",
42
- "@eslint-react/ast": "1.22.2-next.1",
43
- "@eslint-react/eff": "1.22.2-next.1",
44
- "@eslint-react/shared": "1.22.2-next.1",
45
- "@eslint-react/jsx": "1.22.2-next.1",
46
- "@eslint-react/types": "1.22.2-next.1",
47
- "@eslint-react/var": "1.22.2-next.1"
42
+ "@eslint-react/ast": "1.22.2-next.10",
43
+ "@eslint-react/eff": "1.22.2-next.10",
44
+ "@eslint-react/jsx": "1.22.2-next.10",
45
+ "@eslint-react/shared": "1.22.2-next.10",
46
+ "@eslint-react/types": "1.22.2-next.10",
47
+ "@eslint-react/var": "1.22.2-next.10"
48
48
  },
49
49
  "devDependencies": {
50
50
  "tsup": "^8.3.5",
51
51
  "@workspace/configs": "0.0.0"
52
52
  },
53
+ "engines": {
54
+ "bun": ">=1.0.15",
55
+ "node": ">=18.18.0"
56
+ },
53
57
  "sideEffects": false,
54
58
  "module": "dist/index.mjs",
55
59
  "scripts": {