@eslint-react/core 5.30.0-beta.0 → 5.30.0-beta.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.ts CHANGED
@@ -326,67 +326,6 @@ export declare namespace getClassComponentCollector {
326
326
  * @deprecated Class components are legacy. This function exists only to support legacy rules.
327
327
  */
328
328
  export declare function getClassComponentCollector(context: RuleContext): getClassComponentCollector.ReturnType;
329
- /**
330
- * Get the type argument (the first argument) of a `createElement` call.
331
- * @param context The ESLint rule context.
332
- * @param node The node to inspect.
333
- * @returns The type argument, or `null` when the node is not a `createElement` call or has no arguments.
334
- */
335
- export declare function getCreateElementTypeArgument(context: RuleContext, node: null | TSESTree.Node): TSESTree.CallExpressionArgument | null;
336
- /**
337
- * Get the props object (the second argument) of a `createElement` call.
338
- *
339
- * Type expressions and chain expressions wrapping the argument are unwrapped
340
- * before the object check; `null`, spread, or otherwise non-object props
341
- * arguments yield `null`.
342
- *
343
- * @param context The ESLint rule context.
344
- * @param node The node to inspect.
345
- * @returns The props `ObjectExpression`, or `null` when absent or not statically an object literal.
346
- */
347
- export declare function getCreateElementPropsObject(context: RuleContext, node: null | TSESTree.Node): TSESTree.ObjectExpression | null;
348
- /**
349
- * Get the children arguments (the arguments after the props object) of a `createElement` call.
350
- * @param context The ESLint rule context.
351
- * @param node The node to inspect.
352
- * @returns The children arguments, or an empty array when the node is not a `createElement` call.
353
- */
354
- export declare function getCreateElementChildrenArguments(context: RuleContext, node: null | TSESTree.Node): TSESTree.CallExpressionArgument[];
355
- /**
356
- * Find a statically named property in the props object of a `createElement` call.
357
- *
358
- * Statically resolvable names include plain identifier keys as well as
359
- * string-literal and simple template-literal keys (computed or not).
360
- * @param context The ESLint rule context.
361
- * @param node The node to inspect.
362
- * @param name The property name to look for (ex: `"children"`, `"key"`).
363
- * @returns The matching `Property` node, or `null` when the call has no static property with that name.
364
- *
365
- * @example
366
- * ```ts
367
- * import { getCreateElementProp } from "@eslint-react/core";
368
- *
369
- * const childrenProp = getCreateElementProp(context, node, "children");
370
- * ```
371
- */
372
- export declare function getCreateElementProp(context: RuleContext, node: null | TSESTree.Node, name: string): TSESTree.Property | null;
373
- /**
374
- * Check if the node is passed as a children argument (the third argument or
375
- * later) of a `createElement` call.
376
- * @param context The ESLint rule context.
377
- * @param node The node to check.
378
- * @returns `true` if the node is a direct children argument of a `createElement` call.
379
- */
380
- export declare function isCreateElementChildrenArgument(context: RuleContext, node: TSESTree.Node): boolean;
381
- /**
382
- * Check if the node is directly inside the props object (the second argument) of a `createElement` call,
383
- * that is, its closest `ObjectExpression` ancestor is the props object itself. Nodes nested deeper
384
- * (ex: inside an object nested in the props object) are not considered inside.
385
- * @param context The ESLint rule context.
386
- * @param node The node to check.
387
- * @returns `true` if the node is directly inside `createElement`'s props object.
388
- */
389
- export declare function isInsideCreateElementProps(context: RuleContext, node: TSESTree.Node): boolean;
390
329
  /** The return type of {@link getFunctionId}. */
391
330
  export type FunctionID = ReturnType<typeof getFunctionId>;
392
331
  /**
@@ -430,15 +369,17 @@ export type FunctionSemanticNode = ClientFunctionSemanticNode | ServerFunctionSe
430
369
  * @param node The function node to analyze.
431
370
  * @returns The identifier node if found, `null` otherwise.
432
371
  */
433
- export declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ClassExpression | TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | TSESTree.CallExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.TemplateLiteral | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSTypeAssertion | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.ChainExpression | TSESTree.ConditionalExpression | TSESTree.ImportExpression | TSESTree.LogicalExpression | TSESTree.NewExpression | TSESTree.PrivateIdentifier | TSESTree.TSInstantiationExpression | TSESTree.TSSatisfiesExpression | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldNoStarExpression | TSESTree.YieldStarExpression | null;
372
+ export declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | 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.TemplateLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | 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.YieldNoStarExpression | TSESTree.YieldStarExpression | TSESTree.PrivateIdentifier | null;
434
373
  /**
435
374
  * Get the initialization path of a function node in the AST.
436
375
  *
437
376
  * @remarks
438
377
  * Higher-order component wrappers (ex: `memo`, `forwardRef`) are only
439
378
  * recognized when the call expression initializes a variable declarator
440
- * directly. HOCs inside object properties (ex: `{ Nav: memo(() => {}) }`)
441
- * are not supported and yield `null`.
379
+ * directly and the function occupies a component position: the first argument
380
+ * for `memo`/`forwardRef`, or any argument for other calls (never the callee).
381
+ * HOCs inside object properties (ex: `{ Nav: memo(() => {}) }`) are not
382
+ * supported and yield `null`.
442
383
  *
443
384
  * @param node The function node to analyze.
444
385
  * @returns The function initialization path or `null` if not identifiable.
@@ -642,6 +583,9 @@ export declare function isFunctionComponentWrapperCall(context: RuleContext, nod
642
583
  export declare function isFunctionComponentWrapperCallback(context: RuleContext, node: TSESTreeFunction): boolean;
643
584
  /**
644
585
  * Get function component identifier from `const Component = memo(() => {});`.
586
+ * Only the first argument of a component wrapper is treated as the wrapped
587
+ * component; later arguments (ex: memo's propsAreEqual comparator) do not
588
+ * inherit the surrounding binding.
645
589
  * @param context The rule context.
646
590
  * @param node The AST node to get the function component identifier from.
647
591
  * @internal
@@ -681,7 +625,10 @@ export declare const FunctionComponentDetectionHint: {
681
625
  readonly DoNotIncludeFunctionDefinedAsObjectMethod: bigint;
682
626
  /** Exclude functions defined as array expression elements from component detection. */
683
627
  readonly DoNotIncludeFunctionDefinedAsArrayExpressionElement: bigint;
684
- /** Exclude functions defined as array pattern elements from component detection. */
628
+ /**
629
+ * Exclude functions defined as array pattern elements or as their default values from
630
+ * component detection (ex: `const [Nav = () => {}] = arr`).
631
+ */
685
632
  readonly DoNotIncludeFunctionDefinedAsArrayPatternElement: bigint;
686
633
  /** Exclude functions defined as array flatMap callbacks (named or anonymous) from component detection. */
687
634
  readonly DoNotIncludeFunctionDefinedAsArrayFlatMapCallback: bigint;
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Check, Extract, Traverse } from "@eslint-react/ast";
2
2
  import { getText } from "@eslint-react/eslint";
