@eslint-react/core 2.6.5-next.0 → 2.7.0-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.ts +21 -19
- package/dist/index.js +34 -30
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as AST from "@eslint-react/ast";
|
|
2
2
|
import { unit } from "@eslint-react/eff";
|
|
3
|
-
import { RuleContext } from "@eslint-react/shared";
|
|
3
|
+
import { RegExpLike, RuleContext } from "@eslint-react/shared";
|
|
4
4
|
import { TSESTree } from "@typescript-eslint/types";
|
|
5
5
|
import { ESLintUtils, TSESTree as TSESTree$1 } from "@typescript-eslint/utils";
|
|
6
6
|
import * as birecord0 from "birecord";
|
|
@@ -133,7 +133,7 @@ interface ClassComponent extends SemanticNode {
|
|
|
133
133
|
/**
|
|
134
134
|
* The identifier of the component
|
|
135
135
|
*/
|
|
136
|
-
id: unit | TSESTree.
|
|
136
|
+
id: unit | TSESTree.BindingName;
|
|
137
137
|
/**
|
|
138
138
|
* The kind of component
|
|
139
139
|
*/
|
|
@@ -206,9 +206,10 @@ declare namespace useComponentCollectorLegacy {
|
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* Get a ctx and listeners object for the rule to collect class components
|
|
209
|
+
* @param context The ESLint rule context
|
|
209
210
|
* @returns The context and listeners for the rule
|
|
210
211
|
*/
|
|
211
|
-
declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
|
|
212
|
+
declare function useComponentCollectorLegacy(context: RuleContext): useComponentCollectorLegacy.ReturnType;
|
|
212
213
|
/**
|
|
213
214
|
* Check whether the given node is a this.setState() call
|
|
214
215
|
* @param node The node to check
|
|
@@ -428,18 +429,18 @@ type AssignmentTarget = ReturnType<typeof findEnclosingAssignmentTarget>;
|
|
|
428
429
|
//#region src/hierarchy/find-enclosing-component-or-hook.d.ts
|
|
429
430
|
type FindEnclosingComponentOrHookFilter = (n: TSESTree.Node, name: string | null) => boolean;
|
|
430
431
|
/**
|
|
431
|
-
* Find the enclosing React component or hook for a given AST node
|
|
432
|
-
* @param node The AST node to start the search from
|
|
433
|
-
* @param test Optional test function to customize component or hook identification
|
|
434
|
-
* @returns The enclosing component or hook node, or `null` if none is found
|
|
432
|
+
* Find the enclosing React component or hook for a given AST node
|
|
433
|
+
* @param node The AST node to start the search from
|
|
434
|
+
* @param test Optional test function to customize component or hook identification
|
|
435
|
+
* @returns The enclosing component or hook node, or `null` if none is found
|
|
435
436
|
*/
|
|
436
437
|
declare function findEnclosingComponentOrHook(node: TSESTree.Node | unit, test?: FindEnclosingComponentOrHookFilter): TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | undefined;
|
|
437
438
|
//#endregion
|
|
438
439
|
//#region src/hierarchy/is-inside-component-or-hook.d.ts
|
|
439
440
|
/**
|
|
440
|
-
* Checks if a given AST node is inside a React component or hook
|
|
441
|
-
* @param node The AST node to check
|
|
442
|
-
* @returns True if the node is inside a component or hook, false otherwise
|
|
441
|
+
* Checks if a given AST node is inside a React component or hook
|
|
442
|
+
* @param node The AST node to check
|
|
443
|
+
* @returns True if the node is inside a component or hook, false otherwise
|
|
443
444
|
*/
|
|
444
445
|
declare function isInsideComponentOrHook(node: TSESTree.Node | unit): boolean;
|
|
445
446
|
//#endregion
|
|
@@ -492,19 +493,20 @@ declare function isReactHookCall(node: TSESTree.Node | unit): node is TSESTree.C
|
|
|
492
493
|
* @returns A function that takes a hook name and returns boolean
|
|
493
494
|
*/
|
|
494
495
|
declare function isReactHookCallWithName(node: TSESTree.Node | unit): (name: string) => boolean;
|
|
495
|
-
/**
|
|
496
|
-
* Checks if a node is a call to a specific React hook or one of its aliases.
|
|
497
|
-
* @param name The primary hook name to check
|
|
498
|
-
* @param alias Optional array of alias names to also accept
|
|
499
|
-
* @returns Function that checks if a node matches the hook name or aliases
|
|
500
|
-
*/
|
|
501
|
-
declare function isReactHookCallWithNameAlias(name: string, alias?: unit | string[]): (node: TSESTree.CallExpression) => boolean;
|
|
502
496
|
/**
|
|
503
497
|
* Detects useEffect calls and variations (useLayoutEffect, etc.) using regex pattern.
|
|
504
498
|
* @param node The AST node to check
|
|
499
|
+
* @param additionalEffectHooks Regex pattern matching custom hooks that should be treated as effect hooks
|
|
505
500
|
* @returns True if the node is a useEffect-like call
|
|
506
501
|
*/
|
|
507
|
-
declare function isUseEffectLikeCall(node: TSESTree.Node | unit):
|
|
502
|
+
declare function isUseEffectLikeCall(node: TSESTree.Node | unit, additionalEffectHooks?: RegExpLike): node is TSESTree.CallExpression;
|
|
503
|
+
/**
|
|
504
|
+
* Detects useState calls and variations (useCustomState, etc.) using regex pattern.
|
|
505
|
+
* @param node The AST node to check
|
|
506
|
+
* @param additionalStateHooks Regex pattern matching custom hooks that should be treated as state hooks
|
|
507
|
+
* @returns True if the node is a useState-like call
|
|
508
|
+
*/
|
|
509
|
+
declare function isUseStateLikeCall(node: TSESTree.Node | unit, additionalStateHooks?: RegExpLike): node is TSESTree.CallExpression;
|
|
508
510
|
declare const isUseCall: (node: TSESTree.Node | undefined) => boolean;
|
|
509
511
|
declare const isUseActionStateCall: (node: TSESTree.Node | undefined) => boolean;
|
|
510
512
|
declare const isUseCallbackCall: (node: TSESTree.Node | undefined) => boolean;
|
|
@@ -834,4 +836,4 @@ declare const isForwardRefCall: isReactAPICall.ReturnType;
|
|
|
834
836
|
declare const isMemoCall: isReactAPICall.ReturnType;
|
|
835
837
|
declare const isLazyCall: isReactAPICall.ReturnType;
|
|
836
838
|
//#endregion
|
|
837
|
-
export { AssignmentTarget, 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, SemanticEntry, SemanticNode, findEnclosingAssignmentTarget, 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, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInsideComponentOrHook, isInstanceIdEqual, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName,
|
|
839
|
+
export { AssignmentTarget, 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, SemanticEntry, SemanticNode, findEnclosingAssignmentTarget, 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, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInsideComponentOrHook, isInstanceIdEqual, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRender, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectLikeCall, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseStateLikeCall, isUseSyncExternalStoreCall, isUseTransitionCall, resolveJsxAttributeValue, stringifyJsx, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|
package/dist/index.js
CHANGED
|
@@ -95,33 +95,34 @@ function isReactHookCallWithName(node) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @param
|
|
100
|
-
* @param
|
|
101
|
-
* @returns
|
|
98
|
+
* Detects useEffect calls and variations (useLayoutEffect, etc.) using regex pattern.
|
|
99
|
+
* @param node The AST node to check
|
|
100
|
+
* @param additionalEffectHooks Regex pattern matching custom hooks that should be treated as effect hooks
|
|
101
|
+
* @returns True if the node is a useEffect-like call
|
|
102
102
|
*/
|
|
103
|
-
function
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
};
|
|
103
|
+
function isUseEffectLikeCall(node, additionalEffectHooks = { test: constFalse }) {
|
|
104
|
+
if (node == null) return false;
|
|
105
|
+
if (node.type !== AST_NODE_TYPES.CallExpression) return false;
|
|
106
|
+
return [/^use\w*Effect$/u, additionalEffectHooks].some((regexp) => {
|
|
107
|
+
if (node.callee.type === AST_NODE_TYPES.Identifier) return regexp.test(node.callee.name);
|
|
108
|
+
if (node.callee.type === AST_NODE_TYPES.MemberExpression) return node.callee.property.type === AST_NODE_TYPES.Identifier && regexp.test(node.callee.property.name);
|
|
109
|
+
return false;
|
|
110
|
+
});
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
|
-
* Detects
|
|
113
|
+
* Detects useState calls and variations (useCustomState, etc.) using regex pattern.
|
|
114
114
|
* @param node The AST node to check
|
|
115
|
-
* @
|
|
115
|
+
* @param additionalStateHooks Regex pattern matching custom hooks that should be treated as state hooks
|
|
116
|
+
* @returns True if the node is a useState-like call
|
|
116
117
|
*/
|
|
117
|
-
function
|
|
118
|
+
function isUseStateLikeCall(node, additionalStateHooks = { test: constFalse }) {
|
|
118
119
|
if (node == null) return false;
|
|
119
120
|
if (node.type !== AST_NODE_TYPES.CallExpression) return false;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
121
|
+
return [/^use\w*State$/u, additionalStateHooks].some((regexp) => {
|
|
122
|
+
if (node.callee.type === AST_NODE_TYPES.Identifier) return regexp.test(node.callee.name);
|
|
123
|
+
if (node.callee.type === AST_NODE_TYPES.MemberExpression) return node.callee.property.type === AST_NODE_TYPES.Identifier && regexp.test(node.callee.property.name);
|
|
124
|
+
return false;
|
|
125
|
+
});
|
|
125
126
|
}
|
|
126
127
|
const isUseCall = flip(isReactHookCallWithName)("use");
|
|
127
128
|
const isUseActionStateCall = flip(isReactHookCallWithName)("useActionState");
|
|
@@ -1047,23 +1048,26 @@ function useComponentCollector(context, options = {}) {
|
|
|
1047
1048
|
const idGen = new IdGenerator("class_component_");
|
|
1048
1049
|
/**
|
|
1049
1050
|
* Get a ctx and listeners object for the rule to collect class components
|
|
1051
|
+
* @param context The ESLint rule context
|
|
1050
1052
|
* @returns The context and listeners for the rule
|
|
1051
1053
|
*/
|
|
1052
|
-
function useComponentCollectorLegacy() {
|
|
1054
|
+
function useComponentCollectorLegacy(context) {
|
|
1053
1055
|
const components = /* @__PURE__ */ new Map();
|
|
1054
1056
|
const ctx = { getAllComponents(node) {
|
|
1055
1057
|
return [...components.values()];
|
|
1056
1058
|
} };
|
|
1059
|
+
const getText = (n) => context.sourceCode.getText(n);
|
|
1057
1060
|
const collect = (node) => {
|
|
1058
1061
|
if (!isClassComponent(node)) return;
|
|
1059
1062
|
const id = AST.getClassId(node);
|
|
1060
1063
|
const key = idGen.next();
|
|
1064
|
+
const name = id == null ? unit : AST.toStringFormat(id, getText);
|
|
1061
1065
|
const flag = isPureComponent(node) ? ComponentFlag.PureComponent : ComponentFlag.None;
|
|
1062
1066
|
components.set(key, {
|
|
1063
1067
|
id,
|
|
1064
1068
|
key,
|
|
1065
1069
|
kind: "class",
|
|
1066
|
-
name
|
|
1070
|
+
name,
|
|
1067
1071
|
node,
|
|
1068
1072
|
displayName: unit,
|
|
1069
1073
|
flag,
|
|
@@ -1259,10 +1263,10 @@ function findEnclosingAssignmentTarget(node) {
|
|
|
1259
1263
|
//#endregion
|
|
1260
1264
|
//#region src/hierarchy/find-enclosing-component-or-hook.ts
|
|
1261
1265
|
/**
|
|
1262
|
-
* Find the enclosing React component or hook for a given AST node
|
|
1263
|
-
* @param node The AST node to start the search from
|
|
1264
|
-
* @param test Optional test function to customize component or hook identification
|
|
1265
|
-
* @returns The enclosing component or hook node, or `null` if none is found
|
|
1266
|
+
* Find the enclosing React component or hook for a given AST node
|
|
1267
|
+
* @param node The AST node to start the search from
|
|
1268
|
+
* @param test Optional test function to customize component or hook identification
|
|
1269
|
+
* @returns The enclosing component or hook node, or `null` if none is found
|
|
1266
1270
|
*/
|
|
1267
1271
|
function findEnclosingComponentOrHook(node, test = (n, name) => {
|
|
1268
1272
|
if (name == null) return false;
|
|
@@ -1281,13 +1285,13 @@ function findEnclosingComponentOrHook(node, test = (n, name) => {
|
|
|
1281
1285
|
//#endregion
|
|
1282
1286
|
//#region src/hierarchy/is-inside-component-or-hook.ts
|
|
1283
1287
|
/**
|
|
1284
|
-
* Checks if a given AST node is inside a React component or hook
|
|
1285
|
-
* @param node The AST node to check
|
|
1286
|
-
* @returns True if the node is inside a component or hook, false otherwise
|
|
1288
|
+
* Checks if a given AST node is inside a React component or hook
|
|
1289
|
+
* @param node The AST node to check
|
|
1290
|
+
* @returns True if the node is inside a component or hook, false otherwise
|
|
1287
1291
|
*/
|
|
1288
1292
|
function isInsideComponentOrHook(node) {
|
|
1289
1293
|
return findEnclosingComponentOrHook(node) != null;
|
|
1290
1294
|
}
|
|
1291
1295
|
|
|
1292
1296
|
//#endregion
|
|
1293
|
-
export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, findEnclosingAssignmentTarget, 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, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInsideComponentOrHook, isInstanceIdEqual, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName,
|
|
1297
|
+
export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DEFAULT_JSX_DETECTION_HINT, JsxDetectionHint, JsxEmit, REACT_BUILTIN_HOOK_NAMES, findEnclosingAssignmentTarget, 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, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isComponentWrapperCallback, isComponentWrapperCallbackLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInitializedFromReactNative, isInsideComponentOrHook, isInstanceIdEqual, isInversePhase, isJsxFragmentElement, isJsxHostElement, isJsxLike, isJsxText, isLazy, isLazyCall, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookId, isReactHookName, isRender, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectLikeCall, 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.
|
|
3
|
+
"version": "2.7.0-beta.0",
|
|
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": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@typescript-eslint/utils": "^8.53.0",
|
|
36
36
|
"birecord": "^0.1.1",
|
|
37
37
|
"ts-pattern": "^5.9.0",
|
|
38
|
-
"@eslint-react/ast": "2.
|
|
39
|
-
"@eslint-react/eff": "2.
|
|
40
|
-
"@eslint-react/
|
|
41
|
-
"@eslint-react/
|
|
38
|
+
"@eslint-react/ast": "2.7.0-beta.0",
|
|
39
|
+
"@eslint-react/eff": "2.7.0-beta.0",
|
|
40
|
+
"@eslint-react/shared": "2.7.0-beta.0",
|
|
41
|
+
"@eslint-react/var": "2.7.0-beta.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsdown": "^0.20.0-beta.3",
|