@eslint-react/core 1.26.3-next.7 → 1.26.3-next.9
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 +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +24 -10
- package/dist/index.mjs +24 -10
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -24,11 +24,29 @@ type ERComponentHint = bigint;
|
|
|
24
24
|
* hints for component collector
|
|
25
25
|
*/
|
|
26
26
|
declare const ERComponentHint: {
|
|
27
|
+
/**
|
|
28
|
+
* Skip function component created by React.memo
|
|
29
|
+
*/
|
|
27
30
|
readonly SkipMemo: bigint;
|
|
31
|
+
/**
|
|
32
|
+
* Skip function component created by React.forwardRef
|
|
33
|
+
*/
|
|
28
34
|
readonly SkipForwardRef: bigint;
|
|
35
|
+
/**
|
|
36
|
+
* Skip function component defined in map function callback
|
|
37
|
+
*/
|
|
29
38
|
readonly SkipMapCallback: bigint;
|
|
39
|
+
/**
|
|
40
|
+
* Skip function component defined on object method
|
|
41
|
+
*/
|
|
30
42
|
readonly SkipObjectMethod: bigint;
|
|
43
|
+
/**
|
|
44
|
+
* Skip function component defined on class method
|
|
45
|
+
*/
|
|
31
46
|
readonly SkipClassMethod: bigint;
|
|
47
|
+
/**
|
|
48
|
+
* Skip function component defined on class property
|
|
49
|
+
*/
|
|
32
50
|
readonly SkipClassProperty: bigint;
|
|
33
51
|
readonly None: 0n;
|
|
34
52
|
readonly SkipUndefined: bigint;
|
|
@@ -51,8 +69,8 @@ declare const ERComponentFlag: {
|
|
|
51
69
|
PureComponent: bigint;
|
|
52
70
|
CreateElement: bigint;
|
|
53
71
|
Memo: bigint;
|
|
54
|
-
Async: bigint;
|
|
55
72
|
ForwardRef: bigint;
|
|
73
|
+
Async: bigint;
|
|
56
74
|
};
|
|
57
75
|
|
|
58
76
|
interface ERFunctionComponent extends ERSemanticNode {
|
package/dist/index.d.ts
CHANGED
|
@@ -24,11 +24,29 @@ type ERComponentHint = bigint;
|
|
|
24
24
|
* hints for component collector
|
|
25
25
|
*/
|
|
26
26
|
declare const ERComponentHint: {
|
|
27
|
+
/**
|
|
28
|
+
* Skip function component created by React.memo
|
|
29
|
+
*/
|
|
27
30
|
readonly SkipMemo: bigint;
|
|
31
|
+
/**
|
|
32
|
+
* Skip function component created by React.forwardRef
|
|
33
|
+
*/
|
|
28
34
|
readonly SkipForwardRef: bigint;
|
|
35
|
+
/**
|
|
36
|
+
* Skip function component defined in map function callback
|
|
37
|
+
*/
|
|
29
38
|
readonly SkipMapCallback: bigint;
|
|
39
|
+
/**
|
|
40
|
+
* Skip function component defined on object method
|
|
41
|
+
*/
|
|
30
42
|
readonly SkipObjectMethod: bigint;
|
|
43
|
+
/**
|
|
44
|
+
* Skip function component defined on class method
|
|
45
|
+
*/
|
|
31
46
|
readonly SkipClassMethod: bigint;
|
|
47
|
+
/**
|
|
48
|
+
* Skip function component defined on class property
|
|
49
|
+
*/
|
|
32
50
|
readonly SkipClassProperty: bigint;
|
|
33
51
|
readonly None: 0n;
|
|
34
52
|
readonly SkipUndefined: bigint;
|
|
@@ -51,8 +69,8 @@ declare const ERComponentFlag: {
|
|
|
51
69
|
PureComponent: bigint;
|
|
52
70
|
CreateElement: bigint;
|
|
53
71
|
Memo: bigint;
|
|
54
|
-
Async: bigint;
|
|
55
72
|
ForwardRef: bigint;
|
|
73
|
+
Async: bigint;
|
|
56
74
|
};
|
|
57
75
|
|
|
58
76
|
interface ERFunctionComponent extends ERSemanticNode {
|
package/dist/index.js
CHANGED
|
@@ -316,22 +316,36 @@ function useHookCollector() {
|
|
|
316
316
|
return { ctx, listeners };
|
|
317
317
|
}
|
|
318
318
|
var ERComponentHint = {
|
|
319
|
+
/**
|
|
320
|
+
* 1n << 0n - 1n << 63n are reserved for JSXValueHint
|
|
321
|
+
*/
|
|
319
322
|
...JSX3__namespace.JSXValueHint,
|
|
320
|
-
|
|
321
|
-
|
|
323
|
+
/**
|
|
324
|
+
* Skip function component created by React.memo
|
|
325
|
+
*/
|
|
322
326
|
SkipMemo: 1n << 64n,
|
|
323
|
-
|
|
327
|
+
/**
|
|
328
|
+
* Skip function component created by React.forwardRef
|
|
329
|
+
*/
|
|
324
330
|
SkipForwardRef: 1n << 65n,
|
|
325
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Skip function component defined in map function callback
|
|
333
|
+
*/
|
|
326
334
|
SkipMapCallback: 1n << 66n,
|
|
327
|
-
|
|
335
|
+
/**
|
|
336
|
+
* Skip function component defined on object method
|
|
337
|
+
*/
|
|
328
338
|
SkipObjectMethod: 1n << 67n,
|
|
329
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Skip function component defined on class method
|
|
341
|
+
*/
|
|
330
342
|
SkipClassMethod: 1n << 68n,
|
|
331
|
-
|
|
343
|
+
/**
|
|
344
|
+
* Skip function component defined on class property
|
|
345
|
+
*/
|
|
332
346
|
SkipClassProperty: 1n << 69n
|
|
333
347
|
};
|
|
334
|
-
var DEFAULT_COMPONENT_HINT = 0n | ERComponentHint.SkipBooleanLiteral | ERComponentHint.
|
|
348
|
+
var DEFAULT_COMPONENT_HINT = 0n | ERComponentHint.SkipBooleanLiteral | ERComponentHint.SkipEmptyArray | ERComponentHint.SkipMapCallback | ERComponentHint.SkipNumberLiteral | ERComponentHint.SkipStringLiteral | ERComponentHint.SkipUndefined | ERComponentHint.StrictArray | ERComponentHint.StrictConditional | ERComponentHint.StrictLogical;
|
|
335
349
|
var COMPONENT_DISPLAY_NAME_ASSIGNMENT_SELECTOR = [
|
|
336
350
|
"AssignmentExpression",
|
|
337
351
|
"[type]",
|
|
@@ -350,8 +364,8 @@ var ERComponentFlag = {
|
|
|
350
364
|
PureComponent: 1n << 0n,
|
|
351
365
|
CreateElement: 1n << 1n,
|
|
352
366
|
Memo: 1n << 2n,
|
|
353
|
-
|
|
354
|
-
|
|
367
|
+
ForwardRef: 1n << 3n,
|
|
368
|
+
Async: 1n << 4n
|
|
355
369
|
};
|
|
356
370
|
function isComponentWrapperCall(node, context) {
|
|
357
371
|
if (node.type !== types.AST_NODE_TYPES.CallExpression) {
|
package/dist/index.mjs
CHANGED
|
@@ -289,22 +289,36 @@ function useHookCollector() {
|
|
|
289
289
|
return { ctx, listeners };
|
|
290
290
|
}
|
|
291
291
|
var ERComponentHint = {
|
|
292
|
+
/**
|
|
293
|
+
* 1n << 0n - 1n << 63n are reserved for JSXValueHint
|
|
294
|
+
*/
|
|
292
295
|
...JSX3.JSXValueHint,
|
|
293
|
-
|
|
294
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Skip function component created by React.memo
|
|
298
|
+
*/
|
|
295
299
|
SkipMemo: 1n << 64n,
|
|
296
|
-
|
|
300
|
+
/**
|
|
301
|
+
* Skip function component created by React.forwardRef
|
|
302
|
+
*/
|
|
297
303
|
SkipForwardRef: 1n << 65n,
|
|
298
|
-
|
|
304
|
+
/**
|
|
305
|
+
* Skip function component defined in map function callback
|
|
306
|
+
*/
|
|
299
307
|
SkipMapCallback: 1n << 66n,
|
|
300
|
-
|
|
308
|
+
/**
|
|
309
|
+
* Skip function component defined on object method
|
|
310
|
+
*/
|
|
301
311
|
SkipObjectMethod: 1n << 67n,
|
|
302
|
-
|
|
312
|
+
/**
|
|
313
|
+
* Skip function component defined on class method
|
|
314
|
+
*/
|
|
303
315
|
SkipClassMethod: 1n << 68n,
|
|
304
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Skip function component defined on class property
|
|
318
|
+
*/
|
|
305
319
|
SkipClassProperty: 1n << 69n
|
|
306
320
|
};
|
|
307
|
-
var DEFAULT_COMPONENT_HINT = 0n | ERComponentHint.SkipBooleanLiteral | ERComponentHint.
|
|
321
|
+
var DEFAULT_COMPONENT_HINT = 0n | ERComponentHint.SkipBooleanLiteral | ERComponentHint.SkipEmptyArray | ERComponentHint.SkipMapCallback | ERComponentHint.SkipNumberLiteral | ERComponentHint.SkipStringLiteral | ERComponentHint.SkipUndefined | ERComponentHint.StrictArray | ERComponentHint.StrictConditional | ERComponentHint.StrictLogical;
|
|
308
322
|
var COMPONENT_DISPLAY_NAME_ASSIGNMENT_SELECTOR = [
|
|
309
323
|
"AssignmentExpression",
|
|
310
324
|
"[type]",
|
|
@@ -323,8 +337,8 @@ var ERComponentFlag = {
|
|
|
323
337
|
PureComponent: 1n << 0n,
|
|
324
338
|
CreateElement: 1n << 1n,
|
|
325
339
|
Memo: 1n << 2n,
|
|
326
|
-
|
|
327
|
-
|
|
340
|
+
ForwardRef: 1n << 3n,
|
|
341
|
+
Async: 1n << 4n
|
|
328
342
|
};
|
|
329
343
|
function isComponentWrapperCall(node, context) {
|
|
330
344
|
if (node.type !== AST_NODE_TYPES.CallExpression) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "1.26.3-next.
|
|
3
|
+
"version": "1.26.3-next.9",
|
|
4
4
|
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and Patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@typescript-eslint/utils": "^8.23.0",
|
|
42
42
|
"birecord": "^0.1.1",
|
|
43
43
|
"ts-pattern": "^5.6.2",
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/shared": "1.26.3-next.
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/
|
|
44
|
+
"@eslint-react/ast": "1.26.3-next.9",
|
|
45
|
+
"@eslint-react/jsx": "1.26.3-next.9",
|
|
46
|
+
"@eslint-react/shared": "1.26.3-next.9",
|
|
47
|
+
"@eslint-react/eff": "1.26.3-next.9",
|
|
48
|
+
"@eslint-react/var": "1.26.3-next.9"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"tsup": "^8.3.6",
|