15
15
16
16
- [ ERClassComponentFlag] ( README.md#erclasscomponentflag )
17
17
- [ ERComponent] ( README.md#ercomponent )
18
- - [ ERComponentCollectorHint ] ( README.md#ercomponentcollectorhint )
18
+ - [ ERComponentHint ] ( README.md#ercomponenthint )
19
19
- [ ERComponentInitPath] ( README.md#ercomponentinitpath )
20
20
- [ ERComponentKind] ( README.md#ercomponentkind )
21
- - [ ERConstruction] ( README.md#erconstruction )
22
21
- [ ERFunctionComponentFlag] ( README.md#erfunctioncomponentflag )
23
22
24
23
### Variables
25
24
26
- - [ DEFAULT\_ COMPONENT\_ COLLECTOR \ _ HINT] ( README.md#default_component_collector_hint )
25
+ - [ DEFAULT\_ COMPONENT\_ HINT] ( README.md#default_component_hint )
27
26
- [ ERClassComponentFlag] ( README.md#erclasscomponentflag-1 )
28
- - [ ERComponentCollectorHint] ( README.md#ercomponentcollectorhint-1 )
29
- - [ ERConstruction] ( README.md#erconstruction-1 )
27
+ - [ ERComponentHint] ( README.md#ercomponenthint-1 )
30
28
- [ ERFunctionComponentFlag] ( README.md#erfunctioncomponentflag-1 )
31
29
- [ RE\_ COMPONENT\_ NAME] ( README.md#re_component_name )
32
30
- [ RE\_ HOOK\_ NAME] ( README.md#re_hook_name )
33
31
34
32
### Functions
35
33
36
- - [ constructionDetector] ( README.md#constructiondetector )
37
34
- [ getComponentInitPath] ( README.md#getcomponentinitpath )
38
35
- [ getComponentNameFromIdentifier] ( README.md#getcomponentnamefromidentifier )
39
36
- [ getFunctionComponentIdentifier] ( README.md#getfunctioncomponentidentifier )
76
73
- [ isReactHookCallWithName] ( README.md#isreacthookcallwithname )
77
74
- [ isReactHookCallWithNameLoose] ( README.md#isreacthookcallwithnameloose )
78
75
- [ isReactHookName] ( README.md#isreacthookname )
79
- - [ isUnstableAssignmentPattern] ( README.md#isunstableassignmentpattern )
80
76
- [ isUseCallbackCall] ( README.md#isusecallbackcall )
81
77
- [ isUseContextCall] ( README.md#isusecontextcall )
82
78
- [ isUseDebugValueCall] ( README.md#isusedebugvaluecall )
113
109
114
110
___
115
111
116
- ### ERComponentCollectorHint
112
+ ### ERComponentHint
117
113
118
- Ƭ ** ERComponentCollectorHint ** : ` bigint `
114
+ Ƭ ** ERComponentHint ** : ` bigint `
119
115
120
116
___
121
117
@@ -131,21 +127,15 @@ ___
131
127
132
128
___
133
129
134
- ### ERConstruction
135
-
136
- Ƭ **ERConstruction**: `Data.TaggedEnum`\<\{ `Array`: \{ `node`: `TSESTree.ArrayExpression` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `AssignmentExpression`: \{ `node`: `TSESTree.Node` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `ClassExpression`: \{ `node`: `TSESTree.ClassExpression` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `FunctionDeclaration`: \{ `node`: `TSESTree.FunctionDeclaration` ; `usage`: `O.Option`\<`TSESTree.Expression` \| `TSESTree.Identifier`\> } ; `FunctionExpression`: \{ `node`: `TSESTree.ArrowFunctionExpression` \| `TSESTree.FunctionExpression` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `JSXElement`: \{ `node`: `TSESTree.JSXElement` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `JSXFragment`: \{ `node`: `TSESTree.JSXFragment` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `NewExpression`: \{ `node`: `TSESTree.NewExpression` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `None`: {} ; `ObjectExpression`: \{ `node`: `TSESTree.ObjectExpression` ; `usage`: `O.Option`\<`TSESTree.Node`\> } ; `RegExpLiteral`: \{ `node`: `TSESTree.Literal` ; `usage`: `O.Option`\<`TSESTree.Node`\> } }\>
137
-
138
- ___
139
-
140
130
### ERFunctionComponentFlag
141
131
142
132
Ƭ ** ERFunctionComponentFlag** : ` bigint `
143
133
144
134
## Variables
145
135
146
- ### DEFAULT\_ COMPONENT\_ COLLECTOR \ _ HINT
136
+ ### DEFAULT\_ COMPONENT\_ HINT
147
137
148
- • ` Const ` ** DEFAULT\_ COMPONENT\_ COLLECTOR \ _ HINT** : ` bigint `
138
+ • ` Const ` ** DEFAULT\_ COMPONENT\_ HINT** : ` bigint `
149
139
150
140
___
151
141
162
152
163
153
___
164
154
165
- ### ERComponentCollectorHint
155
+ ### ERComponentHint
166
156
167
- • ** ERComponentCollectorHint ** : ` Object `
157
+ • ** ERComponentHint ** : ` Object `
168
158
169
159
hints for component collector
170
160
@@ -191,28 +181,6 @@ hints for component collector
191
181
192
182
___
193
183
194
- ### ERConstruction
195
-
196
- • ** ERConstruction** : ` Object `
197
-
198
- #### Type declaration
199
-
200
- | Name | Type |
201
- | :------ | :------ |
202
- | ` Array ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "Array" `` ; ` node ` : ` ArrayExpression ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
203
- | ` AssignmentExpression ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "AssignmentExpression" `` ; ` node ` : ` Node ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
204
- | ` ClassExpression ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "ClassExpression" `` ; ` node ` : ` ClassExpression ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
205
- | ` FunctionDeclaration ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "FunctionDeclaration" `` ; ` node ` : ` FunctionDeclaration ` ; ` usage ` : ` Option ` \< ` Expression ` \> }\> , `` "_tag" `` \> |
206
- | ` FunctionExpression ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "FunctionExpression" `` ; ` node ` : ` ArrowFunctionExpression ` \| ` FunctionExpression ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
207
- | ` JSXElement ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "JSXElement" `` ; ` node ` : ` JSXElement ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
208
- | ` JSXFragment ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "JSXFragment" `` ; ` node ` : ` JSXFragment ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
209
- | ` NewExpression ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "NewExpression" `` ; ` node ` : ` NewExpression ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
210
- | ` None ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "None" `` }\> , `` "_tag" `` \> |
211
- | ` ObjectExpression ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "ObjectExpression" `` ; ` node ` : ` ObjectExpression ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
212
- | ` RegExpLiteral ` | ` Constructor ` \< ` Data ` \<\{ ` _tag ` : `` "RegExpLiteral" `` ; ` node ` : ` Literal ` ; ` usage ` : ` Option ` \< ` Node ` \> }\> , `` "_tag" `` \> |
213
-
214
- ___
215
-
216
184
### ERFunctionComponentFlag
217
185
218
186
• ** ERFunctionComponentFlag** : ` Object `
239
207
240
208
## Functions
241
209
242
- ### constructionDetector
243
-
244
- ▸ ** constructionDetector** \< ` T ` \> (` context ` ): (` node ` : ` TSESTree.Node ` ) => [ ` ERConstruction ` ] ( README.md#erconstruction )
245
-
246
- Get a function that detects the construction of a given node.
247
-
248
- #### Type parameters
249
-
250
- | Name | Type |
251
- | :------ | :------ |
252
- | ` T ` | extends ` Readonly ` \< ` RuleContext ` \< ` string ` , readonly ` unknown ` [ ] \>\> |
253
-
254
- #### Parameters
255
-
256
- | Name | Type | Description |
257
- | :------ | :------ | :------ |
258
- | ` context ` | ` T ` | The rule context |
259
-
260
- #### Returns
261
-
262
- ` fn `
263
-
264
- A function that detects the construction of a given node
265
-
266
- ▸ (` node ` ): [ ` ERConstruction ` ] ( README.md#erconstruction )
267
-
268
- ##### Parameters
269
-
270
- | Name | Type |
271
- | :------ | :------ |
272
- | ` node ` | ` TSESTree.Node ` |
273
-
274
- ##### Returns
275
-
276
- [ ` ERConstruction ` ] ( README.md#erconstruction )
277
-
278
- ___
279
-
280
210
### getComponentInitPath
281
211
282
212
▸ ** getComponentInitPath** (` node ` ): ` O.Option ` \< [ ` ERComponentInitPath ` ] ( README.md#ercomponentinitpath ) \>
@@ -1084,24 +1014,6 @@ ___
1084
1014
1085
1015
___
1086
1016
1087
- ### isUnstableAssignmentPattern
1088
-
1089
- ▸ ** isUnstableAssignmentPattern** (` node ` ): node is AssignmentPattern & Object
1090
-
1091
- Check if the given node is an unstable assignment pattern (will change between assignments)
1092
-
1093
- #### Parameters
1094
-
1095
- | Name | Type | Description |
1096
- | :------ | :------ | :------ |
1097
- | ` node ` | ` AssignmentPattern ` | The AST node to check |
1098
-
1099
- #### Returns
1100
-
1101
- node is AssignmentPattern & Object
1102
-
1103
- ___
1104
-
1105
1017
### isUseCallbackCall
1106
1018
1107
1019
▸ ** isUseCallbackCall** (` node ` , ` context ` , ` pragma ` ): ` boolean `
@@ -1459,7 +1371,7 @@ ___
1459
1371
| Name | Type | Default value |
1460
1372
| :------ | :------ | :------ |
1461
1373
| ` context ` | ` Readonly ` \< ` RuleContext ` \< ` string ` , readonly ` unknown ` [ ] \>\> | ` undefined ` |
1462
- | ` hint ` | ` bigint ` | ` DEFAULT_COMPONENT_COLLECTOR_HINT ` |
1374
+ | ` hint ` | ` bigint ` | ` DEFAULT_COMPONENT_HINT ` |
1463
1375
| ` pragma ` | ` string ` | ` undefined ` |
1464
1376
1465
1377
#### Returns
0 commit comments