@eslint-react/core 2.6.1-next.1 → 2.6.1-next.2
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.ts +50 -56
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -14,28 +14,28 @@ type ComponentDetectionHint = bigint;
|
|
|
14
14
|
*/
|
|
15
15
|
declare const ComponentDetectionHint: {
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
* Skip function component created by React.memo
|
|
18
|
+
*/
|
|
19
19
|
readonly SkipMemo: bigint;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Skip function component created by React.forwardRef
|
|
22
|
+
*/
|
|
23
23
|
readonly SkipForwardRef: bigint;
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
* Skip function component defined as array map argument
|
|
26
|
+
*/
|
|
27
27
|
readonly SkipArrayMapArgument: bigint;
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
* Skip function component defined on object method
|
|
30
|
+
*/
|
|
31
31
|
readonly SkipObjectMethod: bigint;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
* Skip function component defined on class method
|
|
34
|
+
*/
|
|
35
35
|
readonly SkipClassMethod: bigint;
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Skip function component defined on class property
|
|
38
|
+
*/
|
|
39
39
|
readonly SkipClassProperty: bigint;
|
|
40
40
|
readonly None: 0n;
|
|
41
41
|
readonly SkipUndefined: bigint;
|
|
@@ -84,17 +84,11 @@ interface SemanticNode {
|
|
|
84
84
|
//#region src/component/component-flag.d.ts
|
|
85
85
|
type ComponentFlag = bigint;
|
|
86
86
|
declare const ComponentFlag: {
|
|
87
|
-
/** No flags set */
|
|
88
|
-
|
|
89
|
-
/** Indicates the component is
|
|
90
|
-
|
|
91
|
-
/** Indicates the component
|
|
92
|
-
CreateElement: bigint;
|
|
93
|
-
/** Indicates the component is memoized (e.g., React.memo) */
|
|
94
|
-
Memo: bigint;
|
|
95
|
-
/** Indicates the component forwards a ref (e.g., React.forwardRef) */
|
|
96
|
-
ForwardRef: bigint;
|
|
97
|
-
/** Indicates the component is asynchronous */
|
|
87
|
+
/** No flags set */None: bigint; /** Indicates the component is a pure component (e.g., extends PureComponent) */
|
|
88
|
+
PureComponent: bigint; /** Indicates the component creates elements using `createElement` instead of JSX */
|
|
89
|
+
CreateElement: bigint; /** Indicates the component is memoized (e.g., React.memo) */
|
|
90
|
+
Memo: bigint; /** Indicates the component forwards a ref (e.g., React.forwardRef) */
|
|
91
|
+
ForwardRef: bigint; /** Indicates the component is asynchronous */
|
|
98
92
|
Async: bigint;
|
|
99
93
|
};
|
|
100
94
|
//#endregion
|
|
@@ -104,36 +98,36 @@ declare const ComponentFlag: {
|
|
|
104
98
|
*/
|
|
105
99
|
interface FunctionComponent extends SemanticNode {
|
|
106
100
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
* The identifier or identifier sequence of the component
|
|
102
|
+
*/
|
|
109
103
|
id: unit | TSESTree.Identifier | TSESTree.Identifier[];
|
|
110
104
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
* The kind of component
|
|
106
|
+
*/
|
|
113
107
|
kind: "function";
|
|
114
108
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
* The AST node of the function
|
|
110
|
+
*/
|
|
117
111
|
node: AST.TSESTreeFunction;
|
|
118
112
|
/**
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
* Flags describing the component's characteristics
|
|
114
|
+
*/
|
|
121
115
|
flag: ComponentFlag;
|
|
122
116
|
/**
|
|
123
|
-
|
|
124
|
-
|
|
117
|
+
* Hint for how the component was detected
|
|
118
|
+
*/
|
|
125
119
|
hint: ComponentDetectionHint;
|
|
126
120
|
/**
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
* The initialization path of the function
|
|
122
|
+
*/
|
|
129
123
|
initPath: unit | AST.FunctionInitPath;
|
|
130
124
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
* List of hook calls within the component
|
|
126
|
+
*/
|
|
133
127
|
hookCalls: TSESTree.CallExpression[];
|
|
134
128
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
129
|
+
* The display name of the component
|
|
130
|
+
*/
|
|
137
131
|
displayName: unit | TSESTree.Expression;
|
|
138
132
|
}
|
|
139
133
|
/**
|
|
@@ -141,32 +135,32 @@ interface FunctionComponent extends SemanticNode {
|
|
|
141
135
|
*/
|
|
142
136
|
interface ClassComponent extends SemanticNode {
|
|
143
137
|
/**
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
* The identifier of the component
|
|
139
|
+
*/
|
|
146
140
|
id: unit | TSESTree.Identifier;
|
|
147
141
|
/**
|
|
148
|
-
|
|
149
|
-
|
|
142
|
+
* The kind of component
|
|
143
|
+
*/
|
|
150
144
|
kind: "class";
|
|
151
145
|
/**
|
|
152
|
-
|
|
153
|
-
|
|
146
|
+
* The AST node of the class
|
|
147
|
+
*/
|
|
154
148
|
node: AST.TSESTreeClass;
|
|
155
149
|
/**
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
* Flags describing the component's characteristics
|
|
151
|
+
*/
|
|
158
152
|
flag: ComponentFlag;
|
|
159
153
|
/**
|
|
160
|
-
|
|
161
|
-
|
|
154
|
+
* Hint for how the component was detected
|
|
155
|
+
*/
|
|
162
156
|
hint: ComponentDetectionHint;
|
|
163
157
|
/**
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
* List of methods and properties in the class
|
|
159
|
+
*/
|
|
166
160
|
methods: AST.TSESTreeMethodOrProperty[];
|
|
167
161
|
/**
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
* The display name of the component
|
|
163
|
+
*/
|
|
170
164
|
displayName: unit | TSESTree.Expression;
|
|
171
165
|
}
|
|
172
166
|
/**
|
|
@@ -579,7 +573,7 @@ declare function resolveJsxAttributeValue(context: RuleContext, attribute: AST.T
|
|
|
579
573
|
readonly toStatic: () => string | number | bigint | boolean | RegExp | null;
|
|
580
574
|
} | {
|
|
581
575
|
readonly kind: "expression";
|
|
582
|
-
readonly node: TSESTree.
|
|
576
|
+
readonly node: TSESTree.Expression | TSESTree.JSXEmptyExpression;
|
|
583
577
|
readonly toStatic: () => unknown;
|
|
584
578
|
} | {
|
|
585
579
|
readonly kind: "element";
|
|
@@ -587,7 +581,7 @@ declare function resolveJsxAttributeValue(context: RuleContext, attribute: AST.T
|
|
|
587
581
|
readonly toStatic: () => undefined;
|
|
588
582
|
} | {
|
|
589
583
|
readonly kind: "spreadChild";
|
|
590
|
-
readonly node: TSESTree.
|
|
584
|
+
readonly node: TSESTree.Expression | TSESTree.JSXEmptyExpression;
|
|
591
585
|
readonly toStatic: () => undefined;
|
|
592
586
|
} | {
|
|
593
587
|
readonly kind: "spreadProps";
|
|
@@ -734,7 +728,7 @@ declare function stringifyJsx(node: TSESTree$1.JSXIdentifier | TSESTree$1.JSXNam
|
|
|
734
728
|
* @param node The starting node
|
|
735
729
|
* @returns The enclosing assignment target node, or undefined if not found
|
|
736
730
|
*/
|
|
737
|
-
declare function findEnclosingAssignmentTarget(node: TSESTree.Node): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.
|
|
731
|
+
declare function findEnclosingAssignmentTarget(node: TSESTree.Node): TSESTree.JSXElement | TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.TemplateLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldExpression | TSESTree.PrivateIdentifier | undefined;
|
|
738
732
|
/**
|
|
739
733
|
* Type representing the possible assignment targets returned by `findEnclosingAssignmentTarget`
|
|
740
734
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/core",
|
|
3
|
-
"version": "2.6.1-next.
|
|
3
|
+
"version": "2.6.1-next.2",
|
|
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": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"@typescript-eslint/utils": "^8.53.0",
|
|
36
36
|
"birecord": "^0.1.1",
|
|
37
37
|
"ts-pattern": "^5.9.0",
|
|
38
|
-
"@eslint-react/ast": "2.6.1-next.
|
|
39
|
-
"@eslint-react/
|
|
40
|
-
"@eslint-react/
|
|
41
|
-
"@eslint-react/
|
|
38
|
+
"@eslint-react/ast": "2.6.1-next.2",
|
|
39
|
+
"@eslint-react/shared": "2.6.1-next.2",
|
|
40
|
+
"@eslint-react/var": "2.6.1-next.2",
|
|
41
|
+
"@eslint-react/eff": "2.6.1-next.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"tsdown": "^0.20.0-beta.
|
|
44
|
+
"tsdown": "^0.20.0-beta.3",
|
|
45
45
|
"@local/configs": "0.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|