3
3
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
4
+ import { isCreateElementChildrenArgument } from "@eslint-react/jsx";
4
5
  import { 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";
5
6
  import { resolve } from "@eslint-react/var";
6
7
  import { findVariable } from "@typescript-eslint/utils/ast-utils";
@@ -296,42 +297,6 @@ function getClassComponentCollector(context) {
296
297
  }
297
298
  };
298
299
  }
299
- // src/create-element.ts
300
- function getCreateElementTypeArgument(context, node) {
301
- if (!isCreateElementCall(context, node)) return null;
302
- return node.arguments[0] ?? null;
303
- }
304
- function getCreateElementPropsObject(context, node) {
305
- if (!isCreateElementCall(context, node)) return null;
306
- const propsArg = node.arguments[1];
307
- if (propsArg == null) return null;
308
- const expr = Extract.unwrap(propsArg);
309
- return expr.type === AST_NODE_TYPES.ObjectExpression ? expr : null;
310
- }
311
- function getCreateElementChildrenArguments(context, node) {
312
- if (!isCreateElementCall(context, node)) return [];
313
- return node.arguments.slice(2);
314
- }
315
- function getCreateElementProp(context, node, name) {
316
- const propsObject = getCreateElementPropsObject(context, node);
317
- if (propsObject == null) return null;
318
- for (const prop of propsObject.properties) if (prop.type === AST_NODE_TYPES.Property && Extract.getPropertyName(prop, "max") === name) return prop;
319
- return null;
320
- }
321
- function isCreateElementChildrenArgument(context, node) {
322
- let parent = node.parent;
323
- while (Check.isTypeExpression(parent)) parent = parent.parent;
324
- return parent?.type === AST_NODE_TYPES.CallExpression && isCreateElementCall(context, parent) && parent.arguments.slice(2).some((arg) => Extract.unwrap(arg) === Extract.unwrap(node));
325
- }
326
- function isInsideCreateElementProps(context, node) {
327
- const call = Traverse.findParent(node, isCreateElementCall(context));
328
- if (call == null) return false;
329
- const prop = Traverse.findParent(node, Check.isObjectExpression);
330
- if (prop == null) return false;
331
- const propsArg = call.arguments[1];
332
- if (propsArg == null) return false;
333
- return prop === Extract.unwrap(propsArg);
334
- }
335
300
  // src/function.ts
