@eslint-react/core 2.7.5-next.1 → 2.7.5-next.3
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 +19 -19
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -153,18 +153,6 @@ interface SemanticNode {
|
|
|
153
153
|
hint: bigint;
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
|
-
//#region src/semantic/semantic-function.d.ts
|
|
157
|
-
interface SemanticFunction extends SemanticNode {
|
|
158
|
-
id: AST.FunctionID | unit;
|
|
159
|
-
node: AST.TSESTreeFunction;
|
|
160
|
-
name: string | unit;
|
|
161
|
-
type: TSESTree.TSTypeAnnotation | unit;
|
|
162
|
-
body: TSESTree.BlockStatement | TSESTree.Expression;
|
|
163
|
-
directives: TSESTree.StringLiteral[];
|
|
164
|
-
parameters: TSESTree.Parameter[];
|
|
165
|
-
typeParameters: TSESTree.TSTypeParameterDeclaration | unit;
|
|
166
|
-
}
|
|
167
|
-
//#endregion
|
|
168
156
|
//#region src/component/component-flag.d.ts
|
|
169
157
|
type ComponentFlag = bigint;
|
|
170
158
|
declare const ComponentFlag: {
|
|
@@ -262,7 +250,7 @@ interface ClassComponent extends SemanticNode {
|
|
|
262
250
|
/**
|
|
263
251
|
* Union type representing either a class or function component
|
|
264
252
|
*/
|
|
265
|
-
type
|
|
253
|
+
type ReactComponent = ClassComponent | FunctionComponent;
|
|
266
254
|
//#endregion
|
|
267
255
|
//#region src/component/component-collector.d.ts
|
|
268
256
|
type FunctionEntry$1 = {
|
|
@@ -515,6 +503,18 @@ declare function isComponentWrapperCallback(context: RuleContext, node: TSESTree
|
|
|
515
503
|
*/
|
|
516
504
|
declare function isComponentWrapperCallbackLoose(context: RuleContext, node: TSESTree.Node): boolean;
|
|
517
505
|
//#endregion
|
|
506
|
+
//#region src/function/function-semantic-node.d.ts
|
|
507
|
+
interface ReactFunction extends SemanticNode {
|
|
508
|
+
id: AST.FunctionID | unit;
|
|
509
|
+
node: AST.TSESTreeFunction;
|
|
510
|
+
name: string | unit;
|
|
511
|
+
type: TSESTree.TSTypeAnnotation | unit;
|
|
512
|
+
body: TSESTree.BlockStatement | TSESTree.Expression;
|
|
513
|
+
directives: TSESTree.StringLiteral[];
|
|
514
|
+
parameters: TSESTree.Parameter[];
|
|
515
|
+
typeParameters: TSESTree.TSTypeParameterDeclaration | unit;
|
|
516
|
+
}
|
|
517
|
+
//#endregion
|
|
518
518
|
//#region src/hierarchy/find-enclosing-component-or-hook.d.ts
|
|
519
519
|
type FindEnclosingComponentOrHookFilter = (n: TSESTree.Node, name: string | null) => boolean;
|
|
520
520
|
/**
|
|
@@ -523,7 +523,7 @@ type FindEnclosingComponentOrHookFilter = (n: TSESTree.Node, name: string | null
|
|
|
523
523
|
* @param test Optional test function to customize component or hook identification
|
|
524
524
|
* @returns The enclosing component or hook node, or `null` if none is found
|
|
525
525
|
*/
|
|
526
|
-
declare function findEnclosingComponentOrHook(node: TSESTree.Node | unit, test?: FindEnclosingComponentOrHookFilter): TSESTree.ArrowFunctionExpression | TSESTree.
|
|
526
|
+
declare function findEnclosingComponentOrHook(node: TSESTree.Node | unit, test?: FindEnclosingComponentOrHookFilter): TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | undefined;
|
|
527
527
|
//#endregion
|
|
528
528
|
//#region src/hierarchy/is-inside-component-or-hook.d.ts
|
|
529
529
|
/**
|
|
@@ -546,7 +546,7 @@ declare function isUseEffectSetupCallback(node: TSESTree.Node | unit): boolean;
|
|
|
546
546
|
declare function isUseEffectCleanupCallback(node: TSESTree.Node | unit): boolean;
|
|
547
547
|
//#endregion
|
|
548
548
|
//#region src/hook/hook-semantic-node.d.ts
|
|
549
|
-
interface
|
|
549
|
+
interface ReactHook extends SemanticNode {
|
|
550
550
|
id: AST.FunctionID | unit;
|
|
551
551
|
node: AST.TSESTreeFunction;
|
|
552
552
|
name: string;
|
|
@@ -562,7 +562,7 @@ type FunctionEntry = {
|
|
|
562
562
|
declare namespace useHookCollector {
|
|
563
563
|
type ReturnType = {
|
|
564
564
|
ctx: {
|
|
565
|
-
getAllHooks(node: TSESTree$1.Program):
|
|
565
|
+
getAllHooks(node: TSESTree$1.Program): ReactHook[];
|
|
566
566
|
getCurrentEntries(): FunctionEntry[];
|
|
567
567
|
getCurrentEntry(): FunctionEntry | unit;
|
|
568
568
|
};
|
|
@@ -707,7 +707,7 @@ declare function resolveJsxAttributeValue(context: RuleContext, attribute: AST.T
|
|
|
707
707
|
readonly toStatic: () => string | number | bigint | boolean | RegExp | null;
|
|
708
708
|
} | {
|
|
709
709
|
readonly kind: "expression";
|
|
710
|
-
readonly node: TSESTree.
|
|
710
|
+
readonly node: TSESTree.Expression | TSESTree.JSXEmptyExpression;
|
|
711
711
|
readonly toStatic: () => unknown;
|
|
712
712
|
} | {
|
|
713
713
|
readonly kind: "element";
|
|
@@ -715,7 +715,7 @@ declare function resolveJsxAttributeValue(context: RuleContext, attribute: AST.T
|
|
|
715
715
|
readonly toStatic: () => undefined;
|
|
716
716
|
} | {
|
|
717
717
|
readonly kind: "spreadChild";
|
|
718
|
-
readonly node: TSESTree.
|
|
718
|
+
readonly node: TSESTree.Expression | TSESTree.JSXEmptyExpression;
|
|
719
719
|
readonly toStatic: () => undefined;
|
|
720
720
|
} | {
|
|
721
721
|
readonly kind: "spreadProps";
|
|
@@ -871,4 +871,4 @@ declare function isInitializedFromRef(name: string, initialScope: Scope): boolea
|
|
|
871
871
|
*/
|
|
872
872
|
declare function isRefName(name: string): boolean;
|
|
873
873
|
//#endregion
|
|
874
|
-
export { ClassComponent,
|
|
874
|
+
export { ClassComponent, ComponentDetectionHint, ComponentEffectPhaseKind, ComponentFlag, ComponentKind, ComponentLifecyclePhaseKind, ComponentPhaseKind, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponent, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, ReactComponent, ReactFunction, ReactHook, SemanticEntry, SemanticNode, 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, isInitializedFromRef, isInsideComponentOrHook, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRefName, 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.5-next.
|
|
3
|
+
"version": "2.7.5-next.3",
|
|
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": {
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"./package.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@typescript-eslint/scope-manager": "^8.
|
|
34
|
-
"@typescript-eslint/types": "^8.
|
|
35
|
-
"@typescript-eslint/utils": "^8.
|
|
33
|
+
"@typescript-eslint/scope-manager": "^8.54.0",
|
|
34
|
+
"@typescript-eslint/types": "^8.54.0",
|
|
35
|
+
"@typescript-eslint/utils": "^8.54.0",
|
|
36
36
|
"birecord": "^0.1.1",
|
|
37
37
|
"ts-pattern": "^5.9.0",
|
|
38
|
-
"@eslint-react/
|
|
39
|
-
"@eslint-react/
|
|
40
|
-
"@eslint-react/
|
|
41
|
-
"@eslint-react/
|
|
38
|
+
"@eslint-react/eff": "2.7.5-next.3",
|
|
39
|
+
"@eslint-react/var": "2.7.5-next.3",
|
|
40
|
+
"@eslint-react/ast": "2.7.5-next.3",
|
|
41
|
+
"@eslint-react/shared": "2.7.5-next.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsdown": "^0.20.1",
|