@eslint-react/kit 2.0.0-next.145 → 2.0.0-next.147
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/chunk-51aI8Tpl.js +33 -0
- package/dist/index.d.ts +80 -126
- package/dist/index.js +591 -514
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,565 +1,642 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { __commonJS, __export, __toESM } from "./chunk-51aI8Tpl.js";
|
|
2
|
+
import * as AST from "@eslint-react/ast";
|
|
3
|
+
import { dual, getOrElseUpdate } from "@eslint-react/eff";
|
|
4
|
+
import { z } from "zod/v4";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
//#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js
|
|
7
|
+
var require_ast_spec = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js": ((exports) => {
|
|
8
|
+
/**********************************************
|
|
9
|
+
* DO NOT MODIFY THIS FILE MANUALLY *
|
|
10
|
+
* *
|
|
11
|
+
* THIS FILE HAS BEEN COPIED FROM ast-spec. *
|
|
12
|
+
* ANY CHANGES WILL BE LOST ON THE NEXT BUILD *
|
|
13
|
+
* *
|
|
14
|
+
* MAKE CHANGES TO ast-spec AND THEN RUN *
|
|
15
|
+
* yarn build *
|
|
16
|
+
**********************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
|
|
19
|
+
var AST_NODE_TYPES;
|
|
20
|
+
(function(AST_NODE_TYPES$1) {
|
|
21
|
+
AST_NODE_TYPES$1["AccessorProperty"] = "AccessorProperty";
|
|
22
|
+
AST_NODE_TYPES$1["ArrayExpression"] = "ArrayExpression";
|
|
23
|
+
AST_NODE_TYPES$1["ArrayPattern"] = "ArrayPattern";
|
|
24
|
+
AST_NODE_TYPES$1["ArrowFunctionExpression"] = "ArrowFunctionExpression";
|
|
25
|
+
AST_NODE_TYPES$1["AssignmentExpression"] = "AssignmentExpression";
|
|
26
|
+
AST_NODE_TYPES$1["AssignmentPattern"] = "AssignmentPattern";
|
|
27
|
+
AST_NODE_TYPES$1["AwaitExpression"] = "AwaitExpression";
|
|
28
|
+
AST_NODE_TYPES$1["BinaryExpression"] = "BinaryExpression";
|
|
29
|
+
AST_NODE_TYPES$1["BlockStatement"] = "BlockStatement";
|
|
30
|
+
AST_NODE_TYPES$1["BreakStatement"] = "BreakStatement";
|
|
31
|
+
AST_NODE_TYPES$1["CallExpression"] = "CallExpression";
|
|
32
|
+
AST_NODE_TYPES$1["CatchClause"] = "CatchClause";
|
|
33
|
+
AST_NODE_TYPES$1["ChainExpression"] = "ChainExpression";
|
|
34
|
+
AST_NODE_TYPES$1["ClassBody"] = "ClassBody";
|
|
35
|
+
AST_NODE_TYPES$1["ClassDeclaration"] = "ClassDeclaration";
|
|
36
|
+
AST_NODE_TYPES$1["ClassExpression"] = "ClassExpression";
|
|
37
|
+
AST_NODE_TYPES$1["ConditionalExpression"] = "ConditionalExpression";
|
|
38
|
+
AST_NODE_TYPES$1["ContinueStatement"] = "ContinueStatement";
|
|
39
|
+
AST_NODE_TYPES$1["DebuggerStatement"] = "DebuggerStatement";
|
|
40
|
+
AST_NODE_TYPES$1["Decorator"] = "Decorator";
|
|
41
|
+
AST_NODE_TYPES$1["DoWhileStatement"] = "DoWhileStatement";
|
|
42
|
+
AST_NODE_TYPES$1["EmptyStatement"] = "EmptyStatement";
|
|
43
|
+
AST_NODE_TYPES$1["ExportAllDeclaration"] = "ExportAllDeclaration";
|
|
44
|
+
AST_NODE_TYPES$1["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
|
|
45
|
+
AST_NODE_TYPES$1["ExportNamedDeclaration"] = "ExportNamedDeclaration";
|
|
46
|
+
AST_NODE_TYPES$1["ExportSpecifier"] = "ExportSpecifier";
|
|
47
|
+
AST_NODE_TYPES$1["ExpressionStatement"] = "ExpressionStatement";
|
|
48
|
+
AST_NODE_TYPES$1["ForInStatement"] = "ForInStatement";
|
|
49
|
+
AST_NODE_TYPES$1["ForOfStatement"] = "ForOfStatement";
|
|
50
|
+
AST_NODE_TYPES$1["ForStatement"] = "ForStatement";
|
|
51
|
+
AST_NODE_TYPES$1["FunctionDeclaration"] = "FunctionDeclaration";
|
|
52
|
+
AST_NODE_TYPES$1["FunctionExpression"] = "FunctionExpression";
|
|
53
|
+
AST_NODE_TYPES$1["Identifier"] = "Identifier";
|
|
54
|
+
AST_NODE_TYPES$1["IfStatement"] = "IfStatement";
|
|
55
|
+
AST_NODE_TYPES$1["ImportAttribute"] = "ImportAttribute";
|
|
56
|
+
AST_NODE_TYPES$1["ImportDeclaration"] = "ImportDeclaration";
|
|
57
|
+
AST_NODE_TYPES$1["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
|
|
58
|
+
AST_NODE_TYPES$1["ImportExpression"] = "ImportExpression";
|
|
59
|
+
AST_NODE_TYPES$1["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
|
|
60
|
+
AST_NODE_TYPES$1["ImportSpecifier"] = "ImportSpecifier";
|
|
61
|
+
AST_NODE_TYPES$1["JSXAttribute"] = "JSXAttribute";
|
|
62
|
+
AST_NODE_TYPES$1["JSXClosingElement"] = "JSXClosingElement";
|
|
63
|
+
AST_NODE_TYPES$1["JSXClosingFragment"] = "JSXClosingFragment";
|
|
64
|
+
AST_NODE_TYPES$1["JSXElement"] = "JSXElement";
|
|
65
|
+
AST_NODE_TYPES$1["JSXEmptyExpression"] = "JSXEmptyExpression";
|
|
66
|
+
AST_NODE_TYPES$1["JSXExpressionContainer"] = "JSXExpressionContainer";
|
|
67
|
+
AST_NODE_TYPES$1["JSXFragment"] = "JSXFragment";
|
|
68
|
+
AST_NODE_TYPES$1["JSXIdentifier"] = "JSXIdentifier";
|
|
69
|
+
AST_NODE_TYPES$1["JSXMemberExpression"] = "JSXMemberExpression";
|
|
70
|
+
AST_NODE_TYPES$1["JSXNamespacedName"] = "JSXNamespacedName";
|
|
71
|
+
AST_NODE_TYPES$1["JSXOpeningElement"] = "JSXOpeningElement";
|
|
72
|
+
AST_NODE_TYPES$1["JSXOpeningFragment"] = "JSXOpeningFragment";
|
|
73
|
+
AST_NODE_TYPES$1["JSXSpreadAttribute"] = "JSXSpreadAttribute";
|
|
74
|
+
AST_NODE_TYPES$1["JSXSpreadChild"] = "JSXSpreadChild";
|
|
75
|
+
AST_NODE_TYPES$1["JSXText"] = "JSXText";
|
|
76
|
+
AST_NODE_TYPES$1["LabeledStatement"] = "LabeledStatement";
|
|
77
|
+
AST_NODE_TYPES$1["Literal"] = "Literal";
|
|
78
|
+
AST_NODE_TYPES$1["LogicalExpression"] = "LogicalExpression";
|
|
79
|
+
AST_NODE_TYPES$1["MemberExpression"] = "MemberExpression";
|
|
80
|
+
AST_NODE_TYPES$1["MetaProperty"] = "MetaProperty";
|
|
81
|
+
AST_NODE_TYPES$1["MethodDefinition"] = "MethodDefinition";
|
|
82
|
+
AST_NODE_TYPES$1["NewExpression"] = "NewExpression";
|
|
83
|
+
AST_NODE_TYPES$1["ObjectExpression"] = "ObjectExpression";
|
|
84
|
+
AST_NODE_TYPES$1["ObjectPattern"] = "ObjectPattern";
|
|
85
|
+
AST_NODE_TYPES$1["PrivateIdentifier"] = "PrivateIdentifier";
|
|
86
|
+
AST_NODE_TYPES$1["Program"] = "Program";
|
|
87
|
+
AST_NODE_TYPES$1["Property"] = "Property";
|
|
88
|
+
AST_NODE_TYPES$1["PropertyDefinition"] = "PropertyDefinition";
|
|
89
|
+
AST_NODE_TYPES$1["RestElement"] = "RestElement";
|
|
90
|
+
AST_NODE_TYPES$1["ReturnStatement"] = "ReturnStatement";
|
|
91
|
+
AST_NODE_TYPES$1["SequenceExpression"] = "SequenceExpression";
|
|
92
|
+
AST_NODE_TYPES$1["SpreadElement"] = "SpreadElement";
|
|
93
|
+
AST_NODE_TYPES$1["StaticBlock"] = "StaticBlock";
|
|
94
|
+
AST_NODE_TYPES$1["Super"] = "Super";
|
|
95
|
+
AST_NODE_TYPES$1["SwitchCase"] = "SwitchCase";
|
|
96
|
+
AST_NODE_TYPES$1["SwitchStatement"] = "SwitchStatement";
|
|
97
|
+
AST_NODE_TYPES$1["TaggedTemplateExpression"] = "TaggedTemplateExpression";
|
|
98
|
+
AST_NODE_TYPES$1["TemplateElement"] = "TemplateElement";
|
|
99
|
+
AST_NODE_TYPES$1["TemplateLiteral"] = "TemplateLiteral";
|
|
100
|
+
AST_NODE_TYPES$1["ThisExpression"] = "ThisExpression";
|
|
101
|
+
AST_NODE_TYPES$1["ThrowStatement"] = "ThrowStatement";
|
|
102
|
+
AST_NODE_TYPES$1["TryStatement"] = "TryStatement";
|
|
103
|
+
AST_NODE_TYPES$1["UnaryExpression"] = "UnaryExpression";
|
|
104
|
+
AST_NODE_TYPES$1["UpdateExpression"] = "UpdateExpression";
|
|
105
|
+
AST_NODE_TYPES$1["VariableDeclaration"] = "VariableDeclaration";
|
|
106
|
+
AST_NODE_TYPES$1["VariableDeclarator"] = "VariableDeclarator";
|
|
107
|
+
AST_NODE_TYPES$1["WhileStatement"] = "WhileStatement";
|
|
108
|
+
AST_NODE_TYPES$1["WithStatement"] = "WithStatement";
|
|
109
|
+
AST_NODE_TYPES$1["YieldExpression"] = "YieldExpression";
|
|
110
|
+
AST_NODE_TYPES$1["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
|
|
111
|
+
AST_NODE_TYPES$1["TSAbstractKeyword"] = "TSAbstractKeyword";
|
|
112
|
+
AST_NODE_TYPES$1["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
|
|
113
|
+
AST_NODE_TYPES$1["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
|
|
114
|
+
AST_NODE_TYPES$1["TSAnyKeyword"] = "TSAnyKeyword";
|
|
115
|
+
AST_NODE_TYPES$1["TSArrayType"] = "TSArrayType";
|
|
116
|
+
AST_NODE_TYPES$1["TSAsExpression"] = "TSAsExpression";
|
|
117
|
+
AST_NODE_TYPES$1["TSAsyncKeyword"] = "TSAsyncKeyword";
|
|
118
|
+
AST_NODE_TYPES$1["TSBigIntKeyword"] = "TSBigIntKeyword";
|
|
119
|
+
AST_NODE_TYPES$1["TSBooleanKeyword"] = "TSBooleanKeyword";
|
|
120
|
+
AST_NODE_TYPES$1["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
|
|
121
|
+
AST_NODE_TYPES$1["TSClassImplements"] = "TSClassImplements";
|
|
122
|
+
AST_NODE_TYPES$1["TSConditionalType"] = "TSConditionalType";
|
|
123
|
+
AST_NODE_TYPES$1["TSConstructorType"] = "TSConstructorType";
|
|
124
|
+
AST_NODE_TYPES$1["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
|
|
125
|
+
AST_NODE_TYPES$1["TSDeclareFunction"] = "TSDeclareFunction";
|
|
126
|
+
AST_NODE_TYPES$1["TSDeclareKeyword"] = "TSDeclareKeyword";
|
|
127
|
+
AST_NODE_TYPES$1["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
|
|
128
|
+
AST_NODE_TYPES$1["TSEnumBody"] = "TSEnumBody";
|
|
129
|
+
AST_NODE_TYPES$1["TSEnumDeclaration"] = "TSEnumDeclaration";
|
|
130
|
+
AST_NODE_TYPES$1["TSEnumMember"] = "TSEnumMember";
|
|
131
|
+
AST_NODE_TYPES$1["TSExportAssignment"] = "TSExportAssignment";
|
|
132
|
+
AST_NODE_TYPES$1["TSExportKeyword"] = "TSExportKeyword";
|
|
133
|
+
AST_NODE_TYPES$1["TSExternalModuleReference"] = "TSExternalModuleReference";
|
|
134
|
+
AST_NODE_TYPES$1["TSFunctionType"] = "TSFunctionType";
|
|
135
|
+
AST_NODE_TYPES$1["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
|
|
136
|
+
AST_NODE_TYPES$1["TSImportType"] = "TSImportType";
|
|
137
|
+
AST_NODE_TYPES$1["TSIndexedAccessType"] = "TSIndexedAccessType";
|
|
138
|
+
AST_NODE_TYPES$1["TSIndexSignature"] = "TSIndexSignature";
|
|
139
|
+
AST_NODE_TYPES$1["TSInferType"] = "TSInferType";
|
|
140
|
+
AST_NODE_TYPES$1["TSInstantiationExpression"] = "TSInstantiationExpression";
|
|
141
|
+
AST_NODE_TYPES$1["TSInterfaceBody"] = "TSInterfaceBody";
|
|
142
|
+
AST_NODE_TYPES$1["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
|
|
143
|
+
AST_NODE_TYPES$1["TSInterfaceHeritage"] = "TSInterfaceHeritage";
|
|
144
|
+
AST_NODE_TYPES$1["TSIntersectionType"] = "TSIntersectionType";
|
|
145
|
+
AST_NODE_TYPES$1["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
|
|
146
|
+
AST_NODE_TYPES$1["TSLiteralType"] = "TSLiteralType";
|
|
147
|
+
AST_NODE_TYPES$1["TSMappedType"] = "TSMappedType";
|
|
148
|
+
AST_NODE_TYPES$1["TSMethodSignature"] = "TSMethodSignature";
|
|
149
|
+
AST_NODE_TYPES$1["TSModuleBlock"] = "TSModuleBlock";
|
|
150
|
+
AST_NODE_TYPES$1["TSModuleDeclaration"] = "TSModuleDeclaration";
|
|
151
|
+
AST_NODE_TYPES$1["TSNamedTupleMember"] = "TSNamedTupleMember";
|
|
152
|
+
AST_NODE_TYPES$1["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
|
|
153
|
+
AST_NODE_TYPES$1["TSNeverKeyword"] = "TSNeverKeyword";
|
|
154
|
+
AST_NODE_TYPES$1["TSNonNullExpression"] = "TSNonNullExpression";
|
|
155
|
+
AST_NODE_TYPES$1["TSNullKeyword"] = "TSNullKeyword";
|
|
156
|
+
AST_NODE_TYPES$1["TSNumberKeyword"] = "TSNumberKeyword";
|
|
157
|
+
AST_NODE_TYPES$1["TSObjectKeyword"] = "TSObjectKeyword";
|
|
158
|
+
AST_NODE_TYPES$1["TSOptionalType"] = "TSOptionalType";
|
|
159
|
+
AST_NODE_TYPES$1["TSParameterProperty"] = "TSParameterProperty";
|
|
160
|
+
AST_NODE_TYPES$1["TSPrivateKeyword"] = "TSPrivateKeyword";
|
|
161
|
+
AST_NODE_TYPES$1["TSPropertySignature"] = "TSPropertySignature";
|
|
162
|
+
AST_NODE_TYPES$1["TSProtectedKeyword"] = "TSProtectedKeyword";
|
|
163
|
+
AST_NODE_TYPES$1["TSPublicKeyword"] = "TSPublicKeyword";
|
|
164
|
+
AST_NODE_TYPES$1["TSQualifiedName"] = "TSQualifiedName";
|
|
165
|
+
AST_NODE_TYPES$1["TSReadonlyKeyword"] = "TSReadonlyKeyword";
|
|
166
|
+
AST_NODE_TYPES$1["TSRestType"] = "TSRestType";
|
|
167
|
+
AST_NODE_TYPES$1["TSSatisfiesExpression"] = "TSSatisfiesExpression";
|
|
168
|
+
AST_NODE_TYPES$1["TSStaticKeyword"] = "TSStaticKeyword";
|
|
169
|
+
AST_NODE_TYPES$1["TSStringKeyword"] = "TSStringKeyword";
|
|
170
|
+
AST_NODE_TYPES$1["TSSymbolKeyword"] = "TSSymbolKeyword";
|
|
171
|
+
AST_NODE_TYPES$1["TSTemplateLiteralType"] = "TSTemplateLiteralType";
|
|
172
|
+
AST_NODE_TYPES$1["TSThisType"] = "TSThisType";
|
|
173
|
+
AST_NODE_TYPES$1["TSTupleType"] = "TSTupleType";
|
|
174
|
+
AST_NODE_TYPES$1["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
|
|
175
|
+
AST_NODE_TYPES$1["TSTypeAnnotation"] = "TSTypeAnnotation";
|
|
176
|
+
AST_NODE_TYPES$1["TSTypeAssertion"] = "TSTypeAssertion";
|
|
177
|
+
AST_NODE_TYPES$1["TSTypeLiteral"] = "TSTypeLiteral";
|
|
178
|
+
AST_NODE_TYPES$1["TSTypeOperator"] = "TSTypeOperator";
|
|
179
|
+
AST_NODE_TYPES$1["TSTypeParameter"] = "TSTypeParameter";
|
|
180
|
+
AST_NODE_TYPES$1["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
|
|
181
|
+
AST_NODE_TYPES$1["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
|
|
182
|
+
AST_NODE_TYPES$1["TSTypePredicate"] = "TSTypePredicate";
|
|
183
|
+
AST_NODE_TYPES$1["TSTypeQuery"] = "TSTypeQuery";
|
|
184
|
+
AST_NODE_TYPES$1["TSTypeReference"] = "TSTypeReference";
|
|
185
|
+
AST_NODE_TYPES$1["TSUndefinedKeyword"] = "TSUndefinedKeyword";
|
|
186
|
+
AST_NODE_TYPES$1["TSUnionType"] = "TSUnionType";
|
|
187
|
+
AST_NODE_TYPES$1["TSUnknownKeyword"] = "TSUnknownKeyword";
|
|
188
|
+
AST_NODE_TYPES$1["TSVoidKeyword"] = "TSVoidKeyword";
|
|
189
|
+
})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {}));
|
|
190
|
+
var AST_TOKEN_TYPES;
|
|
191
|
+
(function(AST_TOKEN_TYPES$1) {
|
|
192
|
+
AST_TOKEN_TYPES$1["Boolean"] = "Boolean";
|
|
193
|
+
AST_TOKEN_TYPES$1["Identifier"] = "Identifier";
|
|
194
|
+
AST_TOKEN_TYPES$1["JSXIdentifier"] = "JSXIdentifier";
|
|
195
|
+
AST_TOKEN_TYPES$1["PrivateIdentifier"] = "PrivateIdentifier";
|
|
196
|
+
AST_TOKEN_TYPES$1["JSXText"] = "JSXText";
|
|
197
|
+
AST_TOKEN_TYPES$1["Keyword"] = "Keyword";
|
|
198
|
+
AST_TOKEN_TYPES$1["Null"] = "Null";
|
|
199
|
+
AST_TOKEN_TYPES$1["Numeric"] = "Numeric";
|
|
200
|
+
AST_TOKEN_TYPES$1["Punctuator"] = "Punctuator";
|
|
201
|
+
AST_TOKEN_TYPES$1["RegularExpression"] = "RegularExpression";
|
|
202
|
+
AST_TOKEN_TYPES$1["String"] = "String";
|
|
203
|
+
AST_TOKEN_TYPES$1["Template"] = "Template";
|
|
204
|
+
AST_TOKEN_TYPES$1["Block"] = "Block";
|
|
205
|
+
AST_TOKEN_TYPES$1["Line"] = "Line";
|
|
206
|
+
})(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {}));
|
|
207
|
+
}) });
|
|
34
208
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var AST_NODE_TYPES;
|
|
41
|
-
(function(AST_NODE_TYPES2) {
|
|
42
|
-
AST_NODE_TYPES2["AccessorProperty"] = "AccessorProperty";
|
|
43
|
-
AST_NODE_TYPES2["ArrayExpression"] = "ArrayExpression";
|
|
44
|
-
AST_NODE_TYPES2["ArrayPattern"] = "ArrayPattern";
|
|
45
|
-
AST_NODE_TYPES2["ArrowFunctionExpression"] = "ArrowFunctionExpression";
|
|
46
|
-
AST_NODE_TYPES2["AssignmentExpression"] = "AssignmentExpression";
|
|
47
|
-
AST_NODE_TYPES2["AssignmentPattern"] = "AssignmentPattern";
|
|
48
|
-
AST_NODE_TYPES2["AwaitExpression"] = "AwaitExpression";
|
|
49
|
-
AST_NODE_TYPES2["BinaryExpression"] = "BinaryExpression";
|
|
50
|
-
AST_NODE_TYPES2["BlockStatement"] = "BlockStatement";
|
|
51
|
-
AST_NODE_TYPES2["BreakStatement"] = "BreakStatement";
|
|
52
|
-
AST_NODE_TYPES2["CallExpression"] = "CallExpression";
|
|
53
|
-
AST_NODE_TYPES2["CatchClause"] = "CatchClause";
|
|
54
|
-
AST_NODE_TYPES2["ChainExpression"] = "ChainExpression";
|
|
55
|
-
AST_NODE_TYPES2["ClassBody"] = "ClassBody";
|
|
56
|
-
AST_NODE_TYPES2["ClassDeclaration"] = "ClassDeclaration";
|
|
57
|
-
AST_NODE_TYPES2["ClassExpression"] = "ClassExpression";
|
|
58
|
-
AST_NODE_TYPES2["ConditionalExpression"] = "ConditionalExpression";
|
|
59
|
-
AST_NODE_TYPES2["ContinueStatement"] = "ContinueStatement";
|
|
60
|
-
AST_NODE_TYPES2["DebuggerStatement"] = "DebuggerStatement";
|
|
61
|
-
AST_NODE_TYPES2["Decorator"] = "Decorator";
|
|
62
|
-
AST_NODE_TYPES2["DoWhileStatement"] = "DoWhileStatement";
|
|
63
|
-
AST_NODE_TYPES2["EmptyStatement"] = "EmptyStatement";
|
|
64
|
-
AST_NODE_TYPES2["ExportAllDeclaration"] = "ExportAllDeclaration";
|
|
65
|
-
AST_NODE_TYPES2["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
|
|
66
|
-
AST_NODE_TYPES2["ExportNamedDeclaration"] = "ExportNamedDeclaration";
|
|
67
|
-
AST_NODE_TYPES2["ExportSpecifier"] = "ExportSpecifier";
|
|
68
|
-
AST_NODE_TYPES2["ExpressionStatement"] = "ExpressionStatement";
|
|
69
|
-
AST_NODE_TYPES2["ForInStatement"] = "ForInStatement";
|
|
70
|
-
AST_NODE_TYPES2["ForOfStatement"] = "ForOfStatement";
|
|
71
|
-
AST_NODE_TYPES2["ForStatement"] = "ForStatement";
|
|
72
|
-
AST_NODE_TYPES2["FunctionDeclaration"] = "FunctionDeclaration";
|
|
73
|
-
AST_NODE_TYPES2["FunctionExpression"] = "FunctionExpression";
|
|
74
|
-
AST_NODE_TYPES2["Identifier"] = "Identifier";
|
|
75
|
-
AST_NODE_TYPES2["IfStatement"] = "IfStatement";
|
|
76
|
-
AST_NODE_TYPES2["ImportAttribute"] = "ImportAttribute";
|
|
77
|
-
AST_NODE_TYPES2["ImportDeclaration"] = "ImportDeclaration";
|
|
78
|
-
AST_NODE_TYPES2["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
|
|
79
|
-
AST_NODE_TYPES2["ImportExpression"] = "ImportExpression";
|
|
80
|
-
AST_NODE_TYPES2["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
|
|
81
|
-
AST_NODE_TYPES2["ImportSpecifier"] = "ImportSpecifier";
|
|
82
|
-
AST_NODE_TYPES2["JSXAttribute"] = "JSXAttribute";
|
|
83
|
-
AST_NODE_TYPES2["JSXClosingElement"] = "JSXClosingElement";
|
|
84
|
-
AST_NODE_TYPES2["JSXClosingFragment"] = "JSXClosingFragment";
|
|
85
|
-
AST_NODE_TYPES2["JSXElement"] = "JSXElement";
|
|
86
|
-
AST_NODE_TYPES2["JSXEmptyExpression"] = "JSXEmptyExpression";
|
|
87
|
-
AST_NODE_TYPES2["JSXExpressionContainer"] = "JSXExpressionContainer";
|
|
88
|
-
AST_NODE_TYPES2["JSXFragment"] = "JSXFragment";
|
|
89
|
-
AST_NODE_TYPES2["JSXIdentifier"] = "JSXIdentifier";
|
|
90
|
-
AST_NODE_TYPES2["JSXMemberExpression"] = "JSXMemberExpression";
|
|
91
|
-
AST_NODE_TYPES2["JSXNamespacedName"] = "JSXNamespacedName";
|
|
92
|
-
AST_NODE_TYPES2["JSXOpeningElement"] = "JSXOpeningElement";
|
|
93
|
-
AST_NODE_TYPES2["JSXOpeningFragment"] = "JSXOpeningFragment";
|
|
94
|
-
AST_NODE_TYPES2["JSXSpreadAttribute"] = "JSXSpreadAttribute";
|
|
95
|
-
AST_NODE_TYPES2["JSXSpreadChild"] = "JSXSpreadChild";
|
|
96
|
-
AST_NODE_TYPES2["JSXText"] = "JSXText";
|
|
97
|
-
AST_NODE_TYPES2["LabeledStatement"] = "LabeledStatement";
|
|
98
|
-
AST_NODE_TYPES2["Literal"] = "Literal";
|
|
99
|
-
AST_NODE_TYPES2["LogicalExpression"] = "LogicalExpression";
|
|
100
|
-
AST_NODE_TYPES2["MemberExpression"] = "MemberExpression";
|
|
101
|
-
AST_NODE_TYPES2["MetaProperty"] = "MetaProperty";
|
|
102
|
-
AST_NODE_TYPES2["MethodDefinition"] = "MethodDefinition";
|
|
103
|
-
AST_NODE_TYPES2["NewExpression"] = "NewExpression";
|
|
104
|
-
AST_NODE_TYPES2["ObjectExpression"] = "ObjectExpression";
|
|
105
|
-
AST_NODE_TYPES2["ObjectPattern"] = "ObjectPattern";
|
|
106
|
-
AST_NODE_TYPES2["PrivateIdentifier"] = "PrivateIdentifier";
|
|
107
|
-
AST_NODE_TYPES2["Program"] = "Program";
|
|
108
|
-
AST_NODE_TYPES2["Property"] = "Property";
|
|
109
|
-
AST_NODE_TYPES2["PropertyDefinition"] = "PropertyDefinition";
|
|
110
|
-
AST_NODE_TYPES2["RestElement"] = "RestElement";
|
|
111
|
-
AST_NODE_TYPES2["ReturnStatement"] = "ReturnStatement";
|
|
112
|
-
AST_NODE_TYPES2["SequenceExpression"] = "SequenceExpression";
|
|
113
|
-
AST_NODE_TYPES2["SpreadElement"] = "SpreadElement";
|
|
114
|
-
AST_NODE_TYPES2["StaticBlock"] = "StaticBlock";
|
|
115
|
-
AST_NODE_TYPES2["Super"] = "Super";
|
|
116
|
-
AST_NODE_TYPES2["SwitchCase"] = "SwitchCase";
|
|
117
|
-
AST_NODE_TYPES2["SwitchStatement"] = "SwitchStatement";
|
|
118
|
-
AST_NODE_TYPES2["TaggedTemplateExpression"] = "TaggedTemplateExpression";
|
|
119
|
-
AST_NODE_TYPES2["TemplateElement"] = "TemplateElement";
|
|
120
|
-
AST_NODE_TYPES2["TemplateLiteral"] = "TemplateLiteral";
|
|
121
|
-
AST_NODE_TYPES2["ThisExpression"] = "ThisExpression";
|
|
122
|
-
AST_NODE_TYPES2["ThrowStatement"] = "ThrowStatement";
|
|
123
|
-
AST_NODE_TYPES2["TryStatement"] = "TryStatement";
|
|
124
|
-
AST_NODE_TYPES2["UnaryExpression"] = "UnaryExpression";
|
|
125
|
-
AST_NODE_TYPES2["UpdateExpression"] = "UpdateExpression";
|
|
126
|
-
AST_NODE_TYPES2["VariableDeclaration"] = "VariableDeclaration";
|
|
127
|
-
AST_NODE_TYPES2["VariableDeclarator"] = "VariableDeclarator";
|
|
128
|
-
AST_NODE_TYPES2["WhileStatement"] = "WhileStatement";
|
|
129
|
-
AST_NODE_TYPES2["WithStatement"] = "WithStatement";
|
|
130
|
-
AST_NODE_TYPES2["YieldExpression"] = "YieldExpression";
|
|
131
|
-
AST_NODE_TYPES2["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
|
|
132
|
-
AST_NODE_TYPES2["TSAbstractKeyword"] = "TSAbstractKeyword";
|
|
133
|
-
AST_NODE_TYPES2["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
|
|
134
|
-
AST_NODE_TYPES2["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
|
|
135
|
-
AST_NODE_TYPES2["TSAnyKeyword"] = "TSAnyKeyword";
|
|
136
|
-
AST_NODE_TYPES2["TSArrayType"] = "TSArrayType";
|
|
137
|
-
AST_NODE_TYPES2["TSAsExpression"] = "TSAsExpression";
|
|
138
|
-
AST_NODE_TYPES2["TSAsyncKeyword"] = "TSAsyncKeyword";
|
|
139
|
-
AST_NODE_TYPES2["TSBigIntKeyword"] = "TSBigIntKeyword";
|
|
140
|
-
AST_NODE_TYPES2["TSBooleanKeyword"] = "TSBooleanKeyword";
|
|
141
|
-
AST_NODE_TYPES2["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
|
|
142
|
-
AST_NODE_TYPES2["TSClassImplements"] = "TSClassImplements";
|
|
143
|
-
AST_NODE_TYPES2["TSConditionalType"] = "TSConditionalType";
|
|
144
|
-
AST_NODE_TYPES2["TSConstructorType"] = "TSConstructorType";
|
|
145
|
-
AST_NODE_TYPES2["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
|
|
146
|
-
AST_NODE_TYPES2["TSDeclareFunction"] = "TSDeclareFunction";
|
|
147
|
-
AST_NODE_TYPES2["TSDeclareKeyword"] = "TSDeclareKeyword";
|
|
148
|
-
AST_NODE_TYPES2["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
|
|
149
|
-
AST_NODE_TYPES2["TSEnumBody"] = "TSEnumBody";
|
|
150
|
-
AST_NODE_TYPES2["TSEnumDeclaration"] = "TSEnumDeclaration";
|
|
151
|
-
AST_NODE_TYPES2["TSEnumMember"] = "TSEnumMember";
|
|
152
|
-
AST_NODE_TYPES2["TSExportAssignment"] = "TSExportAssignment";
|
|
153
|
-
AST_NODE_TYPES2["TSExportKeyword"] = "TSExportKeyword";
|
|
154
|
-
AST_NODE_TYPES2["TSExternalModuleReference"] = "TSExternalModuleReference";
|
|
155
|
-
AST_NODE_TYPES2["TSFunctionType"] = "TSFunctionType";
|
|
156
|
-
AST_NODE_TYPES2["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
|
|
157
|
-
AST_NODE_TYPES2["TSImportType"] = "TSImportType";
|
|
158
|
-
AST_NODE_TYPES2["TSIndexedAccessType"] = "TSIndexedAccessType";
|
|
159
|
-
AST_NODE_TYPES2["TSIndexSignature"] = "TSIndexSignature";
|
|
160
|
-
AST_NODE_TYPES2["TSInferType"] = "TSInferType";
|
|
161
|
-
AST_NODE_TYPES2["TSInstantiationExpression"] = "TSInstantiationExpression";
|
|
162
|
-
AST_NODE_TYPES2["TSInterfaceBody"] = "TSInterfaceBody";
|
|
163
|
-
AST_NODE_TYPES2["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
|
|
164
|
-
AST_NODE_TYPES2["TSInterfaceHeritage"] = "TSInterfaceHeritage";
|
|
165
|
-
AST_NODE_TYPES2["TSIntersectionType"] = "TSIntersectionType";
|
|
166
|
-
AST_NODE_TYPES2["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
|
|
167
|
-
AST_NODE_TYPES2["TSLiteralType"] = "TSLiteralType";
|
|
168
|
-
AST_NODE_TYPES2["TSMappedType"] = "TSMappedType";
|
|
169
|
-
AST_NODE_TYPES2["TSMethodSignature"] = "TSMethodSignature";
|
|
170
|
-
AST_NODE_TYPES2["TSModuleBlock"] = "TSModuleBlock";
|
|
171
|
-
AST_NODE_TYPES2["TSModuleDeclaration"] = "TSModuleDeclaration";
|
|
172
|
-
AST_NODE_TYPES2["TSNamedTupleMember"] = "TSNamedTupleMember";
|
|
173
|
-
AST_NODE_TYPES2["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
|
|
174
|
-
AST_NODE_TYPES2["TSNeverKeyword"] = "TSNeverKeyword";
|
|
175
|
-
AST_NODE_TYPES2["TSNonNullExpression"] = "TSNonNullExpression";
|
|
176
|
-
AST_NODE_TYPES2["TSNullKeyword"] = "TSNullKeyword";
|
|
177
|
-
AST_NODE_TYPES2["TSNumberKeyword"] = "TSNumberKeyword";
|
|
178
|
-
AST_NODE_TYPES2["TSObjectKeyword"] = "TSObjectKeyword";
|
|
179
|
-
AST_NODE_TYPES2["TSOptionalType"] = "TSOptionalType";
|
|
180
|
-
AST_NODE_TYPES2["TSParameterProperty"] = "TSParameterProperty";
|
|
181
|
-
AST_NODE_TYPES2["TSPrivateKeyword"] = "TSPrivateKeyword";
|
|
182
|
-
AST_NODE_TYPES2["TSPropertySignature"] = "TSPropertySignature";
|
|
183
|
-
AST_NODE_TYPES2["TSProtectedKeyword"] = "TSProtectedKeyword";
|
|
184
|
-
AST_NODE_TYPES2["TSPublicKeyword"] = "TSPublicKeyword";
|
|
185
|
-
AST_NODE_TYPES2["TSQualifiedName"] = "TSQualifiedName";
|
|
186
|
-
AST_NODE_TYPES2["TSReadonlyKeyword"] = "TSReadonlyKeyword";
|
|
187
|
-
AST_NODE_TYPES2["TSRestType"] = "TSRestType";
|
|
188
|
-
AST_NODE_TYPES2["TSSatisfiesExpression"] = "TSSatisfiesExpression";
|
|
189
|
-
AST_NODE_TYPES2["TSStaticKeyword"] = "TSStaticKeyword";
|
|
190
|
-
AST_NODE_TYPES2["TSStringKeyword"] = "TSStringKeyword";
|
|
191
|
-
AST_NODE_TYPES2["TSSymbolKeyword"] = "TSSymbolKeyword";
|
|
192
|
-
AST_NODE_TYPES2["TSTemplateLiteralType"] = "TSTemplateLiteralType";
|
|
193
|
-
AST_NODE_TYPES2["TSThisType"] = "TSThisType";
|
|
194
|
-
AST_NODE_TYPES2["TSTupleType"] = "TSTupleType";
|
|
195
|
-
AST_NODE_TYPES2["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
|
|
196
|
-
AST_NODE_TYPES2["TSTypeAnnotation"] = "TSTypeAnnotation";
|
|
197
|
-
AST_NODE_TYPES2["TSTypeAssertion"] = "TSTypeAssertion";
|
|
198
|
-
AST_NODE_TYPES2["TSTypeLiteral"] = "TSTypeLiteral";
|
|
199
|
-
AST_NODE_TYPES2["TSTypeOperator"] = "TSTypeOperator";
|
|
200
|
-
AST_NODE_TYPES2["TSTypeParameter"] = "TSTypeParameter";
|
|
201
|
-
AST_NODE_TYPES2["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
|
|
202
|
-
AST_NODE_TYPES2["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
|
|
203
|
-
AST_NODE_TYPES2["TSTypePredicate"] = "TSTypePredicate";
|
|
204
|
-
AST_NODE_TYPES2["TSTypeQuery"] = "TSTypeQuery";
|
|
205
|
-
AST_NODE_TYPES2["TSTypeReference"] = "TSTypeReference";
|
|
206
|
-
AST_NODE_TYPES2["TSUndefinedKeyword"] = "TSUndefinedKeyword";
|
|
207
|
-
AST_NODE_TYPES2["TSUnionType"] = "TSUnionType";
|
|
208
|
-
AST_NODE_TYPES2["TSUnknownKeyword"] = "TSUnknownKeyword";
|
|
209
|
-
AST_NODE_TYPES2["TSVoidKeyword"] = "TSVoidKeyword";
|
|
210
|
-
})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {}));
|
|
211
|
-
var AST_TOKEN_TYPES;
|
|
212
|
-
(function(AST_TOKEN_TYPES2) {
|
|
213
|
-
AST_TOKEN_TYPES2["Boolean"] = "Boolean";
|
|
214
|
-
AST_TOKEN_TYPES2["Identifier"] = "Identifier";
|
|
215
|
-
AST_TOKEN_TYPES2["JSXIdentifier"] = "JSXIdentifier";
|
|
216
|
-
AST_TOKEN_TYPES2["PrivateIdentifier"] = "PrivateIdentifier";
|
|
217
|
-
AST_TOKEN_TYPES2["JSXText"] = "JSXText";
|
|
218
|
-
AST_TOKEN_TYPES2["Keyword"] = "Keyword";
|
|
219
|
-
AST_TOKEN_TYPES2["Null"] = "Null";
|
|
220
|
-
AST_TOKEN_TYPES2["Numeric"] = "Numeric";
|
|
221
|
-
AST_TOKEN_TYPES2["Punctuator"] = "Punctuator";
|
|
222
|
-
AST_TOKEN_TYPES2["RegularExpression"] = "RegularExpression";
|
|
223
|
-
AST_TOKEN_TYPES2["String"] = "String";
|
|
224
|
-
AST_TOKEN_TYPES2["Template"] = "Template";
|
|
225
|
-
AST_TOKEN_TYPES2["Block"] = "Block";
|
|
226
|
-
AST_TOKEN_TYPES2["Line"] = "Line";
|
|
227
|
-
})(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {}));
|
|
228
|
-
}
|
|
229
|
-
});
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/lib.js
|
|
211
|
+
var require_lib = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/lib.js": ((exports) => {
|
|
212
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
213
|
+
}) });
|
|
230
214
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
});
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/parser-options.js
|
|
217
|
+
var require_parser_options = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/parser-options.js": ((exports) => {
|
|
218
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
219
|
+
}) });
|
|
237
220
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/ts-estree.js
|
|
223
|
+
var require_ts_estree = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/ts-estree.js": ((exports) => {
|
|
224
|
+
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
225
|
+
if (k2 === void 0) k2 = k;
|
|
226
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
227
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
228
|
+
enumerable: true,
|
|
229
|
+
get: function() {
|
|
230
|
+
return m[k];
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
Object.defineProperty(o, k2, desc);
|
|
234
|
+
}) : (function(o, m, k, k2) {
|
|
235
|
+
if (k2 === void 0) k2 = k;
|
|
236
|
+
o[k2] = m[k];
|
|
237
|
+
}));
|
|
238
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
239
|
+
Object.defineProperty(o, "default", {
|
|
240
|
+
enumerable: true,
|
|
241
|
+
value: v
|
|
242
|
+
});
|
|
243
|
+
}) : function(o, v) {
|
|
244
|
+
o["default"] = v;
|
|
245
|
+
});
|
|
246
|
+
var __importStar = exports && exports.__importStar || (function() {
|
|
247
|
+
var ownKeys = function(o) {
|
|
248
|
+
ownKeys = Object.getOwnPropertyNames || function(o$1) {
|
|
249
|
+
var ar = [];
|
|
250
|
+
for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
|
|
251
|
+
return ar;
|
|
252
|
+
};
|
|
253
|
+
return ownKeys(o);
|
|
254
|
+
};
|
|
255
|
+
return function(mod) {
|
|
256
|
+
if (mod && mod.__esModule) return mod;
|
|
257
|
+
var result = {};
|
|
258
|
+
if (mod != null) {
|
|
259
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$1(result, mod, k[i]);
|
|
260
|
+
}
|
|
261
|
+
__setModuleDefault(result, mod);
|
|
262
|
+
return result;
|
|
263
|
+
};
|
|
264
|
+
})();
|
|
265
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
266
|
+
exports.TSESTree = void 0;
|
|
267
|
+
exports.TSESTree = __importStar(require_ast_spec());
|
|
268
|
+
}) });
|
|
244
269
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
})();
|
|
285
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
286
|
-
exports.TSESTree = void 0;
|
|
287
|
-
exports.TSESTree = __importStar(require_ast_spec());
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
// ../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/index.js
|
|
292
|
-
var require_dist = __commonJS({
|
|
293
|
-
"../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/index.js"(exports) {
|
|
294
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
295
|
-
if (k2 === void 0) k2 = k;
|
|
296
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
297
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
298
|
-
desc = { enumerable: true, get: function() {
|
|
299
|
-
return m[k];
|
|
300
|
-
} };
|
|
301
|
-
}
|
|
302
|
-
Object.defineProperty(o, k2, desc);
|
|
303
|
-
}) : (function(o, m, k, k2) {
|
|
304
|
-
if (k2 === void 0) k2 = k;
|
|
305
|
-
o[k2] = m[k];
|
|
306
|
-
}));
|
|
307
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
308
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
309
|
-
};
|
|
310
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
311
|
-
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
|
|
312
|
-
var ast_spec_1 = require_ast_spec();
|
|
313
|
-
Object.defineProperty(exports, "AST_NODE_TYPES", { enumerable: true, get: function() {
|
|
314
|
-
return ast_spec_1.AST_NODE_TYPES;
|
|
315
|
-
} });
|
|
316
|
-
Object.defineProperty(exports, "AST_TOKEN_TYPES", { enumerable: true, get: function() {
|
|
317
|
-
return ast_spec_1.AST_TOKEN_TYPES;
|
|
318
|
-
} });
|
|
319
|
-
__exportStar(require_lib(), exports);
|
|
320
|
-
__exportStar(require_parser_options(), exports);
|
|
321
|
-
__exportStar(require_ts_estree(), exports);
|
|
322
|
-
}
|
|
323
|
-
});
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/index.js
|
|
272
|
+
var require_dist = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.40.0/node_modules/@typescript-eslint/types/dist/index.js": ((exports) => {
|
|
273
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
274
|
+
if (k2 === void 0) k2 = k;
|
|
275
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
276
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
277
|
+
enumerable: true,
|
|
278
|
+
get: function() {
|
|
279
|
+
return m[k];
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
Object.defineProperty(o, k2, desc);
|
|
283
|
+
}) : (function(o, m, k, k2) {
|
|
284
|
+
if (k2 === void 0) k2 = k;
|
|
285
|
+
o[k2] = m[k];
|
|
286
|
+
}));
|
|
287
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
|
|
288
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
|
|
289
|
+
};
|
|
290
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
291
|
+
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
|
|
292
|
+
var ast_spec_1 = require_ast_spec();
|
|
293
|
+
Object.defineProperty(exports, "AST_NODE_TYPES", {
|
|
294
|
+
enumerable: true,
|
|
295
|
+
get: function() {
|
|
296
|
+
return ast_spec_1.AST_NODE_TYPES;
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
Object.defineProperty(exports, "AST_TOKEN_TYPES", {
|
|
300
|
+
enumerable: true,
|
|
301
|
+
get: function() {
|
|
302
|
+
return ast_spec_1.AST_TOKEN_TYPES;
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
__exportStar(require_lib(), exports);
|
|
306
|
+
__exportStar(require_parser_options(), exports);
|
|
307
|
+
__exportStar(require_ts_estree(), exports);
|
|
308
|
+
}) });
|
|
324
309
|
|
|
325
|
-
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/ContextDetection.ts
|
|
326
312
|
var ContextDetection_exports = {};
|
|
327
313
|
__export(ContextDetection_exports, {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
314
|
+
isProcessEnvNodeEnv: () => isProcessEnvNodeEnv,
|
|
315
|
+
isProcessEnvNodeEnvCompare: () => isProcessEnvNodeEnvCompare,
|
|
316
|
+
isViMock: () => isViMock,
|
|
317
|
+
isViMockCallback: () => isViMockCallback
|
|
332
318
|
});
|
|
333
|
-
var
|
|
319
|
+
var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
|
|
320
|
+
/**
|
|
321
|
+
* Check if the given node is a member expression that accesses `process.env.NODE_ENV`
|
|
322
|
+
* @param node The AST node
|
|
323
|
+
* @returns True if the node is a member expression that accesses `process.env.NODE_ENV`, false otherwise
|
|
324
|
+
*/
|
|
334
325
|
function isProcessEnvNodeEnv(node) {
|
|
335
|
-
|
|
326
|
+
return node != null && node.type === import_dist.AST_NODE_TYPES.MemberExpression && node.object.type === import_dist.AST_NODE_TYPES.MemberExpression && node.object.object.type === import_dist.AST_NODE_TYPES.Identifier && node.object.object.name === "process" && node.object.property.type === import_dist.AST_NODE_TYPES.Identifier && node.object.property.name === "env" && node.property.type === import_dist.AST_NODE_TYPES.Identifier && node.property.name === "NODE_ENV";
|
|
336
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* Check if the given node is a binary expression that compares `process.env.NODE_ENV` with a string literal
|
|
330
|
+
* @param node The AST node
|
|
331
|
+
* @param operator The operator used in the comparison
|
|
332
|
+
* @param value The string literal value to compare against
|
|
333
|
+
* @returns True if the node is a binary expression that compares `process.env.NODE_ENV` with the specified value, false otherwise
|
|
334
|
+
*/
|
|
337
335
|
function isProcessEnvNodeEnvCompare(node, operator, value) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
if (AST.isLiteral(node.left, "string") && isProcessEnvNodeEnv(node.right)) {
|
|
345
|
-
return node.left.value === value;
|
|
346
|
-
}
|
|
347
|
-
return false;
|
|
336
|
+
if (node == null) return false;
|
|
337
|
+
if (node.type !== import_dist.AST_NODE_TYPES.BinaryExpression) return false;
|
|
338
|
+
if (node.operator !== operator) return false;
|
|
339
|
+
if (isProcessEnvNodeEnv(node.left) && AST.isLiteral(node.right, "string")) return node.right.value === value;
|
|
340
|
+
if (AST.isLiteral(node.left, "string") && isProcessEnvNodeEnv(node.right)) return node.left.value === value;
|
|
341
|
+
return false;
|
|
348
342
|
}
|
|
343
|
+
/**
|
|
344
|
+
* Checks if the given node is a `vi.mock`.
|
|
345
|
+
* @param node The node to check
|
|
346
|
+
* @returns `true` if the node is a `vi.mock`, otherwise `false`.
|
|
347
|
+
* @internal
|
|
348
|
+
*/
|
|
349
349
|
function isViMock(node) {
|
|
350
|
-
|
|
350
|
+
return node != null && node.type === import_dist.AST_NODE_TYPES.MemberExpression && node.object.type === import_dist.AST_NODE_TYPES.Identifier && node.object.name === "vi" && node.property.type === import_dist.AST_NODE_TYPES.Identifier && node.property.name === "mock";
|
|
351
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Checks if the given node is a `vi.mock` callback.
|
|
354
|
+
* @param node The node to check
|
|
355
|
+
* @returns `true` if the node is a `vi.mock` callback, otherwise `false`.
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
352
358
|
function isViMockCallback(node) {
|
|
353
|
-
|
|
359
|
+
return node != null && AST.isFunction(node) && node.parent.type === import_dist.AST_NODE_TYPES.CallExpression && isViMock(node.parent.callee) && node.parent.arguments[1] === node;
|
|
354
360
|
}
|
|
355
361
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
__export(JsxConfig_exports, {
|
|
359
|
-
JsxEmit: () => JsxEmit,
|
|
360
|
-
getFromAnnotation: () => getFromAnnotation,
|
|
361
|
-
getFromContext: () => getFromContext,
|
|
362
|
-
make: () => make
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
// src/RegExp.ts
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/RegExp.ts
|
|
366
364
|
var RegExp_exports = {};
|
|
367
365
|
__export(RegExp_exports, {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
366
|
+
ANNOTATION_JSX: () => ANNOTATION_JSX,
|
|
367
|
+
ANNOTATION_JSX_FRAG: () => ANNOTATION_JSX_FRAG,
|
|
368
|
+
ANNOTATION_JSX_IMPORT_SOURCE: () => ANNOTATION_JSX_IMPORT_SOURCE,
|
|
369
|
+
ANNOTATION_JSX_RUNTIME: () => ANNOTATION_JSX_RUNTIME,
|
|
370
|
+
CAMEL_CASE: () => CAMEL_CASE,
|
|
371
|
+
COMPONENT_NAME: () => COMPONENT_NAME,
|
|
372
|
+
COMPONENT_NAME_LOOSE: () => COMPONENT_NAME_LOOSE,
|
|
373
|
+
CONSTANT_CASE: () => CONSTANT_CASE,
|
|
374
|
+
HOOK_NAME: () => HOOK_NAME,
|
|
375
|
+
HTML_TAG: () => HTML_TAG,
|
|
376
|
+
JAVASCRIPT_PROTOCOL: () => JAVASCRIPT_PROTOCOL,
|
|
377
|
+
JS_EXT: () => JS_EXT,
|
|
378
|
+
JS_IDENTIFIER: () => JS_IDENTIFIER,
|
|
379
|
+
KEBAB_CASE: () => KEBAB_CASE,
|
|
380
|
+
PASCAL_CASE: () => PASCAL_CASE,
|
|
381
|
+
REGEXP_STR: () => REGEXP_STR,
|
|
382
|
+
SNAKE_CASE: () => SNAKE_CASE,
|
|
383
|
+
TS_EXT: () => TS_EXT,
|
|
384
|
+
isRegExp: () => isRegExp,
|
|
385
|
+
toRegExp: () => toRegExp
|
|
388
386
|
});
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
387
|
+
/**
|
|
388
|
+
* Regular expressions for matching a HTML tag name
|
|
389
|
+
*/
|
|
390
|
+
const HTML_TAG = /^[a-z][^-]*$/u;
|
|
391
|
+
/**
|
|
392
|
+
* Regular expression for matching a TypeScript file extension.
|
|
393
|
+
*/
|
|
394
|
+
const TS_EXT = /^[cm]?tsx?$/u;
|
|
395
|
+
/**
|
|
396
|
+
* Regular expression for matching a JavaScript file extension.
|
|
397
|
+
*/
|
|
398
|
+
const JS_EXT = /^[cm]?jsx?$/u;
|
|
399
|
+
/**
|
|
400
|
+
* Regular expression for matching a PascalCase string.
|
|
401
|
+
*/
|
|
402
|
+
const PASCAL_CASE = /^[A-Z][\dA-Za-z]*$/u;
|
|
403
|
+
/**
|
|
404
|
+
* Regular expression for matching a camelCase string.
|
|
405
|
+
*/
|
|
406
|
+
const CAMEL_CASE = /^[a-z][\dA-Za-z]*$/u;
|
|
407
|
+
/**
|
|
408
|
+
* Regular expression for matching a kebab-case string.
|
|
409
|
+
*/
|
|
410
|
+
const KEBAB_CASE = /^[a-z][\d\-a-z]*$/u;
|
|
411
|
+
/**
|
|
412
|
+
* Regular expression for matching a snake_case string.
|
|
413
|
+
*/
|
|
414
|
+
const SNAKE_CASE = /^[a-z][\d_a-z]*$/u;
|
|
415
|
+
/**
|
|
416
|
+
* Regular expression for matching a CONSTANT_CASE string.
|
|
417
|
+
*/
|
|
418
|
+
const CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u;
|
|
419
|
+
const JAVASCRIPT_PROTOCOL = /^[\u0000-\u001F ]*j[\t\n\r]*a[\t\n\r]*v[\t\n\r]*a[\t\n\r]*s[\t\n\r]*c[\t\n\r]*r[\t\n\r]*i[\t\n\r]*p[\t\n\r]*t[\t\n\r]*:/iu;
|
|
420
|
+
/**
|
|
421
|
+
* Regular expression for matching a valid JavaScript identifier.
|
|
422
|
+
*/
|
|
423
|
+
const JS_IDENTIFIER = /^[_$a-z][\w$]*$/i;
|
|
424
|
+
/**
|
|
425
|
+
* Regular expression for matching a RegExp string.
|
|
426
|
+
*/
|
|
427
|
+
const REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u;
|
|
428
|
+
/**
|
|
429
|
+
* Regular expression for matching a `@jsx` annotation comment.
|
|
430
|
+
*/
|
|
431
|
+
const ANNOTATION_JSX = /@jsx\s+(\S+)/u;
|
|
432
|
+
/**
|
|
433
|
+
* Regular expression for matching a `@jsxFrag` annotation comment.
|
|
434
|
+
*/
|
|
435
|
+
const ANNOTATION_JSX_FRAG = /@jsxFrag\s+(\S+)/u;
|
|
436
|
+
/**
|
|
437
|
+
* Regular expression for matching a `@jsxRuntime` annotation comment.
|
|
438
|
+
*/
|
|
439
|
+
const ANNOTATION_JSX_RUNTIME = /@jsxRuntime\s+(\S+)/u;
|
|
440
|
+
/**
|
|
441
|
+
* Regular expression for matching a `@jsxImportSource` annotation comment.
|
|
442
|
+
*/
|
|
443
|
+
const ANNOTATION_JSX_IMPORT_SOURCE = /@jsxImportSource\s+(\S+)/u;
|
|
444
|
+
/**
|
|
445
|
+
* Regular expression for matching a React component name.
|
|
446
|
+
*/
|
|
447
|
+
const COMPONENT_NAME = /^[A-Z]/u;
|
|
448
|
+
/**
|
|
449
|
+
* Regular expression for matching a React component name (loose).
|
|
450
|
+
*/
|
|
451
|
+
const COMPONENT_NAME_LOOSE = /^_?[A-Z]/u;
|
|
452
|
+
/**
|
|
453
|
+
* Regular expression for matching a React Hook name.
|
|
454
|
+
*/
|
|
455
|
+
const HOOK_NAME = /^use/u;
|
|
456
|
+
/**
|
|
457
|
+
* Convert a string to the `RegExp`.
|
|
458
|
+
* Normal strings (e.g. `"foo"`) is converted to `/^foo$/` of `RegExp`.
|
|
459
|
+
* Strings like `"/^foo/i"` are converted to `/^foo/i` of `RegExp`.
|
|
460
|
+
* @see https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/src/utils/regexp.ts
|
|
461
|
+
* @param string The string to convert.
|
|
462
|
+
* @returns Returns the `RegExp`.
|
|
463
|
+
*/
|
|
407
464
|
function toRegExp(string) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
465
|
+
const [, pattern, flags = "u"] = REGEXP_STR.exec(string) ?? [];
|
|
466
|
+
if (pattern != null) return new RegExp(pattern, flags);
|
|
467
|
+
return { test: (s) => s === string };
|
|
411
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* Checks whether given string is regexp string
|
|
471
|
+
* @param string The string to check
|
|
472
|
+
* @returns boolean
|
|
473
|
+
*/
|
|
412
474
|
function isRegExp(string) {
|
|
413
|
-
|
|
475
|
+
return REGEXP_STR.test(string);
|
|
414
476
|
}
|
|
415
477
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/JsxConfig/JsxConfig.ts
|
|
480
|
+
const JsxEmit = {
|
|
481
|
+
None: 0,
|
|
482
|
+
Preserve: 1,
|
|
483
|
+
React: 2,
|
|
484
|
+
ReactNative: 3,
|
|
485
|
+
ReactJSX: 4,
|
|
486
|
+
ReactJSXDev: 5
|
|
424
487
|
};
|
|
425
|
-
|
|
426
|
-
|
|
488
|
+
/**
|
|
489
|
+
* Create a JsxConfig object
|
|
490
|
+
* @returns JsxConfig
|
|
491
|
+
*/
|
|
492
|
+
function make$2() {
|
|
493
|
+
return {};
|
|
427
494
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
495
|
+
/**
|
|
496
|
+
* Get JsxConfig from RuleContext
|
|
497
|
+
* @param context The RuleContext
|
|
498
|
+
* @returns JsxConfig
|
|
499
|
+
*/
|
|
500
|
+
function getFromContext$1(context) {
|
|
501
|
+
const options = context.sourceCode.parserServices?.program?.getCompilerOptions() ?? {};
|
|
502
|
+
return {
|
|
503
|
+
jsx: options.jsx ?? JsxEmit.ReactJSX,
|
|
504
|
+
jsxFactory: options.jsxFactory ?? "React.createElement",
|
|
505
|
+
jsxFragmentFactory: options.jsxFragmentFactory ?? "React.Fragment",
|
|
506
|
+
jsxImportSource: options.jsxImportSource ?? "react",
|
|
507
|
+
reactNamespace: options.reactNamespace ?? "React"
|
|
508
|
+
};
|
|
437
509
|
}
|
|
438
|
-
|
|
510
|
+
const cache = /* @__PURE__ */ new WeakMap();
|
|
511
|
+
/**
|
|
512
|
+
* Get JsxConfig from annotation
|
|
513
|
+
* @param context The RuleContext
|
|
514
|
+
* @returns JsxConfig
|
|
515
|
+
*/
|
|
439
516
|
function getFromAnnotation(context) {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
if (jsxImportSource != null) options.jsxImportSource = jsxImportSource;
|
|
458
|
-
return options;
|
|
459
|
-
}
|
|
460
|
-
);
|
|
517
|
+
return getOrElseUpdate(cache, context.sourceCode, () => {
|
|
518
|
+
const options = make$2();
|
|
519
|
+
if (!context.sourceCode.text.includes("@jsx")) return options;
|
|
520
|
+
let jsx, jsxFrag, jsxRuntime, jsxImportSource;
|
|
521
|
+
for (const comment of context.sourceCode.getAllComments().reverse()) {
|
|
522
|
+
const value = comment.value;
|
|
523
|
+
jsx ??= value.match(ANNOTATION_JSX)?.[1];
|
|
524
|
+
jsxFrag ??= value.match(ANNOTATION_JSX_FRAG)?.[1];
|
|
525
|
+
jsxRuntime ??= value.match(ANNOTATION_JSX_RUNTIME)?.[1];
|
|
526
|
+
jsxImportSource ??= value.match(ANNOTATION_JSX_IMPORT_SOURCE)?.[1];
|
|
527
|
+
}
|
|
528
|
+
if (jsx != null) options.jsxFactory = jsx;
|
|
529
|
+
if (jsxFrag != null) options.jsxFragmentFactory = jsxFrag;
|
|
530
|
+
if (jsxRuntime != null) options.jsx = jsxRuntime === "classic" ? JsxEmit.React : JsxEmit.ReactJSX;
|
|
531
|
+
if (jsxImportSource != null) options.jsxImportSource = jsxImportSource;
|
|
532
|
+
return options;
|
|
533
|
+
});
|
|
461
534
|
}
|
|
462
535
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/JsxConfig/index.ts
|
|
538
|
+
var JsxConfig_exports = {};
|
|
539
|
+
__export(JsxConfig_exports, {
|
|
540
|
+
JsxEmit: () => JsxEmit,
|
|
541
|
+
getFromAnnotation: () => getFromAnnotation,
|
|
542
|
+
getFromContext: () => getFromContext$1,
|
|
543
|
+
make: () => make$2
|
|
470
544
|
});
|
|
471
545
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/LanguagePreference/LanguagePreference.ts
|
|
548
|
+
/**
|
|
549
|
+
* Get a copy of the default LanguagePreference.
|
|
550
|
+
*/
|
|
551
|
+
function make$1() {
|
|
552
|
+
return {
|
|
553
|
+
indentStyle: "space",
|
|
554
|
+
indentWidth: 2,
|
|
555
|
+
jsxQuoteStyle: "double",
|
|
556
|
+
quoteStyle: "single",
|
|
557
|
+
semicolons: "always",
|
|
558
|
+
trailingCommas: "all"
|
|
559
|
+
};
|
|
482
560
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
561
|
+
/**
|
|
562
|
+
* A default LanguagePreference object.
|
|
563
|
+
*/
|
|
564
|
+
const defaultLanguagePreference = make$1();
|
|
565
|
+
function getFromContext() {
|
|
566
|
+
throw new Error("getFromContext is not implemented");
|
|
486
567
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
z.literal("asNeeded")
|
|
505
|
-
])
|
|
506
|
-
),
|
|
507
|
-
trailingCommas: z.optional(
|
|
508
|
-
z.union([
|
|
509
|
-
z.literal("all"),
|
|
510
|
-
z.literal("es5"),
|
|
511
|
-
z.literal("none")
|
|
512
|
-
])
|
|
513
|
-
),
|
|
514
|
-
// JSX specific options
|
|
515
|
-
jsxQuoteStyle: z.optional(
|
|
516
|
-
z.union([
|
|
517
|
-
z.literal("single"),
|
|
518
|
-
z.literal("double")
|
|
519
|
-
])
|
|
520
|
-
)
|
|
568
|
+
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/LanguagePreference/LanguagePreferenceSchema.ts
|
|
571
|
+
/**
|
|
572
|
+
* @internal
|
|
573
|
+
*/
|
|
574
|
+
const LanguagePreferenceSchema = z.object({
|
|
575
|
+
indentStyle: z.optional(z.union([z.literal("tab"), z.literal("space")])),
|
|
576
|
+
indentWidth: z.optional(z.number()),
|
|
577
|
+
quoteStyle: z.optional(z.union([z.literal("single"), z.literal("double")])),
|
|
578
|
+
semicolons: z.optional(z.union([z.literal("always"), z.literal("asNeeded")])),
|
|
579
|
+
trailingCommas: z.optional(z.union([
|
|
580
|
+
z.literal("all"),
|
|
581
|
+
z.literal("es5"),
|
|
582
|
+
z.literal("none")
|
|
583
|
+
])),
|
|
584
|
+
jsxQuoteStyle: z.optional(z.union([z.literal("single"), z.literal("double")]))
|
|
521
585
|
}, {});
|
|
522
586
|
|
|
523
|
-
|
|
587
|
+
//#endregion
|
|
588
|
+
//#region src/LanguagePreference/index.ts
|
|
589
|
+
var LanguagePreference_exports = {};
|
|
590
|
+
__export(LanguagePreference_exports, {
|
|
591
|
+
LanguagePreferenceSchema: () => LanguagePreferenceSchema,
|
|
592
|
+
defaultLanguagePreference: () => defaultLanguagePreference,
|
|
593
|
+
getFromContext: () => getFromContext,
|
|
594
|
+
make: () => make$1
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region src/Reporter.ts
|
|
524
599
|
var Reporter_exports = {};
|
|
525
600
|
__export(Reporter_exports, {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
601
|
+
make: () => make,
|
|
602
|
+
send: () => send,
|
|
603
|
+
sendOrElse: () => sendOrElse
|
|
529
604
|
});
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
605
|
+
const send = dual(2, (context, descriptor) => {
|
|
606
|
+
if (descriptor == null) return;
|
|
607
|
+
return context.report(descriptor);
|
|
533
608
|
});
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
609
|
+
const sendOrElse = dual(3, (context, descriptor, cb) => {
|
|
610
|
+
if (descriptor == null) return cb();
|
|
611
|
+
return context.report(descriptor);
|
|
537
612
|
});
|
|
538
|
-
function
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
613
|
+
function make(context) {
|
|
614
|
+
return {
|
|
615
|
+
send: (...args) => send(context, ...args),
|
|
616
|
+
sendOrElse: (...args) => sendOrElse(context, ...args)
|
|
617
|
+
};
|
|
543
618
|
}
|
|
544
619
|
|
|
545
|
-
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region src/Selector.ts
|
|
546
622
|
var Selector_exports = {};
|
|
547
623
|
__export(Selector_exports, {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
624
|
+
DISPLAY_NAME_ASSIGNMENT_EXPRESSION: () => DISPLAY_NAME_ASSIGNMENT_EXPRESSION,
|
|
625
|
+
IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION: () => IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION,
|
|
626
|
+
OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR: () => OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR
|
|
551
627
|
});
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
628
|
+
const IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION = "ArrowFunctionExpression[body.type!='BlockStatement']";
|
|
629
|
+
const OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR = [
|
|
630
|
+
"VariableDeclarator",
|
|
631
|
+
"[id.type='ObjectPattern']",
|
|
632
|
+
"[init.type='Identifier']"
|
|
557
633
|
].join("");
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
634
|
+
const DISPLAY_NAME_ASSIGNMENT_EXPRESSION = [
|
|
635
|
+
"AssignmentExpression",
|
|
636
|
+
"[operator='=']",
|
|
637
|
+
"[left.type='MemberExpression']",
|
|
638
|
+
"[left.property.name='displayName']"
|
|
563
639
|
].join("");
|
|
564
640
|
|
|
565
|
-
|
|
641
|
+
//#endregion
|
|
642
|
+
export { ContextDetection_exports as ContextDetection, JsxConfig_exports as JsxConfig, LanguagePreference_exports as LanguagePreference, RegExp_exports as RegExp, Reporter_exports as Reporter, Selector_exports as Selector };
|