@eslint-react/core 1.47.5-next.0 → 1.48.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +42 -59
- package/dist/index.d.ts +42 -59
- package/dist/index.js +99 -136
- package/dist/index.mjs +100 -131
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -509,33 +509,6 @@ declare function stringifyJsx(node: TSESTree$1.JSXIdentifier | TSESTree$1.JSXMem
|
|
|
509
509
|
/** @internal */
|
|
510
510
|
declare function getInstanceId(node: TSESTree.Node, prev?: TSESTree.Node): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.BinaryExpression | 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.UnaryExpression | TSESTree.UpdateExpression | TSESTree.YieldExpression | TSESTree.PrivateIdentifier | undefined;
|
|
511
511
|
|
|
512
|
-
/** @internal */
|
|
513
|
-
declare function isFromReactLoose(node: TSESTree.Node | _, name: string): boolean;
|
|
514
|
-
/** @internal */
|
|
515
|
-
declare function isFromReactStrict(node: TSESTree.Node | _, name: string, importSource: string, initialScope: Scope): boolean;
|
|
516
|
-
/** @internal */
|
|
517
|
-
declare namespace isFromReact {
|
|
518
|
-
type ReturnType = {
|
|
519
|
-
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
520
|
-
(context: RuleContext, node: TSESTree.Node): node is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
/** @internal */
|
|
524
|
-
declare function isFromReact(name: string): isFromReact.ReturnType;
|
|
525
|
-
/** @internal */
|
|
526
|
-
declare function isFromReactObject(objectName: string, propertyName: string): isFromReact.ReturnType;
|
|
527
|
-
/** @internal */
|
|
528
|
-
declare namespace isCallFromReact {
|
|
529
|
-
type ReturnType = {
|
|
530
|
-
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression;
|
|
531
|
-
(context: RuleContext, node: TSESTree.Node): node is TSESTree.CallExpression;
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
/** @internal */
|
|
535
|
-
declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
|
|
536
|
-
/** @internal */
|
|
537
|
-
declare function isCallFromReactObject(objectName: string, propertyName: string): isCallFromReact.ReturnType;
|
|
538
|
-
|
|
539
512
|
/**
|
|
540
513
|
* Check if an identifier is initialized from react
|
|
541
514
|
* @param name The top-level identifier's name
|
|
@@ -548,35 +521,45 @@ declare function isInitializedFromReact(name: string, importSource: string, init
|
|
|
548
521
|
/** @internal */
|
|
549
522
|
declare function isInstanceIdEqual(context: RuleContext, a: TSESTree.Node, b: TSESTree.Node): boolean;
|
|
550
523
|
|
|
551
|
-
declare
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
declare
|
|
558
|
-
declare
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
declare
|
|
565
|
-
declare const
|
|
566
|
-
declare const
|
|
567
|
-
declare const
|
|
568
|
-
declare const
|
|
569
|
-
declare const
|
|
570
|
-
declare const
|
|
571
|
-
declare const
|
|
572
|
-
declare const
|
|
573
|
-
declare const
|
|
574
|
-
declare const
|
|
575
|
-
declare const
|
|
576
|
-
declare const
|
|
577
|
-
declare const
|
|
578
|
-
declare const
|
|
579
|
-
declare const
|
|
580
|
-
declare const
|
|
581
|
-
|
|
582
|
-
|
|
524
|
+
declare namespace isReactAPI {
|
|
525
|
+
type ReturnType = {
|
|
526
|
+
(context: RuleContext, node: _ | null | TSESTree.Node): node is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
527
|
+
(context: RuleContext): (node: _ | null | TSESTree.Node) => node is TSESTree.MemberExpression | TSESTree.Identifier;
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
declare function isReactAPI(api: string): isReactAPI.ReturnType;
|
|
531
|
+
declare namespace isReactAPICall {
|
|
532
|
+
type ReturnType = {
|
|
533
|
+
(context: RuleContext, node: _ | null | TSESTree.Node): node is TSESTree.CallExpression;
|
|
534
|
+
(context: RuleContext): (node: _ | null | TSESTree.Node) => node is TSESTree.CallExpression;
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
declare function isReactAPICall(api: string): isReactAPICall.ReturnType;
|
|
538
|
+
declare const isCaptureOwnerStack: isReactAPI.ReturnType;
|
|
539
|
+
declare const isChildrenCount: isReactAPI.ReturnType;
|
|
540
|
+
declare const isChildrenForEach: isReactAPI.ReturnType;
|
|
541
|
+
declare const isChildrenMap: isReactAPI.ReturnType;
|
|
542
|
+
declare const isChildrenOnly: isReactAPI.ReturnType;
|
|
543
|
+
declare const isChildrenToArray: isReactAPI.ReturnType;
|
|
544
|
+
declare const isCloneElement: isReactAPI.ReturnType;
|
|
545
|
+
declare const isCreateContext: isReactAPI.ReturnType;
|
|
546
|
+
declare const isCreateElement: isReactAPI.ReturnType;
|
|
547
|
+
declare const isCreateRef: isReactAPI.ReturnType;
|
|
548
|
+
declare const isForwardRef: isReactAPI.ReturnType;
|
|
549
|
+
declare const isMemo: isReactAPI.ReturnType;
|
|
550
|
+
declare const isLazy: isReactAPI.ReturnType;
|
|
551
|
+
declare const isCaptureOwnerStackCall: isReactAPICall.ReturnType;
|
|
552
|
+
declare const isChildrenCountCall: isReactAPICall.ReturnType;
|
|
553
|
+
declare const isChildrenForEachCall: isReactAPICall.ReturnType;
|
|
554
|
+
declare const isChildrenMapCall: isReactAPICall.ReturnType;
|
|
555
|
+
declare const isChildrenOnlyCall: isReactAPICall.ReturnType;
|
|
556
|
+
declare const isChildrenToArrayCall: isReactAPICall.ReturnType;
|
|
557
|
+
declare const isCloneElementCall: isReactAPICall.ReturnType;
|
|
558
|
+
declare const isCreateContextCall: isReactAPICall.ReturnType;
|
|
559
|
+
declare const isCreateElementCall: isReactAPICall.ReturnType;
|
|
560
|
+
declare const isCreateRefCall: isReactAPICall.ReturnType;
|
|
561
|
+
declare const isForwardRefCall: isReactAPICall.ReturnType;
|
|
562
|
+
declare const isMemoCall: isReactAPICall.ReturnType;
|
|
563
|
+
declare const isLazyCall: isReactAPICall.ReturnType;
|
|
564
|
+
|
|
565
|
+
export { type ClassComponent, type Component, ComponentDetectionHint, type ComponentEffectPhaseKind, ComponentFlag, type ComponentKind, type ComponentLifecyclePhaseKind, type ComponentPhaseKind, ComponentPhaseRelevance, type ComponentStateKind, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, type EffectKind, type FunctionComponent, type Hook, type HookKind, JSXDetectionHint, type SemanticEntry, type SemanticNode, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getComponentFlagFromInitPath, getComponentNameFromId, getElementType, getFunctionComponentId, getInstanceId, hasAnyAttribute, hasAttribute, hasEveryAttribute, hasNoneOrLooseComponentName, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRender, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHostElement, isInitializedFromReact, isInsideRenderMethod, isInstanceIdEqual, isInversePhase, isJsxLike, isJsxText, isKeyedElement, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderLike, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, isValidComponentDefinition, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|
package/dist/index.d.ts
CHANGED
|
@@ -509,33 +509,6 @@ declare function stringifyJsx(node: TSESTree$1.JSXIdentifier | TSESTree$1.JSXMem
|
|
|
509
509
|
/** @internal */
|
|
510
510
|
declare function getInstanceId(node: TSESTree.Node, prev?: TSESTree.Node): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.BinaryExpression | 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.UnaryExpression | TSESTree.UpdateExpression | TSESTree.YieldExpression | TSESTree.PrivateIdentifier | undefined;
|
|
511
511
|
|
|
512
|
-
/** @internal */
|
|
513
|
-
declare function isFromReactLoose(node: TSESTree.Node | _, name: string): boolean;
|
|
514
|
-
/** @internal */
|
|
515
|
-
declare function isFromReactStrict(node: TSESTree.Node | _, name: string, importSource: string, initialScope: Scope): boolean;
|
|
516
|
-
/** @internal */
|
|
517
|
-
declare namespace isFromReact {
|
|
518
|
-
type ReturnType = {
|
|
519
|
-
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
520
|
-
(context: RuleContext, node: TSESTree.Node): node is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
/** @internal */
|
|
524
|
-
declare function isFromReact(name: string): isFromReact.ReturnType;
|
|
525
|
-
/** @internal */
|
|
526
|
-
declare function isFromReactObject(objectName: string, propertyName: string): isFromReact.ReturnType;
|
|
527
|
-
/** @internal */
|
|
528
|
-
declare namespace isCallFromReact {
|
|
529
|
-
type ReturnType = {
|
|
530
|
-
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression;
|
|
531
|
-
(context: RuleContext, node: TSESTree.Node): node is TSESTree.CallExpression;
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
/** @internal */
|
|
535
|
-
declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
|
|
536
|
-
/** @internal */
|
|
537
|
-
declare function isCallFromReactObject(objectName: string, propertyName: string): isCallFromReact.ReturnType;
|
|
538
|
-
|
|
539
512
|
/**
|
|
540
513
|
* Check if an identifier is initialized from react
|
|
541
514
|
* @param name The top-level identifier's name
|
|
@@ -548,35 +521,45 @@ declare function isInitializedFromReact(name: string, importSource: string, init
|
|
|
548
521
|
/** @internal */
|
|
549
522
|
declare function isInstanceIdEqual(context: RuleContext, a: TSESTree.Node, b: TSESTree.Node): boolean;
|
|
550
523
|
|
|
551
|
-
declare
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
declare
|
|
558
|
-
declare
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
declare
|
|
565
|
-
declare const
|
|
566
|
-
declare const
|
|
567
|
-
declare const
|
|
568
|
-
declare const
|
|
569
|
-
declare const
|
|
570
|
-
declare const
|
|
571
|
-
declare const
|
|
572
|
-
declare const
|
|
573
|
-
declare const
|
|
574
|
-
declare const
|
|
575
|
-
declare const
|
|
576
|
-
declare const
|
|
577
|
-
declare const
|
|
578
|
-
declare const
|
|
579
|
-
declare const
|
|
580
|
-
declare const
|
|
581
|
-
|
|
582
|
-
|
|
524
|
+
declare namespace isReactAPI {
|
|
525
|
+
type ReturnType = {
|
|
526
|
+
(context: RuleContext, node: _ | null | TSESTree.Node): node is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
527
|
+
(context: RuleContext): (node: _ | null | TSESTree.Node) => node is TSESTree.MemberExpression | TSESTree.Identifier;
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
declare function isReactAPI(api: string): isReactAPI.ReturnType;
|
|
531
|
+
declare namespace isReactAPICall {
|
|
532
|
+
type ReturnType = {
|
|
533
|
+
(context: RuleContext, node: _ | null | TSESTree.Node): node is TSESTree.CallExpression;
|
|
534
|
+
(context: RuleContext): (node: _ | null | TSESTree.Node) => node is TSESTree.CallExpression;
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
declare function isReactAPICall(api: string): isReactAPICall.ReturnType;
|
|
538
|
+
declare const isCaptureOwnerStack: isReactAPI.ReturnType;
|
|
539
|
+
declare const isChildrenCount: isReactAPI.ReturnType;
|
|
540
|
+
declare const isChildrenForEach: isReactAPI.ReturnType;
|
|
541
|
+
declare const isChildrenMap: isReactAPI.ReturnType;
|
|
542
|
+
declare const isChildrenOnly: isReactAPI.ReturnType;
|
|
543
|
+
declare const isChildrenToArray: isReactAPI.ReturnType;
|
|
544
|
+
declare const isCloneElement: isReactAPI.ReturnType;
|
|
545
|
+
declare const isCreateContext: isReactAPI.ReturnType;
|
|
546
|
+
declare const isCreateElement: isReactAPI.ReturnType;
|
|
547
|
+
declare const isCreateRef: isReactAPI.ReturnType;
|
|
548
|
+
declare const isForwardRef: isReactAPI.ReturnType;
|
|
549
|
+
declare const isMemo: isReactAPI.ReturnType;
|
|
550
|
+
declare const isLazy: isReactAPI.ReturnType;
|
|
551
|
+
declare const isCaptureOwnerStackCall: isReactAPICall.ReturnType;
|
|
552
|
+
declare const isChildrenCountCall: isReactAPICall.ReturnType;
|
|
553
|
+
declare const isChildrenForEachCall: isReactAPICall.ReturnType;
|
|
554
|
+
declare const isChildrenMapCall: isReactAPICall.ReturnType;
|
|
555
|
+
declare const isChildrenOnlyCall: isReactAPICall.ReturnType;
|
|
556
|
+
declare const isChildrenToArrayCall: isReactAPICall.ReturnType;
|
|
557
|
+
declare const isCloneElementCall: isReactAPICall.ReturnType;
|
|
558
|
+
declare const isCreateContextCall: isReactAPICall.ReturnType;
|
|
559
|
+
declare const isCreateElementCall: isReactAPICall.ReturnType;
|
|
560
|
+
declare const isCreateRefCall: isReactAPICall.ReturnType;
|
|
561
|
+
declare const isForwardRefCall: isReactAPICall.ReturnType;
|
|
562
|
+
declare const isMemoCall: isReactAPICall.ReturnType;
|
|
563
|
+
declare const isLazyCall: isReactAPICall.ReturnType;
|
|
564
|
+
|
|
565
|
+
export { type ClassComponent, type Component, ComponentDetectionHint, type ComponentEffectPhaseKind, ComponentFlag, type ComponentKind, type ComponentLifecyclePhaseKind, type ComponentPhaseKind, ComponentPhaseRelevance, type ComponentStateKind, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, type EffectKind, type FunctionComponent, type Hook, type HookKind, JSXDetectionHint, type SemanticEntry, type SemanticNode, findParentAttribute, getAttribute, getAttributeName, getAttributeValue, getComponentFlagFromInitPath, getComponentNameFromId, getElementType, getFunctionComponentId, getInstanceId, hasAnyAttribute, hasAttribute, hasEveryAttribute, hasNoneOrLooseComponentName, isAssignmentToThisState, isCaptureOwnerStack, isCaptureOwnerStackCall, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRender, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isHostElement, isInitializedFromReact, isInsideRenderMethod, isInstanceIdEqual, isInversePhase, isJsxLike, isJsxText, isKeyedElement, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderLike, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, isValidComponentDefinition, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|