336
301
  function getFunctionId(node) {
337
302
  switch (true) {
@@ -346,6 +311,13 @@ function getFunctionId(node) {
346
311
  }
347
312
  return null;
348
313
  }
314
+ function isComponentWrapperCall(node) {
315
+ const name = Extract.getCalleeName(node);
316
+ return name === "memo" || name === "forwardRef";
317
+ }
318
+ function isComponentArgumentPosition(call, child) {
319
+ return isComponentWrapperCall(call) ? call.arguments[0] === child : call.arguments.includes(child);
320
+ }
349
321
  function getFunctionInitPath(node) {
350
322
  if (node.type === AST_NODE_TYPES.FunctionDeclaration) return [node];
351
323
  let parent = node.parent;
@@ -360,13 +332,13 @@ function getFunctionInitPath(node) {
360
332
  parent,
361
333
  node
362
334
  ];
363
- case parent.type === AST_NODE_TYPES.CallExpression && parent.arguments.includes(child) && parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return [
335
+ case parent.type === AST_NODE_TYPES.CallExpression && isComponentArgumentPosition(parent, child) && parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return [
364
336
  parent.parent.parent,
365
337
  parent.parent,
366
338
  parent,
367
339
  node
368
340
  ];
369
- case parent.type === AST_NODE_TYPES.CallExpression && parent.arguments.includes(child) && parent.parent.type === AST_NODE_TYPES.CallExpression && parent.parent.arguments.includes(parent) && parent.parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return [
341
+ case parent.type === AST_NODE_TYPES.CallExpression && isComponentArgumentPosition(parent, child) && parent.parent.type === AST_NODE_TYPES.CallExpression && isComponentArgumentPosition(parent.parent, parent) && parent.parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return [
370
342
  parent.parent.parent.parent,
371
343
  parent.parent.parent,
372
344
  parent.parent,
@@ -457,7 +429,8 @@ function isJSXLike(context, node, hint = DEFAULT_JSX_DETECTION_HINT) {
457
429
  case AST_NODE_TYPES.TSAsExpression:
458
430
  case AST_NODE_TYPES.TSSatisfiesExpression:
459
431
  case AST_NODE_TYPES.TSTypeAssertion:
460
- case AST_NODE_TYPES.TSNonNullExpression: return visit(node.expression);
432
+ case AST_NODE_TYPES.TSNonNullExpression:
433
+ case AST_NODE_TYPES.ChainExpression: return visit(node.expression);
461
434
  case AST_NODE_TYPES.AwaitExpression: return visit(node.argument);
462
435
  case AST_NODE_TYPES.Literal: return match(node.value).with(P.nullish, () => !(hint & JSXDetectionHint.DoNotIncludeJSXWithNullValue)).with(P.boolean, () => !(hint & JSXDetectionHint.DoNotIncludeJSXWithBooleanValue)).with(P.string, () => !(hint & JSXDetectionHint.DoNotIncludeJSXWithStringValue)).with(P.number, () => !(hint & JSXDetectionHint.DoNotIncludeJSXWithNumberValue)).with(P.bigint, () => !(hint & JSXDetectionHint.DoNotIncludeJSXWithBigIntValue)).with(P.instanceOf(RegExp), () => false).exhaustive();
463
436
  case AST_NODE_TYPES.TemplateLiteral: return !(hint & JSXDetectionHint.DoNotIncludeJSXWithStringValue);
@@ -519,10 +492,14 @@ function getFunctionComponentId(context, node) {
519
492
  const functionId = getFunctionId(node);
520
493
  if (functionId != null) return functionId;
521
494
  let parent = node.parent;
522
- while (Check.isTypeExpression(parent)) parent = parent.parent;
495
+ let child = node;
496
+ while (Check.isTypeExpression(parent)) {
497
+ child = parent;
498
+ parent = parent.parent;
499
+ }
523
500
  switch (true) {
524
- case parent.type === AST_NODE_TYPES.CallExpression && isFunctionComponentWrapperCall(context, parent) && parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return parent.parent.id;
525
- case parent.type === AST_NODE_TYPES.CallExpression && isFunctionComponentWrapperCall(context, parent) && parent.parent.type === AST_NODE_TYPES.CallExpression && isFunctionComponentWrapperCall(context, parent.parent) && parent.parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return parent.parent.parent.id;
501
+ case parent.type === AST_NODE_TYPES.CallExpression && parent.arguments[0] === child && isFunctionComponentWrapperCall(context, parent) && parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return parent.parent.id;
502
+ case parent.type === AST_NODE_TYPES.CallExpression && parent.arguments[0] === child && isFunctionComponentWrapperCall(context, parent) && parent.parent.type === AST_NODE_TYPES.CallExpression && parent.parent.arguments[0] === parent && isFunctionComponentWrapperCall(context, parent.parent) && parent.parent.parent.type === AST_NODE_TYPES.VariableDeclarator: return parent.parent.parent.id;
526
503
  default: return null;
527
504
  }
528
505
  }
@@ -557,6 +534,7 @@ function isFunctionComponentDefinition(context, node, hint) {
557
534
  while (Check.isTypeExpression(parent)) parent = parent.parent;
558
535
  if (isRenderMethodCallback(node)) return false;
559
536
  if (isCreateElementChildrenArgument(context, node)) return false;
537
+ if (Check.isCallExpression(parent) && isFunctionComponentWrapperCall(context, parent) && !isFunctionComponentWrapperCallback(context, node)) return false;
560
538
  const [parentCallee, parentCalleeName] = parent.type === AST_NODE_TYPES.CallExpression ? [Extract.unwrap(parent.callee), Extract.getCalleeName(parent)] : [null, null];
561
539
  switch (true) {
562
540
  case Check.isOneOf([AST_NODE_TYPES.ArrowFunctionExpression, AST_NODE_TYPES.FunctionExpression])(node) && parent.type === AST_NODE_TYPES.Property && parent.parent.type === AST_NODE_TYPES.ObjectExpression:
@@ -568,7 +546,7 @@ function isFunctionComponentDefinition(context, node, hint) {
568
546
  case Check.isOneOf([AST_NODE_TYPES.ArrowFunctionExpression, AST_NODE_TYPES.FunctionExpression])(node) && parent.type === AST_NODE_TYPES.PropertyDefinition:
569
547
  if (hint & FunctionComponentDetectionHint.DoNotIncludeFunctionDefinedAsClassProperty) return false;
570
548
  break;
571
- case parent.type === AST_NODE_TYPES.ArrayPattern:
549
+ case parent.type === AST_NODE_TYPES.ArrayPattern || Check.isArrayPatternElementDefault(parent):
572
550
  if (hint & FunctionComponentDetectionHint.DoNotIncludeFunctionDefinedAsArrayPatternElement) return false;
573
551
  break;
574
552
  case parent.type === AST_NODE_TYPES.ArrayExpression:
@@ -583,11 +561,11 @@ function isFunctionComponentDefinition(context, node, hint) {
583
561
  case parent.type === AST_NODE_TYPES.CallExpression && getFunctionId(node) == null && !isFunctionComponentWrapperCall(context, parent) && !isCreateElementCall(context, parent): if (hint & FunctionComponentDetectionHint.DoNotIncludeFunctionDefinedAsArbitraryCallExpressionCallback) return false;
584
562
  }
585
563
  const significantParent = Traverse.findParent(node, Check.isOneOf([
586
- AST_NODE_TYPES.JSXExpressionContainer,
587
564
  AST_NODE_TYPES.ArrowFunctionExpression,
588
- AST_NODE_TYPES.FunctionExpression,
589
565
  AST_NODE_TYPES.Property,
590
- AST_NODE_TYPES.ClassBody
566
+ AST_NODE_TYPES.FunctionExpression,
567
+ AST_NODE_TYPES.ClassBody,
568
+ AST_NODE_TYPES.JSXExpressionContainer
591
569
  ]));
592
570
  if (significantParent == null) return true;
593
571
  return significantParent.type !== AST_NODE_TYPES.JSXExpressionContainer;
@@ -956,4 +934,4 @@ function getTypeVariants(types) {
956
934
  if (types.some(isNeverType)) variants.add("never");
957
935
  return variants;
958
936
  }
959
- export { DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FunctionComponentDetectionHint, FunctionComponentFlag, JSXDetectionHint, SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT, getClassComponentCollector, getClassId, getCreateElementChildrenArguments, getCreateElementProp, getCreateElementPropsObject, getCreateElementTypeArgument, getFullyQualifiedNameEx, getFunctionComponentCollector, getFunctionComponentFlagFromInitPath, getFunctionComponentId, getFunctionDirectives, getFunctionId, getFunctionInitPath, getHookCollector, getJSXConfig, getJSXConfigFromAnnotation, getJSXConfigFromCompilerOptions, getTypeVariants, isAPI, isAPICall, isAnyType, isBigIntType, isBooleanLiteralType, isBooleanType, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateElementChildrenArgument, isCreateRef, isCreateRefCall, isEnumType, isFalseLiteralType, isFalsyBigIntType, isFalsyNumberType, isFalsyStringType, isForwardRef, isForwardRefCall, isFunctionComponentDefinition, isFunctionComponentName, isFunctionComponentNameLoose, isFunctionComponentWrapperCall, isFunctionComponentWrapperCallback, isFunctionEmpty, isFunctionHasCallInInitPath, isFunctionHasDirective, isFunctionWithLooseComponentName, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHookCall, isHookDefinition, isHookId, isHookName, isHookTag, isInsideCreateElementProps, isJSXLike, isLazy, isLazyCall, isMemo, isMemoCall, isNeverType, isNullishType, isNumberType, isObjectType, isPureComponent, isRender, isRenderMethodCallback, isRenderMethodLike, isShouldComponentUpdate, isStringType, isThisSetStateCall, isTrueLiteralType, isTruthyBigIntType, isTruthyNumberType, isTruthyStringType, isUnknownType, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUse, isUseActionState, isUseActionStateCall, isUseCall, isUseCallback, isUseCallbackCall, isUseContext, isUseContextCall, isUseDebugValue, isUseDebugValueCall, isUseDeferredValue, isUseDeferredValueCall, isUseEffect, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatus, isUseFormStatusCall, isUseId, isUseIdCall, isUseImperativeHandle, isUseImperativeHandleCall, isUseInsertionEffect, isUseInsertionEffectCall, isUseLayoutEffect, isUseLayoutEffectCall, isUseMemo, isUseMemoCall, isUseOptimistic, isUseOptimisticCall, isUseReducer, isUseReducerCall, isUseRef, isUseRefCall, isUseRefLikeCall, isUseState, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStore, isUseSyncExternalStoreCall, isUseTransition, isUseTransitionCall };
937
+ export { DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FunctionComponentDetectionHint, FunctionComponentFlag, JSXDetectionHint, SEL_FUNCTION_DISPLAY_NAME_ASSIGNMENT, getClassComponentCollector, getClassId, getFullyQualifiedNameEx, getFunctionComponentCollector, getFunctionComponentFlagFromInitPath, getFunctionComponentId, getFunctionDirectives, getFunctionId, getFunctionInitPath, getHookCollector, getJSXConfig, getJSXConfigFromAnnotation, getJSXConfigFromCompilerOptions, getTypeVariants, isAPI, isAPICall, isAnyType, isBigIntType, isBooleanLiteralType, isBooleanType, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isEnumType, isFalseLiteralType, isFalsyBigIntType, isFalsyNumberType, isFalsyStringType, isForwardRef, isForwardRefCall, isFunctionComponentDefinition, isFunctionComponentName, isFunctionComponentNameLoose, isFunctionComponentWrapperCall, isFunctionComponentWrapperCallback, isFunctionEmpty, isFunctionHasCallInInitPath, isFunctionHasDirective, isFunctionWithLooseComponentName, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHookCall, isHookDefinition, isHookId, isHookName, isHookTag, isJSXLike, isLazy, isLazyCall, isMemo, isMemoCall, isNeverType, isNullishType, isNumberType, isObjectType, isPureComponent, isRender, isRenderMethodCallback, isRenderMethodLike, isShouldComponentUpdate, isStringType, isThisSetStateCall, isTrueLiteralType, isTruthyBigIntType, isTruthyNumberType, isTruthyStringType, isUnknownType, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUse, isUseActionState, isUseActionStateCall, isUseCall, isUseCallback, isUseCallbackCall, isUseContext, isUseContextCall, isUseDebugValue, isUseDebugValueCall, isUseDeferredValue, isUseDeferredValueCall, isUseEffect, isUseEffectCall, isUseEffectCleanupCallback, isUseEffectLikeCall, isUseEffectSetupCallback, isUseFormStatus, isUseFormStatusCall, isUseId, isUseIdCall, isUseImperativeHandle, isUseImperativeHandleCall, isUseInsertionEffect, isUseInsertionEffectCall, isUseLayoutEffect, isUseLayoutEffectCall, isUseMemo, isUseMemoCall, isUseOptimistic, isUseOptimisticCall, isUseReducer, isUseReducerCall, isUseRef, isUseRefCall, isUseRefLikeCall, isUseState, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStore, isUseSyncExternalStoreCall, isUseTransition, isUseTransitionCall };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "5.30.0-beta.0",
3
+ "version": "5.30.0-beta.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": {
@@ -29,12 +29,13 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.30.0-beta.0",
33
- "@eslint-react/eslint": "5.30.0-beta.0",
34
- "@eslint-react/shared": "5.30.0-beta.0",
35
- "@eslint-react/var": "5.30.0-beta.0",
36
- "@typescript-eslint/types": "^8.72.0",
37
- "@typescript-eslint/utils": "^8.72.0",
32
+ "@eslint-react/ast": "5.30.0-beta.10",
33
+ "@eslint-react/eslint": "5.30.0-beta.10",
34
+ "@eslint-react/jsx": "5.30.0-beta.10",
35
+ "@eslint-react/shared": "5.30.0-beta.10",
36
+ "@eslint-react/var": "5.30.0-beta.10",
37
+ "@typescript-eslint/types": "^8.72.1",
38
+ "@typescript-eslint/utils": "^8.72.1",
38
39
  "ts-pattern": "^5.9.2"
39
40
  },
40
41
  "devDependencies": {
@@ -43,7 +44,6 @@
43
44
  "@local/testkit": "0.0.0",
44
45
  "@tsconfig/node20": "^20.1.10",
45
46
  "@types/node": "^20.19.43",
46
- "@typescript-eslint/typescript-estree": "^8.72.0",
47
47
  "dedent": "^1.7.2",
48
48
  "eslint": "^10.13.0",
49
49
  "tsdown": "^0.23.2",