@eslint-react/core 1.24.0-next.1 → 1.24.0-next.12
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 +145 -136
- package/dist/index.d.ts +145 -136
- package/dist/index.js +112 -122
- package/dist/index.mjs +102 -117
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import * as AST from '@eslint-react/ast';
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
2
|
+
import * as _eslint_react_shared from '@eslint-react/shared';
|
|
3
|
+
import { RuleContext } from '@eslint-react/shared';
|
|
4
4
|
import { TSESTree } from '@typescript-eslint/types';
|
|
5
|
-
import
|
|
6
|
-
import { RuleContext } from '@eslint-react/types';
|
|
5
|
+
import { _ } from '@eslint-react/eff';
|
|
7
6
|
import { TSESTree as TSESTree$1 } from '@typescript-eslint/utils';
|
|
8
|
-
import
|
|
7
|
+
import * as birecord from 'birecord';
|
|
9
8
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
10
9
|
import { Scope } from '@typescript-eslint/scope-manager';
|
|
11
10
|
import { SyntaxKind } from 'typescript';
|
|
12
11
|
|
|
13
12
|
interface ERSemanticNode {
|
|
14
|
-
_: string;
|
|
15
13
|
id: _ | TSESTree.Identifier | TSESTree.Identifier[];
|
|
14
|
+
key: string;
|
|
16
15
|
kind: string;
|
|
17
16
|
name: _ | string;
|
|
18
17
|
node: TSESTree.Node;
|
|
@@ -74,12 +73,23 @@ interface ERClassComponent extends ERSemanticNode {
|
|
|
74
73
|
node: AST.TSESTreeClass;
|
|
75
74
|
flag: ERClassComponentFlag;
|
|
76
75
|
hint: ERComponentHint;
|
|
77
|
-
methods:
|
|
76
|
+
methods: AST.TSESTreeMethodOrProperty[];
|
|
78
77
|
displayName: _ | TSESTree.Expression;
|
|
79
78
|
}
|
|
80
79
|
type ERComponent = ERClassComponent | ERFunctionComponent;
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
interface ComponentCollectorOptions {
|
|
82
|
+
collectDisplayName?: boolean;
|
|
83
|
+
collectHookCalls?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get a ctx and listeners for the rule to collect function components
|
|
87
|
+
* @param context The ESLint rule context
|
|
88
|
+
* @param hint The hint to use
|
|
89
|
+
* @param options The options to use
|
|
90
|
+
* @returns The component collector
|
|
91
|
+
*/
|
|
92
|
+
declare function useComponentCollector(context: RuleContext, hint?: bigint, options?: ComponentCollectorOptions): {
|
|
83
93
|
readonly ctx: {
|
|
84
94
|
readonly getAllComponents: (node: TSESTree.Program) => Map<string, ERFunctionComponent>;
|
|
85
95
|
readonly getCurrentEntries: () => {
|
|
@@ -96,6 +106,11 @@ declare function useComponentCollector(context: RuleContext, hint?: bigint): {
|
|
|
96
106
|
} | undefined;
|
|
97
107
|
};
|
|
98
108
|
readonly listeners: {
|
|
109
|
+
readonly "ReturnStatement[type]": (node: TSESTree.ReturnStatement) => void;
|
|
110
|
+
readonly "CallExpression[type]:exit"?: (node: TSESTree.CallExpression) => void;
|
|
111
|
+
readonly "AssignmentExpression[type][operator='='][left.type='MemberExpression'][left.property.name='displayName']"?: (node: TSESTree.AssignmentExpression & {
|
|
112
|
+
left: TSESTree.MemberExpression;
|
|
113
|
+
}) => void;
|
|
99
114
|
readonly ":function[type]": (node: AST.TSESTreeFunction) => void;
|
|
100
115
|
readonly ":function[type]:exit": () => {
|
|
101
116
|
key: string;
|
|
@@ -104,14 +119,13 @@ declare function useComponentCollector(context: RuleContext, hint?: bigint): {
|
|
|
104
119
|
isComponent: boolean;
|
|
105
120
|
} | undefined;
|
|
106
121
|
readonly "ArrowFunctionExpression[type][body.type!='BlockStatement']": () => void;
|
|
107
|
-
readonly "AssignmentExpression[type][operator='='][left.type='MemberExpression'][left.property.name='displayName']": (node: TSESTree.AssignmentExpression & {
|
|
108
|
-
left: TSESTree.MemberExpression;
|
|
109
|
-
}) => void;
|
|
110
|
-
readonly "CallExpression[type]:exit": (node: TSESTree.CallExpression) => void;
|
|
111
|
-
readonly "ReturnStatement[type]": (node: TSESTree.ReturnStatement) => void;
|
|
112
122
|
};
|
|
113
123
|
};
|
|
114
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Get a ctx and listeners for the rule to collect class components
|
|
127
|
+
* @returns The context and listeners for the rule
|
|
128
|
+
*/
|
|
115
129
|
declare function useComponentCollectorLegacy(): {
|
|
116
130
|
readonly ctx: {
|
|
117
131
|
readonly getAllComponents: (node: TSESTree$1.Program) => Map<string, ERClassComponent>;
|
|
@@ -126,14 +140,14 @@ declare function getFunctionComponentIdentifier(node: AST.TSESTreeFunction, cont
|
|
|
126
140
|
|
|
127
141
|
type ERComponentKind = "classComponent" | "functionComponent";
|
|
128
142
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
declare
|
|
133
|
-
declare function
|
|
134
|
-
declare function
|
|
135
|
-
|
|
136
|
-
declare function isRenderMethodLike(node: TSESTree
|
|
143
|
+
declare function isComponentDidMount(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
144
|
+
declare function isComponentWillUnmount(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
145
|
+
declare function isComponentDidCatch(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
146
|
+
declare function isGetDerivedStateFromError(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
147
|
+
declare function isGetDerivedStateFromProps(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
148
|
+
declare function isFunctionOfComponentDidMount(node: TSESTree.Node): boolean;
|
|
149
|
+
declare function isFunctionOfComponentWillUnmount(node: TSESTree.Node): boolean;
|
|
150
|
+
declare function isRenderMethodLike(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
137
151
|
declare function isFunctionOfRenderMethod(node: AST.TSESTreeFunction): boolean;
|
|
138
152
|
/**
|
|
139
153
|
* Check whether given node is declared inside class component's render block
|
|
@@ -150,7 +164,80 @@ declare function isFunctionOfRenderMethod(node: AST.TSESTreeFunction): boolean;
|
|
|
150
164
|
* @param node The AST node being checked
|
|
151
165
|
* @returns `true` if node is inside class component's render block, `false` if not
|
|
152
166
|
*/
|
|
153
|
-
declare function isInsideRenderMethod(node: TSESTree
|
|
167
|
+
declare function isInsideRenderMethod(node: TSESTree.Node): boolean;
|
|
168
|
+
|
|
169
|
+
type EREffectMethodKind = "useEffect" | "useInsertionEffect" | "useLayoutEffect";
|
|
170
|
+
type ERLifecycleMethodKind = "componentDidMount" | "componentWillUnmount";
|
|
171
|
+
|
|
172
|
+
declare const RE_COMPONENT_NAME: RegExp;
|
|
173
|
+
declare function getComponentNameFromIdentifier(node: TSESTree.Identifier | TSESTree.Identifier[] | _): string | undefined;
|
|
174
|
+
declare function isComponentName(name: string): boolean;
|
|
175
|
+
declare function hasNoneOrValidComponentName(node: AST.TSESTreeFunction, context: RuleContext): boolean;
|
|
176
|
+
|
|
177
|
+
type EREffectPhaseKind = "cleanup" | "setup";
|
|
178
|
+
type ERLifecyclePhaseKind = "mount" | "unmount";
|
|
179
|
+
type ERPhaseKind = EREffectPhaseKind | ERLifecyclePhaseKind;
|
|
180
|
+
declare const ERPhaseRelevance: birecord.BiRecord<{
|
|
181
|
+
readonly mount: "unmount";
|
|
182
|
+
readonly setup: "cleanup";
|
|
183
|
+
}>;
|
|
184
|
+
declare const isInversePhase: {
|
|
185
|
+
(a: ERPhaseKind): (b: ERPhaseKind) => boolean;
|
|
186
|
+
(a: ERPhaseKind, b: ERPhaseKind): boolean;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Unsafe check whether given node is a render function
|
|
191
|
+
* ```jsx
|
|
192
|
+
* const renderRow = () => <div />
|
|
193
|
+
* ` ^^^^^^^^^^^^`
|
|
194
|
+
* _ = <Component renderRow={() => <div />} />
|
|
195
|
+
* ` ^^^^^^^^^^^^^ `
|
|
196
|
+
* ```
|
|
197
|
+
* @param node The AST node to check
|
|
198
|
+
* @param context The rule context
|
|
199
|
+
* @returns `true` if node is a render function, `false` if not
|
|
200
|
+
*/
|
|
201
|
+
declare function isRenderFunctionLoose(node: AST.TSESTreeFunction, context: RuleContext): boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Unsafe check whether given JSXAttribute is a render prop
|
|
204
|
+
* ```jsx
|
|
205
|
+
* _ = <Component renderRow={() => <div />} />
|
|
206
|
+
* ` ^^^^^^^^^^^^^^^^^^^^^^^^^ `
|
|
207
|
+
* ```
|
|
208
|
+
* @param node The AST node to check
|
|
209
|
+
* @param context The rule context
|
|
210
|
+
* @returns `true` if node is a render prop, `false` if not
|
|
211
|
+
*/
|
|
212
|
+
declare function isRenderPropLoose(node: TSESTree.JSXAttribute, context: RuleContext): boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Unsafe check whether given node is declared directly inside a render property
|
|
215
|
+
* ```jsx
|
|
216
|
+
* const rows = { render: () => <div /> }
|
|
217
|
+
* ` ^^^^^^^^^^^^^ `
|
|
218
|
+
* _ = <Component rows={ [{ render: () => <div /> }] } />
|
|
219
|
+
* ` ^^^^^^^^^^^^^ `
|
|
220
|
+
* ```
|
|
221
|
+
* @internal
|
|
222
|
+
* @param node The AST node to check
|
|
223
|
+
* @returns `true` if component is declared inside a render property, `false` if not
|
|
224
|
+
*/
|
|
225
|
+
declare function isDirectValueOfRenderPropertyLoose(node: TSESTree.Node): boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Unsafe check whether given node is declared inside a render prop
|
|
228
|
+
* ```jsx
|
|
229
|
+
* _ = <Component renderRow={"node"} />
|
|
230
|
+
* ` ^^^^^^ `
|
|
231
|
+
* _ = <Component rows={ [{ render: "node" }] } />
|
|
232
|
+
* ` ^^^^^^ `
|
|
233
|
+
* ```
|
|
234
|
+
* @param node The AST node to check
|
|
235
|
+
* @returns `true` if component is declared inside a render prop, `false` if not
|
|
236
|
+
*/
|
|
237
|
+
declare function isDeclaredInRenderPropLoose(node: TSESTree.Node): boolean;
|
|
238
|
+
|
|
239
|
+
type ERStateKind = "actionState" | "state";
|
|
240
|
+
declare function isThisSetState(node: TSESTree.CallExpression): boolean;
|
|
154
241
|
|
|
155
242
|
/**
|
|
156
243
|
* Check if a node is a React class component
|
|
@@ -165,14 +252,10 @@ declare function isClassComponent(node: TSESTree.Node): node is AST.TSESTreeClas
|
|
|
165
252
|
*/
|
|
166
253
|
declare function isPureComponent(node: TSESTree.Node): boolean;
|
|
167
254
|
|
|
168
|
-
declare function hasNoneOrValidComponentName(node: AST.TSESTreeFunction, context: RuleContext): boolean;
|
|
169
|
-
|
|
170
255
|
type EREffectKind = "effect" | "insertionEffect" | "layoutEffect";
|
|
171
256
|
|
|
172
|
-
declare function
|
|
173
|
-
declare function
|
|
174
|
-
|
|
175
|
-
declare function getElementNameAndRepresentName(node: TSESTree.JSXOpeningElement, context: RuleContext, polymorphicPropName?: string, additionalComponents?: CustomComponentNormalized[]): [string, string];
|
|
257
|
+
declare function isFunctionOfUseEffectSetup(node: TSESTree.Node | _): boolean | undefined;
|
|
258
|
+
declare function isFunctionOfUseEffectCleanup(node: TSESTree.Node): boolean | undefined;
|
|
176
259
|
|
|
177
260
|
/**
|
|
178
261
|
* Determines whether inside `createElement`'s props.
|
|
@@ -242,85 +325,11 @@ declare const isUseStateCall: (node: TSESTree.CallExpression | undefined, contex
|
|
|
242
325
|
declare const isUseSyncExternalStoreCall: (node: TSESTree.CallExpression | undefined, context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>) => boolean;
|
|
243
326
|
declare const isUseTransitionCall: (node: TSESTree.CallExpression | undefined, context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>) => boolean;
|
|
244
327
|
|
|
245
|
-
declare function isComponentDidMount(node: TSESTree.Node): node is TSESTree.MethodDefinition | TSESTree.PropertyDefinition;
|
|
246
|
-
declare function isComponentWillUnmount(node: TSESTree.Node): node is TSESTree.MethodDefinition | TSESTree.PropertyDefinition;
|
|
247
|
-
declare function isComponentDidMountFunction(node: TSESTree.Node): boolean;
|
|
248
|
-
declare function isComponentWillUnmountFunction(node: TSESTree.Node): boolean;
|
|
249
|
-
|
|
250
|
-
declare const ERPhaseRelevance: _eslint_react_eff.BiRecord<{
|
|
251
|
-
readonly mount: "unmount";
|
|
252
|
-
readonly setup: "cleanup";
|
|
253
|
-
}>;
|
|
254
|
-
|
|
255
|
-
type EREffectPhaseKind = "cleanup" | "setup";
|
|
256
|
-
type ERLifecyclePhaseKind = "mount" | "unmount";
|
|
257
|
-
type ERPhaseKind = EREffectPhaseKind | ERLifecyclePhaseKind;
|
|
258
|
-
|
|
259
|
-
declare const isInversePhase: {
|
|
260
|
-
(a: ERPhaseKind): (b: ERPhaseKind) => boolean;
|
|
261
|
-
(a: ERPhaseKind, b: ERPhaseKind): boolean;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Unsafe check whether given node is declared directly inside a render property
|
|
266
|
-
* ```jsx
|
|
267
|
-
* const rows = { render: () => <div /> }
|
|
268
|
-
* ` ^^^^^^^^^^^^^ `
|
|
269
|
-
* _ = <Component rows={ [{ render: () => <div /> }] } />
|
|
270
|
-
* ` ^^^^^^^^^^^^^ `
|
|
271
|
-
* ```
|
|
272
|
-
* @internal
|
|
273
|
-
* @param node The AST node to check
|
|
274
|
-
* @returns `true` if component is declared inside a render property, `false` if not
|
|
275
|
-
*/
|
|
276
|
-
declare function isDirectValueOfRenderPropertyLoose(node: TSESTree.Node): boolean;
|
|
277
|
-
/**
|
|
278
|
-
* Unsafe check whether given node is declared inside a render prop
|
|
279
|
-
* ```jsx
|
|
280
|
-
* _ = <Component renderRow={"node"} />
|
|
281
|
-
* ` ^^^^^^ `
|
|
282
|
-
* _ = <Component rows={ [{ render: "node" }] } />
|
|
283
|
-
* ` ^^^^^^ `
|
|
284
|
-
* ```
|
|
285
|
-
* @param node The AST node to check
|
|
286
|
-
* @returns `true` if component is declared inside a render prop, `false` if not
|
|
287
|
-
*/
|
|
288
|
-
declare function isDeclaredInRenderPropLoose(node: TSESTree.Node): boolean;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Unsafe check whether given node is a render function
|
|
292
|
-
* ```jsx
|
|
293
|
-
* const renderRow = () => <div />
|
|
294
|
-
* ` ^^^^^^^^^^^^`
|
|
295
|
-
* _ = <Component renderRow={() => <div />} />
|
|
296
|
-
* ` ^^^^^^^^^^^^^ `
|
|
297
|
-
* ```
|
|
298
|
-
* @param node The AST node to check
|
|
299
|
-
* @param context The rule context
|
|
300
|
-
* @returns `true` if node is a render function, `false` if not
|
|
301
|
-
*/
|
|
302
|
-
declare function isRenderFunctionLoose(node: AST.TSESTreeFunction, context: RuleContext): boolean;
|
|
303
|
-
/**
|
|
304
|
-
* Unsafe check whether given JSXAttribute is a render prop
|
|
305
|
-
* ```jsx
|
|
306
|
-
* _ = <Component renderRow={() => <div />} />
|
|
307
|
-
* ` ^^^^^^^^^^^^^^^^^^^^^^^^^ `
|
|
308
|
-
* ```
|
|
309
|
-
* @param node The AST node to check
|
|
310
|
-
* @param context The rule context
|
|
311
|
-
* @returns `true` if node is a render prop, `false` if not
|
|
312
|
-
*/
|
|
313
|
-
declare function isRenderPropLoose(node: TSESTree.JSXAttribute, context: RuleContext): boolean;
|
|
314
|
-
|
|
315
328
|
interface ERSemanticEntry {
|
|
316
329
|
node: TSESTree.Node;
|
|
317
330
|
phase: ERPhaseKind;
|
|
318
331
|
}
|
|
319
332
|
|
|
320
|
-
declare function isThisSetState(node: TSESTree.CallExpression): boolean;
|
|
321
|
-
|
|
322
|
-
type ERStateKind = "actionState" | "state";
|
|
323
|
-
|
|
324
333
|
declare const getId: () => string;
|
|
325
334
|
|
|
326
335
|
/**
|
|
@@ -2499,80 +2508,80 @@ declare function isReactAPIWithName(name: string): ReturnType<typeof isFromReact
|
|
|
2499
2508
|
declare function isReactAPIWithName(name: string, member: string): ReturnType<typeof isFromReactMember>;
|
|
2500
2509
|
declare function isReactAPICallWithName(name: string): ReturnType<typeof isCallFromReact>;
|
|
2501
2510
|
declare function isReactAPICallWithName(name: string, member: string): ReturnType<typeof isCallFromReactMember>;
|
|
2502
|
-
declare const isChildrenCount: (node: MemberExpression, context:
|
|
2503
|
-
declare const isChildrenForEach: (node: MemberExpression, context:
|
|
2504
|
-
declare const isChildrenMap: (node: MemberExpression, context:
|
|
2505
|
-
declare const isChildrenOnly: (node: MemberExpression, context:
|
|
2506
|
-
declare const isChildrenToArray: (node: MemberExpression, context:
|
|
2507
|
-
declare const isCloneElement: (node: Identifier | MemberExpression, context:
|
|
2508
|
-
declare const isCreateContext: (node: Identifier | MemberExpression, context:
|
|
2509
|
-
declare const isCreateElement: (node: Identifier | MemberExpression, context:
|
|
2510
|
-
declare const isCreateRef: (node: Identifier | MemberExpression, context:
|
|
2511
|
-
declare const isForwardRef: (node: Identifier | MemberExpression, context:
|
|
2512
|
-
declare const isMemo: (node: Identifier | MemberExpression, context:
|
|
2511
|
+
declare const isChildrenCount: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2512
|
+
declare const isChildrenForEach: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2513
|
+
declare const isChildrenMap: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2514
|
+
declare const isChildrenOnly: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2515
|
+
declare const isChildrenToArray: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2516
|
+
declare const isCloneElement: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2517
|
+
declare const isCreateContext: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2518
|
+
declare const isCreateElement: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2519
|
+
declare const isCreateRef: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2520
|
+
declare const isForwardRef: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2521
|
+
declare const isMemo: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2513
2522
|
declare const isChildrenCountCall: {
|
|
2514
|
-
(context:
|
|
2523
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2515
2524
|
callee: MemberExpression;
|
|
2516
2525
|
};
|
|
2517
|
-
(node: Node, context:
|
|
2526
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2518
2527
|
callee: MemberExpression;
|
|
2519
2528
|
};
|
|
2520
2529
|
};
|
|
2521
2530
|
declare const isChildrenForEachCall: {
|
|
2522
|
-
(context:
|
|
2531
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2523
2532
|
callee: MemberExpression;
|
|
2524
2533
|
};
|
|
2525
|
-
(node: Node, context:
|
|
2534
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2526
2535
|
callee: MemberExpression;
|
|
2527
2536
|
};
|
|
2528
2537
|
};
|
|
2529
2538
|
declare const isChildrenMapCall: {
|
|
2530
|
-
(context:
|
|
2539
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2531
2540
|
callee: MemberExpression;
|
|
2532
2541
|
};
|
|
2533
|
-
(node: Node, context:
|
|
2542
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2534
2543
|
callee: MemberExpression;
|
|
2535
2544
|
};
|
|
2536
2545
|
};
|
|
2537
2546
|
declare const isChildrenOnlyCall: {
|
|
2538
|
-
(context:
|
|
2547
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2539
2548
|
callee: MemberExpression;
|
|
2540
2549
|
};
|
|
2541
|
-
(node: Node, context:
|
|
2550
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2542
2551
|
callee: MemberExpression;
|
|
2543
2552
|
};
|
|
2544
2553
|
};
|
|
2545
2554
|
declare const isChildrenToArrayCall: {
|
|
2546
|
-
(context:
|
|
2555
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2547
2556
|
callee: MemberExpression;
|
|
2548
2557
|
};
|
|
2549
|
-
(node: Node, context:
|
|
2558
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2550
2559
|
callee: MemberExpression;
|
|
2551
2560
|
};
|
|
2552
2561
|
};
|
|
2553
2562
|
declare const isCloneElementCall: {
|
|
2554
|
-
(context:
|
|
2555
|
-
(node: Node, context:
|
|
2563
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2564
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2556
2565
|
};
|
|
2557
2566
|
declare const isCreateContextCall: {
|
|
2558
|
-
(context:
|
|
2559
|
-
(node: Node, context:
|
|
2567
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2568
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2560
2569
|
};
|
|
2561
2570
|
declare const isCreateElementCall: {
|
|
2562
|
-
(context:
|
|
2563
|
-
(node: Node, context:
|
|
2571
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2572
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2564
2573
|
};
|
|
2565
2574
|
declare const isCreateRefCall: {
|
|
2566
|
-
(context:
|
|
2567
|
-
(node: Node, context:
|
|
2575
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2576
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2568
2577
|
};
|
|
2569
2578
|
declare const isForwardRefCall: {
|
|
2570
|
-
(context:
|
|
2571
|
-
(node: Node, context:
|
|
2579
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2580
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2572
2581
|
};
|
|
2573
2582
|
declare const isMemoCall: {
|
|
2574
|
-
(context:
|
|
2575
|
-
(node: Node, context:
|
|
2583
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2584
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2576
2585
|
};
|
|
2577
2586
|
|
|
2578
|
-
export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier,
|
|
2587
|
+
export { type ComponentCollectorOptions, DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, ERPhaseRelevance, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, getId, 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, 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 };
|