@eslint-react/core 1.28.0-beta.1 → 1.28.0-beta.6
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 +64 -67
- package/dist/index.d.ts +64 -67
- package/dist/index.js +664 -164
- package/dist/index.mjs +660 -165
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -137,7 +137,7 @@ declare namespace useComponentCollectorLegacy {
|
|
|
137
137
|
*/
|
|
138
138
|
declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
|
|
139
139
|
|
|
140
|
-
declare function getFunctionComponentIdentifier(node: AST.TSESTreeFunction
|
|
140
|
+
declare function getFunctionComponentIdentifier(context: RuleContext, node: AST.TSESTreeFunction): TSESTree.Identifier | TSESTree.Identifier[] | _;
|
|
141
141
|
|
|
142
142
|
type ERComponentKind = "classComponent" | "functionComponent";
|
|
143
143
|
|
|
@@ -170,7 +170,7 @@ declare function isInsideRenderMethod(node: TSESTree.Node): boolean;
|
|
|
170
170
|
declare const RE_COMPONENT_NAME: RegExp;
|
|
171
171
|
declare function getComponentNameFromIdentifier(node: TSESTree.Identifier | TSESTree.Identifier[] | _): string | undefined;
|
|
172
172
|
declare function isComponentName(name: string): boolean;
|
|
173
|
-
declare function hasNoneOrValidComponentName(node: AST.TSESTreeFunction
|
|
173
|
+
declare function hasNoneOrValidComponentName(context: RuleContext, node: AST.TSESTreeFunction): boolean;
|
|
174
174
|
|
|
175
175
|
type EREffectPhaseKind = "cleanup" | "setup";
|
|
176
176
|
type ERLifecyclePhaseKind = "mount" | "unmount";
|
|
@@ -192,22 +192,22 @@ declare const isInversePhase: {
|
|
|
192
192
|
* _ = <Component renderRow={() => <div />} />
|
|
193
193
|
* ` ^^^^^^^^^^^^^ `
|
|
194
194
|
* ```
|
|
195
|
-
* @param node The AST node to check
|
|
196
195
|
* @param context The rule context
|
|
196
|
+
* @param node The AST node to check
|
|
197
197
|
* @returns `true` if node is a render function, `false` if not
|
|
198
198
|
*/
|
|
199
|
-
declare function isRenderFunctionLoose(node: AST.TSESTreeFunction
|
|
199
|
+
declare function isRenderFunctionLoose(context: RuleContext, node: AST.TSESTreeFunction): boolean;
|
|
200
200
|
/**
|
|
201
201
|
* Unsafe check whether given JSXAttribute is a render prop
|
|
202
202
|
* ```jsx
|
|
203
203
|
* _ = <Component renderRow={() => <div />} />
|
|
204
204
|
* ` ^^^^^^^^^^^^^^^^^^^^^^^^^ `
|
|
205
205
|
* ```
|
|
206
|
-
* @param node The AST node to check
|
|
207
206
|
* @param context The rule context
|
|
207
|
+
* @param node The AST node to check
|
|
208
208
|
* @returns `true` if node is a render prop, `false` if not
|
|
209
209
|
*/
|
|
210
|
-
declare function isRenderPropLoose(node: TSESTree.JSXAttribute
|
|
210
|
+
declare function isRenderPropLoose(context: RuleContext, node: TSESTree.JSXAttribute): boolean;
|
|
211
211
|
/**
|
|
212
212
|
* Unsafe check whether given node is declared directly inside a render property
|
|
213
213
|
* ```jsx
|
|
@@ -237,6 +237,9 @@ declare function isDeclaredInRenderPropLoose(node: TSESTree.Node): boolean;
|
|
|
237
237
|
type ERStateKind = "actionState" | "state";
|
|
238
238
|
declare function isThisSetState(node: TSESTree.CallExpression): boolean;
|
|
239
239
|
|
|
240
|
+
/** internal */
|
|
241
|
+
declare function hasValidHierarchy(context: RuleContext, node: AST.TSESTreeFunction, hint: bigint): boolean;
|
|
242
|
+
|
|
240
243
|
/**
|
|
241
244
|
* Check if a node is a React class component
|
|
242
245
|
* @param node The AST node to check
|
|
@@ -257,18 +260,18 @@ declare function isFunctionOfUseEffectCleanup(node: TSESTree.Node): boolean | un
|
|
|
257
260
|
|
|
258
261
|
/**
|
|
259
262
|
* Determines whether inside `createElement`'s props.
|
|
260
|
-
* @param node The AST node to check
|
|
261
263
|
* @param context The rule context
|
|
264
|
+
* @param node The AST node to check
|
|
262
265
|
* @returns `true` if the node is inside createElement's props
|
|
263
266
|
*/
|
|
264
|
-
declare function isInsideCreateElementProps(node: TSESTree.Node
|
|
267
|
+
declare function isInsideCreateElementProps(context: RuleContext, node: TSESTree.Node): boolean;
|
|
265
268
|
/**
|
|
266
269
|
* Determines whether inside `createElement`'s children.
|
|
267
|
-
* @param node The AST node to check
|
|
268
270
|
* @param context The rule context
|
|
271
|
+
* @param node The AST node to check
|
|
269
272
|
* @returns `true` if the node is inside createElement's children
|
|
270
273
|
*/
|
|
271
|
-
declare function isChildrenOfCreateElement(node: TSESTree.Node
|
|
274
|
+
declare function isChildrenOfCreateElement(context: RuleContext, node: TSESTree.Node): boolean;
|
|
272
275
|
|
|
273
276
|
declare function isInsideReactHook(node: TSESTree.Node): boolean | undefined;
|
|
274
277
|
|
|
@@ -301,59 +304,35 @@ declare function isReactHook(node: AST.TSESTreeFunction | _): boolean | undefine
|
|
|
301
304
|
* @returns `true` if the node is a React Hook call, `false` otherwise.
|
|
302
305
|
*/
|
|
303
306
|
declare function isReactHookCall(node: TSESTree.Node | _): boolean;
|
|
304
|
-
declare function isReactHookCallWithName(node: TSESTree.CallExpression | _
|
|
307
|
+
declare function isReactHookCallWithName(context: RuleContext, node: TSESTree.CallExpression | _): (name: string) => boolean;
|
|
305
308
|
declare function isReactHookCallWithNameLoose(node: TSESTree.CallExpression | _): (name: string) => boolean;
|
|
306
|
-
declare function isReactHookCallWithNameAlias(
|
|
309
|
+
declare function isReactHookCallWithNameAlias(context: RuleContext, name: string, alias: string[]): (node: TSESTree.CallExpression) => boolean;
|
|
307
310
|
declare function isUseEffectCallLoose(node: TSESTree.Node | _): boolean;
|
|
308
|
-
declare const isUseCallbackCall: (
|
|
309
|
-
declare const isUseContextCall: (
|
|
310
|
-
declare const isUseDebugValueCall: (
|
|
311
|
-
declare const isUseDeferredValueCall: (
|
|
312
|
-
declare const isUseEffectCall: (
|
|
313
|
-
declare const isUseIdCall: (
|
|
314
|
-
declare const isUseImperativeHandleCall: (
|
|
315
|
-
declare const isUseInsertionEffectCall: (
|
|
316
|
-
declare const isUseLayoutEffectCall: (
|
|
317
|
-
declare const isUseMemoCall: (
|
|
318
|
-
declare const isUseReducerCall: (
|
|
319
|
-
declare const isUseRefCall: (
|
|
320
|
-
declare const isUseStateCall: (
|
|
321
|
-
declare const isUseSyncExternalStoreCall: (
|
|
322
|
-
declare const isUseTransitionCall: (
|
|
311
|
+
declare const isUseCallbackCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
312
|
+
declare const isUseContextCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
313
|
+
declare const isUseDebugValueCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
314
|
+
declare const isUseDeferredValueCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
315
|
+
declare const isUseEffectCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
316
|
+
declare const isUseIdCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
317
|
+
declare const isUseImperativeHandleCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
318
|
+
declare const isUseInsertionEffectCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
319
|
+
declare const isUseLayoutEffectCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
320
|
+
declare const isUseMemoCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
321
|
+
declare const isUseReducerCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
322
|
+
declare const isUseRefCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
323
|
+
declare const isUseStateCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
324
|
+
declare const isUseSyncExternalStoreCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
325
|
+
declare const isUseTransitionCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
323
326
|
|
|
324
327
|
interface ERSemanticEntry {
|
|
325
328
|
node: TSESTree.Node;
|
|
326
329
|
phase: ERPhaseKind;
|
|
327
330
|
}
|
|
328
331
|
|
|
329
|
-
/**
|
|
330
|
-
* The ESQuery selector for a component display name assignment expression
|
|
331
|
-
*/
|
|
332
|
-
declare const DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
333
|
-
/**
|
|
334
|
-
* Check if the node is a component display name assignment expression
|
|
335
|
-
* @param node The AST node
|
|
336
|
-
* @returns `true` if the node is a component display name assignment
|
|
337
|
-
*/
|
|
338
|
-
declare function isDisplayNameAssignment(node: TSESTree.Node | _): node is TSESTree.AssignmentExpression;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Checks if the given node is a call expression to the given function or method of the pragma
|
|
342
|
-
* @param name The name of the function or method to check
|
|
343
|
-
* @returns A predicate that checks if the given node is a call expression to the given function or method
|
|
344
|
-
*/
|
|
345
|
-
declare function isFromReact(name: string): (node: TSESTree.Identifier | TSESTree.MemberExpression, context: RuleContext) => boolean;
|
|
346
|
-
/**
|
|
347
|
-
* @internal
|
|
348
|
-
* @param memberName The name of the member object
|
|
349
|
-
* @param name The name of the member property
|
|
350
|
-
* @returns A function that checks if a given node is a member expression of a Pragma member.
|
|
351
|
-
*/
|
|
352
|
-
declare function isFromReactMember(memberName: string, name: string): (node: TSESTree.MemberExpression, context: RuleContext) => boolean;
|
|
353
332
|
declare namespace isCallFromReact {
|
|
354
333
|
type ReturnType = {
|
|
355
334
|
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression;
|
|
356
|
-
(node: TSESTree.Node
|
|
335
|
+
(context: RuleContext, node: TSESTree.Node): node is TSESTree.CallExpression;
|
|
357
336
|
};
|
|
358
337
|
}
|
|
359
338
|
declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
|
|
@@ -362,21 +341,39 @@ declare namespace isCallFromReactMember {
|
|
|
362
341
|
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression & {
|
|
363
342
|
callee: TSESTree.MemberExpression;
|
|
364
343
|
};
|
|
365
|
-
(node: TSESTree.Node
|
|
344
|
+
(context: RuleContext, node: TSESTree.Node): node is TSESTree.CallExpression & {
|
|
366
345
|
callee: TSESTree.MemberExpression;
|
|
367
346
|
};
|
|
368
347
|
};
|
|
369
348
|
}
|
|
370
349
|
declare function isCallFromReactMember(pragmaMemberName: string, name: string): isCallFromReactMember.ReturnType;
|
|
371
350
|
|
|
351
|
+
/**
|
|
352
|
+
* The ESQuery selector for a component display name assignment expression
|
|
353
|
+
*/
|
|
354
|
+
declare const DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
355
|
+
/**
|
|
356
|
+
* Check if the node is a component display name assignment expression
|
|
357
|
+
* @param node The AST node
|
|
358
|
+
* @returns `true` if the node is a component display name assignment
|
|
359
|
+
*/
|
|
360
|
+
declare function isDisplayNameAssignment(node: TSESTree.Node | _): node is TSESTree.AssignmentExpression;
|
|
361
|
+
|
|
362
|
+
declare function isFromReactLoose(node: TSESTree.Identifier | TSESTree.MemberExpression, name: string): boolean;
|
|
363
|
+
declare function isFromReactStrict(node: TSESTree.Identifier | TSESTree.MemberExpression, name: string, importSource: string, initialScope: Scope): boolean;
|
|
364
|
+
declare function isFromReact(name: string): (context: RuleContext, node: TSESTree.Identifier | TSESTree.MemberExpression) => boolean;
|
|
365
|
+
declare function isFromReactMemberLoose(node: TSESTree.MemberExpression, memberName: string, name: string): boolean;
|
|
366
|
+
declare function isFromReactMemberStrict(node: TSESTree.MemberExpression, memberName: string, name: string, importSource: string, initialScope: Scope): boolean;
|
|
367
|
+
declare function isFromReactMember(memberName: string, name: string): (context: RuleContext, node: TSESTree.MemberExpression) => boolean;
|
|
368
|
+
|
|
372
369
|
/**
|
|
373
370
|
* Check if an identifier is initialized from react
|
|
374
371
|
* @param name The top-level identifier's name
|
|
375
|
-
* @param
|
|
372
|
+
* @param importSource The import source to check against
|
|
376
373
|
* @param initialScope Initial scope to search for the identifier
|
|
377
374
|
* @returns Whether the identifier is initialized from react
|
|
378
375
|
*/
|
|
379
|
-
declare function isInitializedFromReact(name: string,
|
|
376
|
+
declare function isInitializedFromReact(name: string, importSource: string, initialScope: Scope): boolean;
|
|
380
377
|
|
|
381
378
|
/**********************************************
|
|
382
379
|
* DO NOT MODIFY THIS FILE MANUALLY *
|
|
@@ -2401,17 +2398,17 @@ declare function isReactAPIWithName(name: string): ReturnType<typeof isFromReact
|
|
|
2401
2398
|
declare function isReactAPIWithName(name: string, member: string): ReturnType<typeof isFromReactMember>;
|
|
2402
2399
|
declare function isReactAPICallWithName(name: string): ReturnType<typeof isCallFromReact>;
|
|
2403
2400
|
declare function isReactAPICallWithName(name: string, member: string): ReturnType<typeof isCallFromReactMember>;
|
|
2404
|
-
declare const isChildrenCount: (
|
|
2405
|
-
declare const isChildrenForEach: (
|
|
2406
|
-
declare const isChildrenMap: (
|
|
2407
|
-
declare const isChildrenOnly: (
|
|
2408
|
-
declare const isChildrenToArray: (
|
|
2409
|
-
declare const isCloneElement: (node: Identifier | MemberExpression
|
|
2410
|
-
declare const isCreateContext: (node: Identifier | MemberExpression
|
|
2411
|
-
declare const isCreateElement: (node: Identifier | MemberExpression
|
|
2412
|
-
declare const isCreateRef: (node: Identifier | MemberExpression
|
|
2413
|
-
declare const isForwardRef: (node: Identifier | MemberExpression
|
|
2414
|
-
declare const isMemo: (node: Identifier | MemberExpression
|
|
2401
|
+
declare const isChildrenCount: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2402
|
+
declare const isChildrenForEach: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2403
|
+
declare const isChildrenMap: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2404
|
+
declare const isChildrenOnly: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2405
|
+
declare const isChildrenToArray: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2406
|
+
declare const isCloneElement: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2407
|
+
declare const isCreateContext: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2408
|
+
declare const isCreateElement: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2409
|
+
declare const isCreateRef: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2410
|
+
declare const isForwardRef: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2411
|
+
declare const isMemo: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2415
2412
|
declare const isChildrenCountCall: isCallFromReactMember.ReturnType;
|
|
2416
2413
|
declare const isChildrenForEachCall: isCallFromReactMember.ReturnType;
|
|
2417
2414
|
declare const isChildrenMapCall: isCallFromReactMember.ReturnType;
|
|
@@ -2424,4 +2421,4 @@ declare const isCreateRefCall: isCallFromReact.ReturnType;
|
|
|
2424
2421
|
declare const isForwardRefCall: isCallFromReact.ReturnType;
|
|
2425
2422
|
declare const isMemoCall: isCallFromReact.ReturnType;
|
|
2426
2423
|
|
|
2427
|
-
export { DEFAULT_COMPONENT_HINT, DISPLAY_NAME_ASSIGNMENT_SELECTOR, type ERClassComponent, type ERComponent, ERComponentFlag, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectPhaseKind, type ERFunctionComponent, type ERHook, type ERHookKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentName, isComponentWillUnmount, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isDisplayNameAssignment, isForwardRef, isForwardRefCall, isFromReact, isFromReactMember, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetDerivedStateFromError, isGetDerivedStateFromProps, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|
|
2424
|
+
export { DEFAULT_COMPONENT_HINT, DISPLAY_NAME_ASSIGNMENT_SELECTOR, type ERClassComponent, type ERComponent, ERComponentFlag, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectPhaseKind, type ERFunctionComponent, type ERHook, type ERHookKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, hasNoneOrValidComponentName, hasValidHierarchy, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentName, isComponentWillUnmount, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isDisplayNameAssignment, isForwardRef, isForwardRefCall, isFromReact, isFromReactLoose, isFromReactMember, isFromReactMemberLoose, isFromReactMemberStrict, isFromReactStrict, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetDerivedStateFromError, isGetDerivedStateFromProps, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|
package/dist/index.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ declare namespace useComponentCollectorLegacy {
|
|
|
137
137
|
*/
|
|
138
138
|
declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.ReturnType;
|
|
139
139
|
|
|
140
|
-
declare function getFunctionComponentIdentifier(node: AST.TSESTreeFunction
|
|
140
|
+
declare function getFunctionComponentIdentifier(context: RuleContext, node: AST.TSESTreeFunction): TSESTree.Identifier | TSESTree.Identifier[] | _;
|
|
141
141
|
|
|
142
142
|
type ERComponentKind = "classComponent" | "functionComponent";
|
|
143
143
|
|
|
@@ -170,7 +170,7 @@ declare function isInsideRenderMethod(node: TSESTree.Node): boolean;
|
|
|
170
170
|
declare const RE_COMPONENT_NAME: RegExp;
|
|
171
171
|
declare function getComponentNameFromIdentifier(node: TSESTree.Identifier | TSESTree.Identifier[] | _): string | undefined;
|
|
172
172
|
declare function isComponentName(name: string): boolean;
|
|
173
|
-
declare function hasNoneOrValidComponentName(node: AST.TSESTreeFunction
|
|
173
|
+
declare function hasNoneOrValidComponentName(context: RuleContext, node: AST.TSESTreeFunction): boolean;
|
|
174
174
|
|
|
175
175
|
type EREffectPhaseKind = "cleanup" | "setup";
|
|
176
176
|
type ERLifecyclePhaseKind = "mount" | "unmount";
|
|
@@ -192,22 +192,22 @@ declare const isInversePhase: {
|
|
|
192
192
|
* _ = <Component renderRow={() => <div />} />
|
|
193
193
|
* ` ^^^^^^^^^^^^^ `
|
|
194
194
|
* ```
|
|
195
|
-
* @param node The AST node to check
|
|
196
195
|
* @param context The rule context
|
|
196
|
+
* @param node The AST node to check
|
|
197
197
|
* @returns `true` if node is a render function, `false` if not
|
|
198
198
|
*/
|
|
199
|
-
declare function isRenderFunctionLoose(node: AST.TSESTreeFunction
|
|
199
|
+
declare function isRenderFunctionLoose(context: RuleContext, node: AST.TSESTreeFunction): boolean;
|
|
200
200
|
/**
|
|
201
201
|
* Unsafe check whether given JSXAttribute is a render prop
|
|
202
202
|
* ```jsx
|
|
203
203
|
* _ = <Component renderRow={() => <div />} />
|
|
204
204
|
* ` ^^^^^^^^^^^^^^^^^^^^^^^^^ `
|
|
205
205
|
* ```
|
|
206
|
-
* @param node The AST node to check
|
|
207
206
|
* @param context The rule context
|
|
207
|
+
* @param node The AST node to check
|
|
208
208
|
* @returns `true` if node is a render prop, `false` if not
|
|
209
209
|
*/
|
|
210
|
-
declare function isRenderPropLoose(node: TSESTree.JSXAttribute
|
|
210
|
+
declare function isRenderPropLoose(context: RuleContext, node: TSESTree.JSXAttribute): boolean;
|
|
211
211
|
/**
|
|
212
212
|
* Unsafe check whether given node is declared directly inside a render property
|
|
213
213
|
* ```jsx
|
|
@@ -237,6 +237,9 @@ declare function isDeclaredInRenderPropLoose(node: TSESTree.Node): boolean;
|
|
|
237
237
|
type ERStateKind = "actionState" | "state";
|
|
238
238
|
declare function isThisSetState(node: TSESTree.CallExpression): boolean;
|
|
239
239
|
|
|
240
|
+
/** internal */
|
|
241
|
+
declare function hasValidHierarchy(context: RuleContext, node: AST.TSESTreeFunction, hint: bigint): boolean;
|
|
242
|
+
|
|
240
243
|
/**
|
|
241
244
|
* Check if a node is a React class component
|
|
242
245
|
* @param node The AST node to check
|
|
@@ -257,18 +260,18 @@ declare function isFunctionOfUseEffectCleanup(node: TSESTree.Node): boolean | un
|
|
|
257
260
|
|
|
258
261
|
/**
|
|
259
262
|
* Determines whether inside `createElement`'s props.
|
|
260
|
-
* @param node The AST node to check
|
|
261
263
|
* @param context The rule context
|
|
264
|
+
* @param node The AST node to check
|
|
262
265
|
* @returns `true` if the node is inside createElement's props
|
|
263
266
|
*/
|
|
264
|
-
declare function isInsideCreateElementProps(node: TSESTree.Node
|
|
267
|
+
declare function isInsideCreateElementProps(context: RuleContext, node: TSESTree.Node): boolean;
|
|
265
268
|
/**
|
|
266
269
|
* Determines whether inside `createElement`'s children.
|
|
267
|
-
* @param node The AST node to check
|
|
268
270
|
* @param context The rule context
|
|
271
|
+
* @param node The AST node to check
|
|
269
272
|
* @returns `true` if the node is inside createElement's children
|
|
270
273
|
*/
|
|
271
|
-
declare function isChildrenOfCreateElement(node: TSESTree.Node
|
|
274
|
+
declare function isChildrenOfCreateElement(context: RuleContext, node: TSESTree.Node): boolean;
|
|
272
275
|
|
|
273
276
|
declare function isInsideReactHook(node: TSESTree.Node): boolean | undefined;
|
|
274
277
|
|
|
@@ -301,59 +304,35 @@ declare function isReactHook(node: AST.TSESTreeFunction | _): boolean | undefine
|
|
|
301
304
|
* @returns `true` if the node is a React Hook call, `false` otherwise.
|
|
302
305
|
*/
|
|
303
306
|
declare function isReactHookCall(node: TSESTree.Node | _): boolean;
|
|
304
|
-
declare function isReactHookCallWithName(node: TSESTree.CallExpression | _
|
|
307
|
+
declare function isReactHookCallWithName(context: RuleContext, node: TSESTree.CallExpression | _): (name: string) => boolean;
|
|
305
308
|
declare function isReactHookCallWithNameLoose(node: TSESTree.CallExpression | _): (name: string) => boolean;
|
|
306
|
-
declare function isReactHookCallWithNameAlias(
|
|
309
|
+
declare function isReactHookCallWithNameAlias(context: RuleContext, name: string, alias: string[]): (node: TSESTree.CallExpression) => boolean;
|
|
307
310
|
declare function isUseEffectCallLoose(node: TSESTree.Node | _): boolean;
|
|
308
|
-
declare const isUseCallbackCall: (
|
|
309
|
-
declare const isUseContextCall: (
|
|
310
|
-
declare const isUseDebugValueCall: (
|
|
311
|
-
declare const isUseDeferredValueCall: (
|
|
312
|
-
declare const isUseEffectCall: (
|
|
313
|
-
declare const isUseIdCall: (
|
|
314
|
-
declare const isUseImperativeHandleCall: (
|
|
315
|
-
declare const isUseInsertionEffectCall: (
|
|
316
|
-
declare const isUseLayoutEffectCall: (
|
|
317
|
-
declare const isUseMemoCall: (
|
|
318
|
-
declare const isUseReducerCall: (
|
|
319
|
-
declare const isUseRefCall: (
|
|
320
|
-
declare const isUseStateCall: (
|
|
321
|
-
declare const isUseSyncExternalStoreCall: (
|
|
322
|
-
declare const isUseTransitionCall: (
|
|
311
|
+
declare const isUseCallbackCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
312
|
+
declare const isUseContextCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
313
|
+
declare const isUseDebugValueCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
314
|
+
declare const isUseDeferredValueCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
315
|
+
declare const isUseEffectCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
316
|
+
declare const isUseIdCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
317
|
+
declare const isUseImperativeHandleCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
318
|
+
declare const isUseInsertionEffectCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
319
|
+
declare const isUseLayoutEffectCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
320
|
+
declare const isUseMemoCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
321
|
+
declare const isUseReducerCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
322
|
+
declare const isUseRefCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
323
|
+
declare const isUseStateCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
324
|
+
declare const isUseSyncExternalStoreCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
325
|
+
declare const isUseTransitionCall: (context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>, node: TSESTree.CallExpression | undefined) => boolean;
|
|
323
326
|
|
|
324
327
|
interface ERSemanticEntry {
|
|
325
328
|
node: TSESTree.Node;
|
|
326
329
|
phase: ERPhaseKind;
|
|
327
330
|
}
|
|
328
331
|
|
|
329
|
-
/**
|
|
330
|
-
* The ESQuery selector for a component display name assignment expression
|
|
331
|
-
*/
|
|
332
|
-
declare const DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
333
|
-
/**
|
|
334
|
-
* Check if the node is a component display name assignment expression
|
|
335
|
-
* @param node The AST node
|
|
336
|
-
* @returns `true` if the node is a component display name assignment
|
|
337
|
-
*/
|
|
338
|
-
declare function isDisplayNameAssignment(node: TSESTree.Node | _): node is TSESTree.AssignmentExpression;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Checks if the given node is a call expression to the given function or method of the pragma
|
|
342
|
-
* @param name The name of the function or method to check
|
|
343
|
-
* @returns A predicate that checks if the given node is a call expression to the given function or method
|
|
344
|
-
*/
|
|
345
|
-
declare function isFromReact(name: string): (node: TSESTree.Identifier | TSESTree.MemberExpression, context: RuleContext) => boolean;
|
|
346
|
-
/**
|
|
347
|
-
* @internal
|
|
348
|
-
* @param memberName The name of the member object
|
|
349
|
-
* @param name The name of the member property
|
|
350
|
-
* @returns A function that checks if a given node is a member expression of a Pragma member.
|
|
351
|
-
*/
|
|
352
|
-
declare function isFromReactMember(memberName: string, name: string): (node: TSESTree.MemberExpression, context: RuleContext) => boolean;
|
|
353
332
|
declare namespace isCallFromReact {
|
|
354
333
|
type ReturnType = {
|
|
355
334
|
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression;
|
|
356
|
-
(node: TSESTree.Node
|
|
335
|
+
(context: RuleContext, node: TSESTree.Node): node is TSESTree.CallExpression;
|
|
357
336
|
};
|
|
358
337
|
}
|
|
359
338
|
declare function isCallFromReact(name: string): isCallFromReact.ReturnType;
|
|
@@ -362,21 +341,39 @@ declare namespace isCallFromReactMember {
|
|
|
362
341
|
(context: RuleContext): (node: TSESTree.Node) => node is TSESTree.CallExpression & {
|
|
363
342
|
callee: TSESTree.MemberExpression;
|
|
364
343
|
};
|
|
365
|
-
(node: TSESTree.Node
|
|
344
|
+
(context: RuleContext, node: TSESTree.Node): node is TSESTree.CallExpression & {
|
|
366
345
|
callee: TSESTree.MemberExpression;
|
|
367
346
|
};
|
|
368
347
|
};
|
|
369
348
|
}
|
|
370
349
|
declare function isCallFromReactMember(pragmaMemberName: string, name: string): isCallFromReactMember.ReturnType;
|
|
371
350
|
|
|
351
|
+
/**
|
|
352
|
+
* The ESQuery selector for a component display name assignment expression
|
|
353
|
+
*/
|
|
354
|
+
declare const DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
355
|
+
/**
|
|
356
|
+
* Check if the node is a component display name assignment expression
|
|
357
|
+
* @param node The AST node
|
|
358
|
+
* @returns `true` if the node is a component display name assignment
|
|
359
|
+
*/
|
|
360
|
+
declare function isDisplayNameAssignment(node: TSESTree.Node | _): node is TSESTree.AssignmentExpression;
|
|
361
|
+
|
|
362
|
+
declare function isFromReactLoose(node: TSESTree.Identifier | TSESTree.MemberExpression, name: string): boolean;
|
|
363
|
+
declare function isFromReactStrict(node: TSESTree.Identifier | TSESTree.MemberExpression, name: string, importSource: string, initialScope: Scope): boolean;
|
|
364
|
+
declare function isFromReact(name: string): (context: RuleContext, node: TSESTree.Identifier | TSESTree.MemberExpression) => boolean;
|
|
365
|
+
declare function isFromReactMemberLoose(node: TSESTree.MemberExpression, memberName: string, name: string): boolean;
|
|
366
|
+
declare function isFromReactMemberStrict(node: TSESTree.MemberExpression, memberName: string, name: string, importSource: string, initialScope: Scope): boolean;
|
|
367
|
+
declare function isFromReactMember(memberName: string, name: string): (context: RuleContext, node: TSESTree.MemberExpression) => boolean;
|
|
368
|
+
|
|
372
369
|
/**
|
|
373
370
|
* Check if an identifier is initialized from react
|
|
374
371
|
* @param name The top-level identifier's name
|
|
375
|
-
* @param
|
|
372
|
+
* @param importSource The import source to check against
|
|
376
373
|
* @param initialScope Initial scope to search for the identifier
|
|
377
374
|
* @returns Whether the identifier is initialized from react
|
|
378
375
|
*/
|
|
379
|
-
declare function isInitializedFromReact(name: string,
|
|
376
|
+
declare function isInitializedFromReact(name: string, importSource: string, initialScope: Scope): boolean;
|
|
380
377
|
|
|
381
378
|
/**********************************************
|
|
382
379
|
* DO NOT MODIFY THIS FILE MANUALLY *
|
|
@@ -2401,17 +2398,17 @@ declare function isReactAPIWithName(name: string): ReturnType<typeof isFromReact
|
|
|
2401
2398
|
declare function isReactAPIWithName(name: string, member: string): ReturnType<typeof isFromReactMember>;
|
|
2402
2399
|
declare function isReactAPICallWithName(name: string): ReturnType<typeof isCallFromReact>;
|
|
2403
2400
|
declare function isReactAPICallWithName(name: string, member: string): ReturnType<typeof isCallFromReactMember>;
|
|
2404
|
-
declare const isChildrenCount: (
|
|
2405
|
-
declare const isChildrenForEach: (
|
|
2406
|
-
declare const isChildrenMap: (
|
|
2407
|
-
declare const isChildrenOnly: (
|
|
2408
|
-
declare const isChildrenToArray: (
|
|
2409
|
-
declare const isCloneElement: (node: Identifier | MemberExpression
|
|
2410
|
-
declare const isCreateContext: (node: Identifier | MemberExpression
|
|
2411
|
-
declare const isCreateElement: (node: Identifier | MemberExpression
|
|
2412
|
-
declare const isCreateRef: (node: Identifier | MemberExpression
|
|
2413
|
-
declare const isForwardRef: (node: Identifier | MemberExpression
|
|
2414
|
-
declare const isMemo: (node: Identifier | MemberExpression
|
|
2401
|
+
declare const isChildrenCount: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2402
|
+
declare const isChildrenForEach: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2403
|
+
declare const isChildrenMap: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2404
|
+
declare const isChildrenOnly: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2405
|
+
declare const isChildrenToArray: (context: _eslint_react_shared.RuleContext, node: MemberExpression) => boolean;
|
|
2406
|
+
declare const isCloneElement: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2407
|
+
declare const isCreateContext: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2408
|
+
declare const isCreateElement: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2409
|
+
declare const isCreateRef: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2410
|
+
declare const isForwardRef: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2411
|
+
declare const isMemo: (context: _eslint_react_shared.RuleContext, node: Identifier | MemberExpression) => boolean;
|
|
2415
2412
|
declare const isChildrenCountCall: isCallFromReactMember.ReturnType;
|
|
2416
2413
|
declare const isChildrenForEachCall: isCallFromReactMember.ReturnType;
|
|
2417
2414
|
declare const isChildrenMapCall: isCallFromReactMember.ReturnType;
|
|
@@ -2424,4 +2421,4 @@ declare const isCreateRefCall: isCallFromReact.ReturnType;
|
|
|
2424
2421
|
declare const isForwardRefCall: isCallFromReact.ReturnType;
|
|
2425
2422
|
declare const isMemoCall: isCallFromReact.ReturnType;
|
|
2426
2423
|
|
|
2427
|
-
export { DEFAULT_COMPONENT_HINT, DISPLAY_NAME_ASSIGNMENT_SELECTOR, type ERClassComponent, type ERComponent, ERComponentFlag, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectPhaseKind, type ERFunctionComponent, type ERHook, type ERHookKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentName, isComponentWillUnmount, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isDisplayNameAssignment, isForwardRef, isForwardRefCall, isFromReact, isFromReactMember, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetDerivedStateFromError, isGetDerivedStateFromProps, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|
|
2424
|
+
export { DEFAULT_COMPONENT_HINT, DISPLAY_NAME_ASSIGNMENT_SELECTOR, type ERClassComponent, type ERComponent, ERComponentFlag, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectPhaseKind, type ERFunctionComponent, type ERHook, type ERHookKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, hasNoneOrValidComponentName, hasValidHierarchy, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentName, isComponentWillUnmount, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isDisplayNameAssignment, isForwardRef, isForwardRefCall, isFromReact, isFromReactLoose, isFromReactMember, isFromReactMemberLoose, isFromReactMemberStrict, isFromReactStrict, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetDerivedStateFromError, isGetDerivedStateFromProps, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderMethodLike, isRenderPropLoose, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
|