@eslint-react/core 1.43.0 → 1.43.2-beta.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 +2 -11
- package/dist/index.d.ts +2 -11
- package/dist/index.js +746 -352
- package/dist/index.mjs +747 -348
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RuleContext } from '@eslint-react/kit';
|
|
2
1
|
import { TSESTree } from '@typescript-eslint/types';
|
|
3
2
|
import { ESLintUtils, TSESTree as TSESTree$1 } from '@typescript-eslint/utils';
|
|
4
3
|
import * as AST from '@eslint-react/ast';
|
|
5
4
|
import { _ } from '@eslint-react/eff';
|
|
5
|
+
import { RuleContext } from '@eslint-react/kit';
|
|
6
6
|
import * as birecord from 'birecord';
|
|
7
7
|
import { Scope } from '@typescript-eslint/scope-manager';
|
|
8
8
|
|
|
@@ -163,8 +163,6 @@ declare function isUnsafeComponentWillUpdate(node: TSESTree.Node): node is AST.T
|
|
|
163
163
|
declare function isGetDerivedStateFromProps(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
164
164
|
declare function isGetDerivedStateFromError(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
165
165
|
|
|
166
|
-
declare const RE_COMPONENT_NAME: RegExp;
|
|
167
|
-
declare const RE_COMPONENT_NAME_LOOSE: RegExp;
|
|
168
166
|
declare function isComponentName(name: string): boolean;
|
|
169
167
|
declare function isComponentNameLoose(name: string): boolean;
|
|
170
168
|
declare function getComponentNameFromId(id: TSESTree.Identifier | TSESTree.Identifier[] | _): string | undefined;
|
|
@@ -343,11 +341,6 @@ declare function isClassComponent(node: TSESTree.Node): node is AST.TSESTreeClas
|
|
|
343
341
|
*/
|
|
344
342
|
declare function isPureComponent(node: TSESTree.Node): boolean;
|
|
345
343
|
|
|
346
|
-
/**
|
|
347
|
-
* The ESQuery selector for a component display name assignment expression
|
|
348
|
-
*/
|
|
349
|
-
declare const DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
350
|
-
|
|
351
344
|
type EffectKind = "useEffect" | "useLayoutEffect" | "useInsertionEffect";
|
|
352
345
|
|
|
353
346
|
declare function isFunctionOfUseEffectSetup(node: TSESTree.Node | _): boolean;
|
|
@@ -372,9 +365,7 @@ declare function useHookCollector(): useHookCollector.ReturnType;
|
|
|
372
365
|
|
|
373
366
|
type HookKind = "custom" | "useActionState" | "useCallback" | "useContext" | "useDebugValue" | "useDeferredValue" | "useEffect" | "useId" | "useImperativeHandle" | "useInsertionEffect" | "useLayoutEffect" | "useMemo" | "useOptimistic" | "useReducer" | "useRef" | "useState" | "useSyncExternalStore" | "useTransition";
|
|
374
367
|
|
|
375
|
-
declare const RE_HOOK_NAME: RegExp;
|
|
376
368
|
declare function isReactHookName(name: string): boolean;
|
|
377
|
-
declare function isReactHookNameLoose(name: string): boolean;
|
|
378
369
|
|
|
379
370
|
declare function isReactHook(node: AST.TSESTreeFunction | _): boolean;
|
|
380
371
|
/**
|
|
@@ -481,4 +472,4 @@ declare const isCreateRefCall: isCallFromReact.ReturnType;
|
|
|
481
472
|
declare const isForwardRefCall: isCallFromReact.ReturnType;
|
|
482
473
|
declare const isMemoCall: isCallFromReact.ReturnType;
|
|
483
474
|
|
|
484
|
-
export { type ClassComponent, type Component, ComponentDetectionHint, type ComponentEffectPhaseKind, ComponentFlag, type ComponentKind, type ComponentLifecyclePhaseKind, type ComponentPhaseKind, ComponentPhaseRelevance, type ComponentStateKind, DEFAULT_COMPONENT_DETECTION_HINT,
|
|
475
|
+
export { type ClassComponent, type Component, ComponentDetectionHint, type ComponentEffectPhaseKind, ComponentFlag, type ComponentKind, type ComponentLifecyclePhaseKind, type ComponentPhaseKind, ComponentPhaseRelevance, type ComponentStateKind, DEFAULT_COMPONENT_DETECTION_HINT, type EffectKind, type FunctionComponent, type Hook, type HookKind, type SemanticEntry, type SemanticNode, getComponentFlagFromInitPath, getComponentNameFromId, getFunctionComponentId, getInstanceId, hasNoneOrLooseComponentName, isAssignmentToThisState, isCallFromReact, isCallFromReactObject, 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, isFromReact, isFromReactLoose, isFromReactObject, isFromReactStrict, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRender, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInsideRenderMethod, isInstanceIdEqual, isInversePhase, 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, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RuleContext } from '@eslint-react/kit';
|
|
2
1
|
import { TSESTree } from '@typescript-eslint/types';
|
|
3
2
|
import { ESLintUtils, TSESTree as TSESTree$1 } from '@typescript-eslint/utils';
|
|
4
3
|
import * as AST from '@eslint-react/ast';
|
|
5
4
|
import { _ } from '@eslint-react/eff';
|
|
5
|
+
import { RuleContext } from '@eslint-react/kit';
|
|
6
6
|
import * as birecord from 'birecord';
|
|
7
7
|
import { Scope } from '@typescript-eslint/scope-manager';
|
|
8
8
|
|
|
@@ -163,8 +163,6 @@ declare function isUnsafeComponentWillUpdate(node: TSESTree.Node): node is AST.T
|
|
|
163
163
|
declare function isGetDerivedStateFromProps(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
164
164
|
declare function isGetDerivedStateFromError(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
165
165
|
|
|
166
|
-
declare const RE_COMPONENT_NAME: RegExp;
|
|
167
|
-
declare const RE_COMPONENT_NAME_LOOSE: RegExp;
|
|
168
166
|
declare function isComponentName(name: string): boolean;
|
|
169
167
|
declare function isComponentNameLoose(name: string): boolean;
|
|
170
168
|
declare function getComponentNameFromId(id: TSESTree.Identifier | TSESTree.Identifier[] | _): string | undefined;
|
|
@@ -343,11 +341,6 @@ declare function isClassComponent(node: TSESTree.Node): node is AST.TSESTreeClas
|
|
|
343
341
|
*/
|
|
344
342
|
declare function isPureComponent(node: TSESTree.Node): boolean;
|
|
345
343
|
|
|
346
|
-
/**
|
|
347
|
-
* The ESQuery selector for a component display name assignment expression
|
|
348
|
-
*/
|
|
349
|
-
declare const DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
350
|
-
|
|
351
344
|
type EffectKind = "useEffect" | "useLayoutEffect" | "useInsertionEffect";
|
|
352
345
|
|
|
353
346
|
declare function isFunctionOfUseEffectSetup(node: TSESTree.Node | _): boolean;
|
|
@@ -372,9 +365,7 @@ declare function useHookCollector(): useHookCollector.ReturnType;
|
|
|
372
365
|
|
|
373
366
|
type HookKind = "custom" | "useActionState" | "useCallback" | "useContext" | "useDebugValue" | "useDeferredValue" | "useEffect" | "useId" | "useImperativeHandle" | "useInsertionEffect" | "useLayoutEffect" | "useMemo" | "useOptimistic" | "useReducer" | "useRef" | "useState" | "useSyncExternalStore" | "useTransition";
|
|
374
367
|
|
|
375
|
-
declare const RE_HOOK_NAME: RegExp;
|
|
376
368
|
declare function isReactHookName(name: string): boolean;
|
|
377
|
-
declare function isReactHookNameLoose(name: string): boolean;
|
|
378
369
|
|
|
379
370
|
declare function isReactHook(node: AST.TSESTreeFunction | _): boolean;
|
|
380
371
|
/**
|
|
@@ -481,4 +472,4 @@ declare const isCreateRefCall: isCallFromReact.ReturnType;
|
|
|
481
472
|
declare const isForwardRefCall: isCallFromReact.ReturnType;
|
|
482
473
|
declare const isMemoCall: isCallFromReact.ReturnType;
|
|
483
474
|
|
|
484
|
-
export { type ClassComponent, type Component, ComponentDetectionHint, type ComponentEffectPhaseKind, ComponentFlag, type ComponentKind, type ComponentLifecyclePhaseKind, type ComponentPhaseKind, ComponentPhaseRelevance, type ComponentStateKind, DEFAULT_COMPONENT_DETECTION_HINT,
|
|
475
|
+
export { type ClassComponent, type Component, ComponentDetectionHint, type ComponentEffectPhaseKind, ComponentFlag, type ComponentKind, type ComponentLifecyclePhaseKind, type ComponentPhaseKind, ComponentPhaseRelevance, type ComponentStateKind, DEFAULT_COMPONENT_DETECTION_HINT, type EffectKind, type FunctionComponent, type Hook, type HookKind, type SemanticEntry, type SemanticNode, getComponentFlagFromInitPath, getComponentNameFromId, getFunctionComponentId, getInstanceId, hasNoneOrLooseComponentName, isAssignmentToThisState, isCallFromReact, isCallFromReactObject, 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, isFromReact, isFromReactLoose, isFromReactObject, isFromReactStrict, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRender, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInsideRenderMethod, isInstanceIdEqual, isInversePhase, 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, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|