@eslint-react/core 2.7.5-beta.0 → 2.7.5-beta.4
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 +30 -24
- package/dist/index.js +35 -35
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -127,21 +127,6 @@ declare const ComponentDetectionHint: {
|
|
|
127
127
|
*/
|
|
128
128
|
declare const DEFAULT_COMPONENT_DETECTION_HINT: bigint;
|
|
129
129
|
//#endregion
|
|
130
|
-
//#region src/component/component-phase.d.ts
|
|
131
|
-
type ComponentEffectPhaseKind = "cleanup" | "setup";
|
|
132
|
-
type ComponentLifecyclePhaseKind = "mount" | "unmount";
|
|
133
|
-
type ComponentPhaseKind = ComponentEffectPhaseKind | ComponentLifecyclePhaseKind;
|
|
134
|
-
declare const ComponentPhaseRelevance: birecord0.BiRecord<{
|
|
135
|
-
readonly mount: "unmount";
|
|
136
|
-
readonly setup: "cleanup";
|
|
137
|
-
}>;
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region src/semantic/semantic-entry.d.ts
|
|
140
|
-
interface SemanticEntry {
|
|
141
|
-
node: TSESTree.Node;
|
|
142
|
-
phase: ComponentPhaseKind;
|
|
143
|
-
}
|
|
144
|
-
//#endregion
|
|
145
130
|
//#region src/semantic/semantic-node.d.ts
|
|
146
131
|
interface SemanticNode {
|
|
147
132
|
id: unit | TSESTree.Node;
|
|
@@ -153,6 +138,18 @@ interface SemanticNode {
|
|
|
153
138
|
hint: bigint;
|
|
154
139
|
}
|
|
155
140
|
//#endregion
|
|
141
|
+
//#region src/semantic/semantic-func.d.ts
|
|
142
|
+
interface SemanticFunc extends SemanticNode {
|
|
143
|
+
id: AST.FunctionID | unit;
|
|
144
|
+
node: AST.TSESTreeFunction;
|
|
145
|
+
name: string | unit;
|
|
146
|
+
type: TSESTree.TSTypeAnnotation | unit;
|
|
147
|
+
body: TSESTree.BlockStatement | TSESTree.Expression;
|
|
148
|
+
directives: TSESTree.StringLiteral[];
|
|
149
|
+
parameters: TSESTree.Parameter[];
|
|
150
|
+
typeParameters: TSESTree.TSTypeParameterDeclaration | unit;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
156
153
|
//#region src/component/component-flag.d.ts
|
|
157
154
|
type ComponentFlag = bigint;
|
|
158
155
|
declare const ComponentFlag: {
|
|
@@ -400,6 +397,15 @@ declare function isComponentNameLoose(name: string): boolean;
|
|
|
400
397
|
*/
|
|
401
398
|
declare function hasNoneOrLooseComponentName(context: RuleContext, fn: AST.TSESTreeFunction): boolean;
|
|
402
399
|
//#endregion
|
|
400
|
+
//#region src/component/component-phase.d.ts
|
|
401
|
+
type ComponentEffectPhaseKind = "cleanup" | "setup";
|
|
402
|
+
type ComponentLifecyclePhaseKind = "mount" | "unmount";
|
|
403
|
+
type ComponentPhaseKind = ComponentEffectPhaseKind | ComponentLifecyclePhaseKind;
|
|
404
|
+
declare const ComponentPhaseRelevance: birecord0.BiRecord<{
|
|
405
|
+
readonly mount: "unmount";
|
|
406
|
+
readonly setup: "cleanup";
|
|
407
|
+
}>;
|
|
408
|
+
//#endregion
|
|
403
409
|
//#region src/component/component-phase-helpers.d.ts
|
|
404
410
|
declare const isInversePhase: {
|
|
405
411
|
(a: ComponentPhaseKind): (b: ComponentPhaseKind) => boolean;
|
|
@@ -511,7 +517,7 @@ type FindEnclosingComponentOrHookFilter = (n: TSESTree.Node, name: string | null
|
|
|
511
517
|
* @param test Optional test function to customize component or hook identification
|
|
512
518
|
* @returns The enclosing component or hook node, or `null` if none is found
|
|
513
519
|
*/
|
|
514
|
-
declare function findEnclosingComponentOrHook(node: TSESTree.Node | unit, test?: FindEnclosingComponentOrHookFilter): TSESTree.ArrowFunctionExpression | TSESTree.
|
|
520
|
+
declare function findEnclosingComponentOrHook(node: TSESTree.Node | unit, test?: FindEnclosingComponentOrHookFilter): TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | undefined;
|
|
515
521
|
//#endregion
|
|
516
522
|
//#region src/hierarchy/is-inside-component-or-hook.d.ts
|
|
517
523
|
/**
|
|
@@ -565,7 +571,7 @@ declare namespace useHookCollector {
|
|
|
565
571
|
declare function useHookCollector(context: RuleContext): useHookCollector.ReturnType;
|
|
566
572
|
//#endregion
|
|
567
573
|
//#region src/hook/hook-id.d.ts
|
|
568
|
-
declare function
|
|
574
|
+
declare function isHookId(id: TSESTree.Node): id is TSESTree.Identifier | TSESTree.MemberExpression;
|
|
569
575
|
//#endregion
|
|
570
576
|
//#region src/hook/hook-is.d.ts
|
|
571
577
|
/**
|
|
@@ -573,20 +579,20 @@ declare function isReactHookId(id: TSESTree.Node): id is TSESTree.Identifier | T
|
|
|
573
579
|
* @param node The function node to check
|
|
574
580
|
* @returns True if the function is a React Hook, false otherwise
|
|
575
581
|
*/
|
|
576
|
-
declare function
|
|
582
|
+
declare function isHook(node: AST.TSESTreeFunction | unit): boolean;
|
|
577
583
|
/**
|
|
578
584
|
* Check if the given node is a React Hook call by its name.
|
|
579
585
|
* @param node The node to check.
|
|
580
586
|
* @returns `true` if the node is a React Hook call, `false` otherwise.
|
|
581
587
|
*/
|
|
582
|
-
declare function
|
|
588
|
+
declare function isHookCall(node: TSESTree.Node | unit): node is TSESTree.CallExpression;
|
|
583
589
|
/**
|
|
584
590
|
* Checks if a node is a call to a specific React hook.
|
|
585
591
|
* Returns a function that accepts a hook name to check against.
|
|
586
592
|
* @param node The AST node to check
|
|
587
593
|
* @returns A function that takes a hook name and returns boolean
|
|
588
594
|
*/
|
|
589
|
-
declare function
|
|
595
|
+
declare function isHookCallWithName(node: TSESTree.Node | unit): (name: string) => boolean;
|
|
590
596
|
/**
|
|
591
597
|
* Detects useEffect calls and variations (useLayoutEffect, etc.) using regex pattern.
|
|
592
598
|
* @param node The AST node to check
|
|
@@ -629,7 +635,7 @@ declare const REACT_BUILTIN_HOOK_NAMES: readonly ["use", "useActionState", "useC
|
|
|
629
635
|
* @param name The name of the identifier to check.
|
|
630
636
|
* @see https://github.com/facebook/react/blob/1d6c8168db1d82713202e842df3167787ffa00ed/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts#L16
|
|
631
637
|
*/
|
|
632
|
-
declare function
|
|
638
|
+
declare function isHookName(name: string): boolean;
|
|
633
639
|
//#endregion
|
|
634
640
|
//#region src/jsx/jsx-attribute.d.ts
|
|
635
641
|
/**
|
|
@@ -695,7 +701,7 @@ declare function resolveJsxAttributeValue(context: RuleContext, attribute: AST.T
|
|
|
695
701
|
readonly toStatic: () => string | number | bigint | boolean | RegExp | null;
|
|
696
702
|
} | {
|
|
697
703
|
readonly kind: "expression";
|
|
698
|
-
readonly node: TSESTree.
|
|
704
|
+
readonly node: TSESTree.JSXEmptyExpression | TSESTree.Expression;
|
|
699
705
|
readonly toStatic: () => unknown;
|
|
700
706
|
} | {
|
|
701
707
|
readonly kind: "element";
|
|
@@ -703,7 +709,7 @@ declare function resolveJsxAttributeValue(context: RuleContext, attribute: AST.T
|
|
|
703
709
|
readonly toStatic: () => undefined;
|
|
704
710
|
} | {
|
|
705
711
|
readonly kind: "spreadChild";
|
|
706
|
-
readonly node: TSESTree.
|
|
712
|
+
readonly node: TSESTree.JSXEmptyExpression | TSESTree.Expression;
|
|
707
713
|
readonly toStatic: () => undefined;
|
|
708
714
|
} | {
|
|
709
715
|
readonly kind: "spreadProps";
|
|
@@ -859,4 +865,4 @@ declare function isInitializedFromRef(name: string, initialScope: Scope): boolea
|
|
|
859
865
|
*/
|
|
860
866
|
declare function isRefName(name: string): boolean;
|
|
861
867
|
//#endregion
|
|
862
|
-
export { ClassComponent, Component, ComponentDetectionHint, ComponentEffectPhaseKind, ComponentFlag, ComponentKind, ComponentLifecyclePhaseKind, ComponentPhaseKind, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponent, Hook, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES,
|
|
868
|
+
export { ClassComponent, Component, ComponentDetectionHint, ComponentEffectPhaseKind, ComponentFlag, ComponentKind, ComponentLifecyclePhaseKind, ComponentPhaseKind, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, FindEnclosingComponentOrHookFilter, FunctionComponent, Hook, JsxAttributeValue, JsxConfig, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, SemanticFunc, 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, isHook, isHookCall, isHookCallWithName, isHookId, isHookName, isInitializedFromReact, isInitializedFromReactNative, isInitializedFromRef, isInsideComponentOrHook, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, 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/dist/index.js
CHANGED
|
@@ -124,7 +124,7 @@ const REACT_BUILTIN_HOOK_NAMES = [
|
|
|
124
124
|
* @param name The name of the identifier to check.
|
|
125
125
|
* @see https://github.com/facebook/react/blob/1d6c8168db1d82713202e842df3167787ffa00ed/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts#L16
|
|
126
126
|
*/
|
|
127
|
-
function
|
|
127
|
+
function isHookName(name) {
|
|
128
128
|
return name === "use" || /^use[A-Z0-9]/.test(name);
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -135,12 +135,12 @@ function isReactHookName(name) {
|
|
|
135
135
|
* @param node The function node to check
|
|
136
136
|
* @returns True if the function is a React Hook, false otherwise
|
|
137
137
|
*/
|
|
138
|
-
function
|
|
138
|
+
function isHook(node) {
|
|
139
139
|
if (node == null) return false;
|
|
140
140
|
const id = AST.getFunctionId(node);
|
|
141
141
|
switch (id?.type) {
|
|
142
|
-
case AST_NODE_TYPES.Identifier: return
|
|
143
|
-
case AST_NODE_TYPES.MemberExpression: return "name" in id.property &&
|
|
142
|
+
case AST_NODE_TYPES.Identifier: return isHookName(id.name);
|
|
143
|
+
case AST_NODE_TYPES.MemberExpression: return "name" in id.property && isHookName(id.property.name);
|
|
144
144
|
default: return false;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
@@ -149,11 +149,11 @@ function isReactHook(node) {
|
|
|
149
149
|
* @param node The node to check.
|
|
150
150
|
* @returns `true` if the node is a React Hook call, `false` otherwise.
|
|
151
151
|
*/
|
|
152
|
-
function
|
|
152
|
+
function isHookCall(node) {
|
|
153
153
|
if (node == null) return false;
|
|
154
154
|
if (node.type !== AST_NODE_TYPES.CallExpression) return false;
|
|
155
|
-
if (node.callee.type === AST_NODE_TYPES.Identifier) return
|
|
156
|
-
if (node.callee.type === AST_NODE_TYPES.MemberExpression) return node.callee.property.type === AST_NODE_TYPES.Identifier &&
|
|
155
|
+
if (node.callee.type === AST_NODE_TYPES.Identifier) return isHookName(node.callee.name);
|
|
156
|
+
if (node.callee.type === AST_NODE_TYPES.MemberExpression) return node.callee.property.type === AST_NODE_TYPES.Identifier && isHookName(node.callee.property.name);
|
|
157
157
|
return false;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
@@ -162,7 +162,7 @@ function isReactHookCall(node) {
|
|
|
162
162
|
* @param node The AST node to check
|
|
163
163
|
* @returns A function that takes a hook name and returns boolean
|
|
164
164
|
*/
|
|
165
|
-
function
|
|
165
|
+
function isHookCallWithName(node) {
|
|
166
166
|
if (node == null || node.type !== AST_NODE_TYPES.CallExpression) return constFalse;
|
|
167
167
|
return (name) => {
|
|
168
168
|
switch (node.callee.type) {
|
|
@@ -202,25 +202,25 @@ function isUseStateLikeCall(node, additionalStateHooks = { test: constFalse }) {
|
|
|
202
202
|
return false;
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
const isUseCall = flip(
|
|
206
|
-
const isUseActionStateCall = flip(
|
|
207
|
-
const isUseCallbackCall = flip(
|
|
208
|
-
const isUseContextCall = flip(
|
|
209
|
-
const isUseDebugValueCall = flip(
|
|
210
|
-
const isUseDeferredValueCall = flip(
|
|
211
|
-
const isUseEffectCall = flip(
|
|
212
|
-
const isUseFormStatusCall = flip(
|
|
213
|
-
const isUseIdCall = flip(
|
|
214
|
-
const isUseImperativeHandleCall = flip(
|
|
215
|
-
const isUseInsertionEffectCall = flip(
|
|
216
|
-
const isUseLayoutEffectCall = flip(
|
|
217
|
-
const isUseMemoCall = flip(
|
|
218
|
-
const isUseOptimisticCall = flip(
|
|
219
|
-
const isUseReducerCall = flip(
|
|
220
|
-
const isUseRefCall = flip(
|
|
221
|
-
const isUseStateCall = flip(
|
|
222
|
-
const isUseSyncExternalStoreCall = flip(
|
|
223
|
-
const isUseTransitionCall = flip(
|
|
205
|
+
const isUseCall = flip(isHookCallWithName)("use");
|
|
206
|
+
const isUseActionStateCall = flip(isHookCallWithName)("useActionState");
|
|
207
|
+
const isUseCallbackCall = flip(isHookCallWithName)("useCallback");
|
|
208
|
+
const isUseContextCall = flip(isHookCallWithName)("useContext");
|
|
209
|
+
const isUseDebugValueCall = flip(isHookCallWithName)("useDebugValue");
|
|
210
|
+
const isUseDeferredValueCall = flip(isHookCallWithName)("useDeferredValue");
|
|
211
|
+
const isUseEffectCall = flip(isHookCallWithName)("useEffect");
|
|
212
|
+
const isUseFormStatusCall = flip(isHookCallWithName)("useFormStatus");
|
|
213
|
+
const isUseIdCall = flip(isHookCallWithName)("useId");
|
|
214
|
+
const isUseImperativeHandleCall = flip(isHookCallWithName)("useImperativeHandle");
|
|
215
|
+
const isUseInsertionEffectCall = flip(isHookCallWithName)("useInsertionEffect");
|
|
216
|
+
const isUseLayoutEffectCall = flip(isHookCallWithName)("useLayoutEffect");
|
|
217
|
+
const isUseMemoCall = flip(isHookCallWithName)("useMemo");
|
|
218
|
+
const isUseOptimisticCall = flip(isHookCallWithName)("useOptimistic");
|
|
219
|
+
const isUseReducerCall = flip(isHookCallWithName)("useReducer");
|
|
220
|
+
const isUseRefCall = flip(isHookCallWithName)("useRef");
|
|
221
|
+
const isUseStateCall = flip(isHookCallWithName)("useState");
|
|
222
|
+
const isUseSyncExternalStoreCall = flip(isHookCallWithName)("useSyncExternalStore");
|
|
223
|
+
const isUseTransitionCall = flip(isHookCallWithName)("useTransition");
|
|
224
224
|
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/hook/hook-callback.ts
|
|
@@ -246,10 +246,10 @@ function isUseEffectCleanupCallback(node) {
|
|
|
246
246
|
|
|
247
247
|
//#endregion
|
|
248
248
|
//#region src/hook/hook-id.ts
|
|
249
|
-
function
|
|
249
|
+
function isHookId(id) {
|
|
250
250
|
switch (id.type) {
|
|
251
|
-
case AST_NODE_TYPES.Identifier: return
|
|
252
|
-
case AST_NODE_TYPES.MemberExpression: return "name" in id.property &&
|
|
251
|
+
case AST_NODE_TYPES.Identifier: return isHookName(id.name);
|
|
252
|
+
case AST_NODE_TYPES.MemberExpression: return "name" in id.property && isHookName(id.property.name);
|
|
253
253
|
default: return false;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
@@ -270,7 +270,7 @@ function useHookCollector(context) {
|
|
|
270
270
|
const onFunctionEnter = (node) => {
|
|
271
271
|
const id = AST.getFunctionId(node);
|
|
272
272
|
const key = idGen$2.next();
|
|
273
|
-
if (id != null &&
|
|
273
|
+
if (id != null && isHookId(id)) {
|
|
274
274
|
functionEntries.push({
|
|
275
275
|
key,
|
|
276
276
|
node,
|
|
@@ -309,7 +309,7 @@ function useHookCollector(context) {
|
|
|
309
309
|
":function": onFunctionEnter,
|
|
310
310
|
":function:exit": onFunctionExit,
|
|
311
311
|
CallExpression(node) {
|
|
312
|
-
if (!
|
|
312
|
+
if (!isHookCall(node)) return;
|
|
313
313
|
const fEntry = getCurrentEntry();
|
|
314
314
|
if (fEntry?.key == null) return;
|
|
315
315
|
const hook = hooks.get(fEntry.key);
|
|
@@ -1004,7 +1004,7 @@ function useComponentCollector(context, options = {}) {
|
|
|
1004
1004
|
component.displayName = right;
|
|
1005
1005
|
} } : {},
|
|
1006
1006
|
...collectHookCalls ? { "CallExpression:exit"(node) {
|
|
1007
|
-
if (!
|
|
1007
|
+
if (!isHookCall(node)) return;
|
|
1008
1008
|
const entry = getCurrentEntry();
|
|
1009
1009
|
if (entry == null) return;
|
|
1010
1010
|
entry.hookCalls.push(node);
|
|
@@ -1248,7 +1248,7 @@ function isDeclaredInRenderPropLoose(node) {
|
|
|
1248
1248
|
*/
|
|
1249
1249
|
function findEnclosingComponentOrHook(node, test = (n, name) => {
|
|
1250
1250
|
if (name == null) return false;
|
|
1251
|
-
return isComponentNameLoose(name) ||
|
|
1251
|
+
return isComponentNameLoose(name) || isHookName(name);
|
|
1252
1252
|
}) {
|
|
1253
1253
|
const enclosingNode = AST.findParentNode(node, (n) => {
|
|
1254
1254
|
if (!AST.isFunction(n)) return false;
|
|
@@ -1304,4 +1304,4 @@ function isInitializedFromRef(name, initialScope) {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
|
|
1306
1306
|
//#endregion
|
|
1307
|
-
export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, 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,
|
|
1307
|
+
export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, 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, isHook, isHookCall, isHookCallWithName, isHookId, isHookName, isInitializedFromReact, isInitializedFromReactNative, isInitializedFromRef, isInsideComponentOrHook, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, 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-beta.
|
|
3
|
+
"version": "2.7.5-beta.4",
|
|
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/var": "2.7.5-beta.
|
|
41
|
-
"@eslint-react/eff": "2.7.5-beta.
|
|
38
|
+
"@eslint-react/shared": "2.7.5-beta.4",
|
|
39
|
+
"@eslint-react/ast": "2.7.5-beta.4",
|
|
40
|
+
"@eslint-react/var": "2.7.5-beta.4",
|
|
41
|
+
"@eslint-react/eff": "2.7.5-beta.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsdown": "^0.20.1",
|