@eslint-react/core 1.24.0-beta.0 → 1.24.0-beta.16
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 +152 -140
- package/dist/index.d.ts +152 -140
- package/dist/index.js +179 -178
- package/dist/index.mjs +163 -168
- 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,8 @@ 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;
|
|
99
111
|
readonly ":function[type]": (node: AST.TSESTreeFunction) => void;
|
|
100
112
|
readonly ":function[type]:exit": () => {
|
|
101
113
|
key: string;
|
|
@@ -104,14 +116,13 @@ declare function useComponentCollector(context: RuleContext, hint?: bigint): {
|
|
|
104
116
|
isComponent: boolean;
|
|
105
117
|
} | undefined;
|
|
106
118
|
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
119
|
};
|
|
113
120
|
};
|
|
114
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Get a ctx and listeners for the rule to collect class components
|
|
124
|
+
* @returns The context and listeners for the rule
|
|
125
|
+
*/
|
|
115
126
|
declare function useComponentCollectorLegacy(): {
|
|
116
127
|
readonly ctx: {
|
|
117
128
|
readonly getAllComponents: (node: TSESTree$1.Program) => Map<string, ERClassComponent>;
|
|
@@ -122,18 +133,29 @@ declare function useComponentCollectorLegacy(): {
|
|
|
122
133
|
};
|
|
123
134
|
};
|
|
124
135
|
|
|
136
|
+
/**
|
|
137
|
+
* The ESQuery selector for a component display name assignment expression
|
|
138
|
+
*/
|
|
139
|
+
declare const COMPONENT_DISPLAY_NAME_ASSIGNMENT_SELECTOR: string;
|
|
140
|
+
/**
|
|
141
|
+
* Check if the node is a component display name assignment expression
|
|
142
|
+
* @param node The AST node
|
|
143
|
+
* @returns `true` if the node is a component display name assignment
|
|
144
|
+
*/
|
|
145
|
+
declare function isComponentDisplayNameAssignment(node: TSESTree.Node | _): node is TSESTree.AssignmentExpression;
|
|
146
|
+
|
|
125
147
|
declare function getFunctionComponentIdentifier(node: AST.TSESTreeFunction, context: RuleContext): TSESTree.Identifier | TSESTree.Identifier[] | _;
|
|
126
148
|
|
|
127
149
|
type ERComponentKind = "classComponent" | "functionComponent";
|
|
128
150
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
declare
|
|
133
|
-
declare function
|
|
134
|
-
declare function
|
|
135
|
-
|
|
136
|
-
declare function isRenderMethodLike(node: TSESTree
|
|
151
|
+
declare function isComponentDidMount(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
152
|
+
declare function isComponentWillUnmount(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
153
|
+
declare function isComponentDidCatch(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
154
|
+
declare function isGetDerivedStateFromError(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
155
|
+
declare function isGetDerivedStateFromProps(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
156
|
+
declare function isFunctionOfComponentDidMount(node: TSESTree.Node): boolean;
|
|
157
|
+
declare function isFunctionOfComponentWillUnmount(node: TSESTree.Node): boolean;
|
|
158
|
+
declare function isRenderMethodLike(node: TSESTree.Node): node is AST.TSESTreeMethodOrProperty;
|
|
137
159
|
declare function isFunctionOfRenderMethod(node: AST.TSESTreeFunction): boolean;
|
|
138
160
|
/**
|
|
139
161
|
* Check whether given node is declared inside class component's render block
|
|
@@ -150,7 +172,77 @@ declare function isFunctionOfRenderMethod(node: AST.TSESTreeFunction): boolean;
|
|
|
150
172
|
* @param node The AST node being checked
|
|
151
173
|
* @returns `true` if node is inside class component's render block, `false` if not
|
|
152
174
|
*/
|
|
153
|
-
declare function isInsideRenderMethod(node: TSESTree
|
|
175
|
+
declare function isInsideRenderMethod(node: TSESTree.Node): boolean;
|
|
176
|
+
|
|
177
|
+
declare const RE_COMPONENT_NAME: RegExp;
|
|
178
|
+
declare function getComponentNameFromIdentifier(node: TSESTree.Identifier | TSESTree.Identifier[] | _): string | undefined;
|
|
179
|
+
declare function isComponentName(name: string): boolean;
|
|
180
|
+
declare function hasNoneOrValidComponentName(node: AST.TSESTreeFunction, context: RuleContext): boolean;
|
|
181
|
+
|
|
182
|
+
type EREffectPhaseKind = "cleanup" | "setup";
|
|
183
|
+
type ERLifecyclePhaseKind = "mount" | "unmount";
|
|
184
|
+
type ERPhaseKind = EREffectPhaseKind | ERLifecyclePhaseKind;
|
|
185
|
+
declare const ERPhaseRelevance: birecord.BiRecord<{
|
|
186
|
+
readonly mount: "unmount";
|
|
187
|
+
readonly setup: "cleanup";
|
|
188
|
+
}>;
|
|
189
|
+
declare const isInversePhase: {
|
|
190
|
+
(a: ERPhaseKind): (b: ERPhaseKind) => boolean;
|
|
191
|
+
(a: ERPhaseKind, b: ERPhaseKind): boolean;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Unsafe check whether given node is a render function
|
|
196
|
+
* ```jsx
|
|
197
|
+
* const renderRow = () => <div />
|
|
198
|
+
* ` ^^^^^^^^^^^^`
|
|
199
|
+
* _ = <Component renderRow={() => <div />} />
|
|
200
|
+
* ` ^^^^^^^^^^^^^ `
|
|
201
|
+
* ```
|
|
202
|
+
* @param node The AST node to check
|
|
203
|
+
* @param context The rule context
|
|
204
|
+
* @returns `true` if node is a render function, `false` if not
|
|
205
|
+
*/
|
|
206
|
+
declare function isRenderFunctionLoose(node: AST.TSESTreeFunction, context: RuleContext): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Unsafe check whether given JSXAttribute is a render prop
|
|
209
|
+
* ```jsx
|
|
210
|
+
* _ = <Component renderRow={() => <div />} />
|
|
211
|
+
* ` ^^^^^^^^^^^^^^^^^^^^^^^^^ `
|
|
212
|
+
* ```
|
|
213
|
+
* @param node The AST node to check
|
|
214
|
+
* @param context The rule context
|
|
215
|
+
* @returns `true` if node is a render prop, `false` if not
|
|
216
|
+
*/
|
|
217
|
+
declare function isRenderPropLoose(node: TSESTree.JSXAttribute, context: RuleContext): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Unsafe check whether given node is declared directly inside a render property
|
|
220
|
+
* ```jsx
|
|
221
|
+
* const rows = { render: () => <div /> }
|
|
222
|
+
* ` ^^^^^^^^^^^^^ `
|
|
223
|
+
* _ = <Component rows={ [{ render: () => <div /> }] } />
|
|
224
|
+
* ` ^^^^^^^^^^^^^ `
|
|
225
|
+
* ```
|
|
226
|
+
* @internal
|
|
227
|
+
* @param node The AST node to check
|
|
228
|
+
* @returns `true` if component is declared inside a render property, `false` if not
|
|
229
|
+
*/
|
|
230
|
+
declare function isDirectValueOfRenderPropertyLoose(node: TSESTree.Node): boolean;
|
|
231
|
+
/**
|
|
232
|
+
* Unsafe check whether given node is declared inside a render prop
|
|
233
|
+
* ```jsx
|
|
234
|
+
* _ = <Component renderRow={"node"} />
|
|
235
|
+
* ` ^^^^^^ `
|
|
236
|
+
* _ = <Component rows={ [{ render: "node" }] } />
|
|
237
|
+
* ` ^^^^^^ `
|
|
238
|
+
* ```
|
|
239
|
+
* @param node The AST node to check
|
|
240
|
+
* @returns `true` if component is declared inside a render prop, `false` if not
|
|
241
|
+
*/
|
|
242
|
+
declare function isDeclaredInRenderPropLoose(node: TSESTree.Node): boolean;
|
|
243
|
+
|
|
244
|
+
type ERStateKind = "actionState" | "state";
|
|
245
|
+
declare function isThisSetState(node: TSESTree.CallExpression): boolean;
|
|
154
246
|
|
|
155
247
|
/**
|
|
156
248
|
* Check if a node is a React class component
|
|
@@ -165,14 +257,10 @@ declare function isClassComponent(node: TSESTree.Node): node is AST.TSESTreeClas
|
|
|
165
257
|
*/
|
|
166
258
|
declare function isPureComponent(node: TSESTree.Node): boolean;
|
|
167
259
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
type EREffectKind = "effect" | "insertionEffect" | "layoutEffect";
|
|
260
|
+
type EREffectKind = "useEffect" | "useLayoutEffect" | "useInsertionEffect";
|
|
171
261
|
|
|
172
|
-
declare function
|
|
173
|
-
declare function
|
|
174
|
-
|
|
175
|
-
declare function getElementNameAndRepresentName(node: TSESTree.JSXOpeningElement, context: RuleContext, polymorphicPropName?: string, additionalComponents?: CustomComponentNormalized[]): [string, string];
|
|
262
|
+
declare function isFunctionOfUseEffectSetup(node: TSESTree.Node | _): boolean | undefined;
|
|
263
|
+
declare function isFunctionOfUseEffectCleanup(node: TSESTree.Node): boolean | undefined;
|
|
176
264
|
|
|
177
265
|
/**
|
|
178
266
|
* Determines whether inside `createElement`'s props.
|
|
@@ -242,87 +330,11 @@ declare const isUseStateCall: (node: TSESTree.CallExpression | undefined, contex
|
|
|
242
330
|
declare const isUseSyncExternalStoreCall: (node: TSESTree.CallExpression | undefined, context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>) => boolean;
|
|
243
331
|
declare const isUseTransitionCall: (node: TSESTree.CallExpression | undefined, context: Readonly<_typescript_eslint_utils_ts_eslint.RuleContext<string, readonly unknown[]>>) => boolean;
|
|
244
332
|
|
|
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
333
|
interface ERSemanticEntry {
|
|
316
334
|
node: TSESTree.Node;
|
|
317
335
|
phase: ERPhaseKind;
|
|
318
336
|
}
|
|
319
337
|
|
|
320
|
-
declare function isThisSetState(node: TSESTree.CallExpression): boolean;
|
|
321
|
-
|
|
322
|
-
type ERStateKind = "actionState" | "state";
|
|
323
|
-
|
|
324
|
-
declare const getId: () => string;
|
|
325
|
-
|
|
326
338
|
/**
|
|
327
339
|
* Checks if the given node is a call expression to the given function or method of the pragma
|
|
328
340
|
* @param name The name of the function or method to check
|
|
@@ -351,7 +363,7 @@ type IsCallFromReactMember = {
|
|
|
351
363
|
};
|
|
352
364
|
declare function isCallFromReactMember(pragmaMemberName: string, name: string): IsCallFromReactMember;
|
|
353
365
|
|
|
354
|
-
declare function isInitializedFromReact(name: string,
|
|
366
|
+
declare function isInitializedFromReact(name: string, importSource: string, initialScope: Scope): boolean;
|
|
355
367
|
|
|
356
368
|
/**********************************************
|
|
357
369
|
* DO NOT MODIFY THIS FILE MANUALLY *
|
|
@@ -2499,80 +2511,80 @@ declare function isReactAPIWithName(name: string): ReturnType<typeof isFromReact
|
|
|
2499
2511
|
declare function isReactAPIWithName(name: string, member: string): ReturnType<typeof isFromReactMember>;
|
|
2500
2512
|
declare function isReactAPICallWithName(name: string): ReturnType<typeof isCallFromReact>;
|
|
2501
2513
|
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:
|
|
2514
|
+
declare const isChildrenCount: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2515
|
+
declare const isChildrenForEach: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2516
|
+
declare const isChildrenMap: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2517
|
+
declare const isChildrenOnly: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2518
|
+
declare const isChildrenToArray: (node: MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2519
|
+
declare const isCloneElement: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2520
|
+
declare const isCreateContext: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2521
|
+
declare const isCreateElement: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2522
|
+
declare const isCreateRef: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2523
|
+
declare const isForwardRef: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2524
|
+
declare const isMemo: (node: Identifier | MemberExpression, context: _eslint_react_shared.RuleContext) => boolean;
|
|
2513
2525
|
declare const isChildrenCountCall: {
|
|
2514
|
-
(context:
|
|
2526
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2515
2527
|
callee: MemberExpression;
|
|
2516
2528
|
};
|
|
2517
|
-
(node: Node, context:
|
|
2529
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2518
2530
|
callee: MemberExpression;
|
|
2519
2531
|
};
|
|
2520
2532
|
};
|
|
2521
2533
|
declare const isChildrenForEachCall: {
|
|
2522
|
-
(context:
|
|
2534
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2523
2535
|
callee: MemberExpression;
|
|
2524
2536
|
};
|
|
2525
|
-
(node: Node, context:
|
|
2537
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2526
2538
|
callee: MemberExpression;
|
|
2527
2539
|
};
|
|
2528
2540
|
};
|
|
2529
2541
|
declare const isChildrenMapCall: {
|
|
2530
|
-
(context:
|
|
2542
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2531
2543
|
callee: MemberExpression;
|
|
2532
2544
|
};
|
|
2533
|
-
(node: Node, context:
|
|
2545
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2534
2546
|
callee: MemberExpression;
|
|
2535
2547
|
};
|
|
2536
2548
|
};
|
|
2537
2549
|
declare const isChildrenOnlyCall: {
|
|
2538
|
-
(context:
|
|
2550
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2539
2551
|
callee: MemberExpression;
|
|
2540
2552
|
};
|
|
2541
|
-
(node: Node, context:
|
|
2553
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2542
2554
|
callee: MemberExpression;
|
|
2543
2555
|
};
|
|
2544
2556
|
};
|
|
2545
2557
|
declare const isChildrenToArrayCall: {
|
|
2546
|
-
(context:
|
|
2558
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression & {
|
|
2547
2559
|
callee: MemberExpression;
|
|
2548
2560
|
};
|
|
2549
|
-
(node: Node, context:
|
|
2561
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression & {
|
|
2550
2562
|
callee: MemberExpression;
|
|
2551
2563
|
};
|
|
2552
2564
|
};
|
|
2553
2565
|
declare const isCloneElementCall: {
|
|
2554
|
-
(context:
|
|
2555
|
-
(node: Node, context:
|
|
2566
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2567
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2556
2568
|
};
|
|
2557
2569
|
declare const isCreateContextCall: {
|
|
2558
|
-
(context:
|
|
2559
|
-
(node: Node, context:
|
|
2570
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2571
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2560
2572
|
};
|
|
2561
2573
|
declare const isCreateElementCall: {
|
|
2562
|
-
(context:
|
|
2563
|
-
(node: Node, context:
|
|
2574
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2575
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2564
2576
|
};
|
|
2565
2577
|
declare const isCreateRefCall: {
|
|
2566
|
-
(context:
|
|
2567
|
-
(node: Node, context:
|
|
2578
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2579
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2568
2580
|
};
|
|
2569
2581
|
declare const isForwardRefCall: {
|
|
2570
|
-
(context:
|
|
2571
|
-
(node: Node, context:
|
|
2582
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2583
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2572
2584
|
};
|
|
2573
2585
|
declare const isMemoCall: {
|
|
2574
|
-
(context:
|
|
2575
|
-
(node: Node, context:
|
|
2586
|
+
(context: _eslint_react_shared.RuleContext): (node: Node) => node is CallExpression;
|
|
2587
|
+
(node: Node, context: _eslint_react_shared.RuleContext): node is CallExpression;
|
|
2576
2588
|
};
|
|
2577
2589
|
|
|
2578
|
-
export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type
|
|
2590
|
+
export { COMPONENT_DISPLAY_NAME_ASSIGNMENT_SELECTOR, type ComponentCollectorOptions, DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, 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, isComponentDisplayNameAssignment, 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 };
|