@eslint-react/kit 2.0.0-next.187 → 2.0.0-next.188

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 CHANGED
@@ -1,61 +1,7 @@
1
1
  import { unit } from "@eslint-react/eff";
2
- import { TSESTree } from "@typescript-eslint/types";
3
- import { TSESTree as TSESTree$1 } from "@typescript-eslint/utils";
4
2
  import * as tseslint from "@typescript-eslint/utils/ts-eslint";
5
3
  import { ReportDescriptor } from "@typescript-eslint/utils/ts-eslint";
6
4
 
7
- //#region src/ast/env-checks.d.ts
8
- /**
9
- * Check if the given node is a member expression that accesses `process.env.NODE_ENV`
10
- * @param node The AST node
11
- * @returns True if the node is a member expression that accesses `process.env.NODE_ENV`, false otherwise
12
- */
13
- declare function isProcessEnvNodeEnv(node: TSESTree.Node | null | unit): node is TSESTree.MemberExpression;
14
- /**
15
- * Check if the given node is a binary expression that compares `process.env.NODE_ENV` with a string literal.
16
- * @param node The AST node
17
- * @param operator The operator used in the comparison
18
- * @param value The string literal value to compare against
19
- * @returns True if the node is a binary expression that compares `process.env.NODE_ENV` with the specified value, false otherwise
20
- */
21
- declare function isProcessEnvNodeEnvCompare(node: TSESTree.Node | null | unit, operator: "===" | "!==", value: "development" | "production"): node is TSESTree.BinaryExpression;
22
- /**
23
- * Checks if the given node is a `vi.mock`.
24
- * @param node The node to check
25
- * @returns `true` if the node is a `vi.mock`, otherwise `false`.
26
- * @internal
27
- */
28
- declare function isViMock(node: TSESTree.Node | null | unit): node is TSESTree.MemberExpression;
29
- /**
30
- * Checks if the given node is a `vi.mock` callback.
31
- * @param node The node to check
32
- * @returns `true` if the node is a `vi.mock` callback, otherwise `false`.
33
- * @internal
34
- */
35
- declare function isViMockCallback(node: TSESTree.Node | null | unit): boolean;
36
- //#endregion
37
- //#region src/ast/selectors.d.ts
38
- type ImplicitReturnArrowFunctionExpression = TSESTree$1.ArrowFunctionExpression & {
39
- body: TSESTree$1.Expression;
40
- };
41
- type ObjectDestructuringVariableDeclarator = TSESTree$1.VariableDeclarator & {
42
- id: TSESTree$1.ObjectPattern;
43
- init: TSESTree$1.Identifier;
44
- };
45
- type DisplayNameAssignmentExpression = TSESTree$1.AssignmentExpression & {
46
- type: "AssignmentExpression";
47
- left: TSESTree$1.MemberExpression & {
48
- property: TSESTree$1.Identifier & {
49
- name: "displayName";
50
- };
51
- };
52
- operator: "=";
53
- right: TSESTree$1.Literal;
54
- };
55
- declare const SEL_IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION = "ArrowFunctionExpression[body.type!='BlockStatement']";
56
- declare const SEL_OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR: string;
57
- declare const SEL_DISPLAY_NAME_ASSIGNMENT_EXPRESSION: string;
58
- //#endregion
59
5
  //#region src/constants.d.ts
60
6
  /**
61
7
  * Regular expressions for matching a HTML tag name
@@ -212,4 +158,4 @@ declare function isRegExp(string: string): boolean;
212
158
  //#region src/utils/reporting.d.ts
213
159
  declare function report(context: RuleContext): (descriptor: unit | null | ReportDescriptor<string>) => void;
214
160
  //#endregion
215
- export { CompatibleConfig, CompatiblePlugin, CompatibleRule, DisplayNameAssignmentExpression, ImplicitReturnArrowFunctionExpression, ObjectDestructuringVariableDeclarator, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, RuleConfig, RuleContext, RuleFeature, RulePolicy, RuleSuggest, SEL_DISPLAY_NAME_ASSIGNMENT_EXPRESSION, SEL_IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION, SEL_OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR, SettingsConfig, Severity, SeverityLevel, SeverityName, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isRegExp, isViMock, isViMockCallback, report, toRegExp };
161
+ export { CompatibleConfig, CompatiblePlugin, CompatibleRule, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, RuleConfig, RuleContext, RuleFeature, RulePolicy, RuleSuggest, SettingsConfig, Severity, SeverityLevel, SeverityName, isRegExp, report, toRegExp };
package/dist/index.js CHANGED
@@ -1,395 +1,5 @@
1
- import * as AST from "@eslint-react/ast";
2
1
  import "@eslint-react/eff";
3
2
 
4
- //#region rolldown:runtime
5
- var __create = Object.create;
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
- var __getOwnPropNames = Object.getOwnPropertyNames;
9
- var __getProtoOf = Object.getPrototypeOf;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __commonJS = (cb, mod) => function() {
12
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
16
- key = keys[i];
17
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: ((k) => from[k]).bind(null, key),
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
- value: mod,
26
- enumerable: true
27
- }) : target, mod));
28
-
29
- //#endregion
30
- //#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js
31
- var require_ast_spec = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js": ((exports) => {
32
- /**********************************************
33
- * DO NOT MODIFY THIS FILE MANUALLY *
34
- * *
35
- * THIS FILE HAS BEEN COPIED FROM ast-spec. *
36
- * ANY CHANGES WILL BE LOST ON THE NEXT BUILD *
37
- * *
38
- * MAKE CHANGES TO ast-spec AND THEN RUN *
39
- * yarn build *
40
- **********************************************/
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- var AST_NODE_TYPES;
43
- (function(AST_NODE_TYPES$1) {
44
- AST_NODE_TYPES$1["AccessorProperty"] = "AccessorProperty";
45
- AST_NODE_TYPES$1["ArrayExpression"] = "ArrayExpression";
46
- AST_NODE_TYPES$1["ArrayPattern"] = "ArrayPattern";
47
- AST_NODE_TYPES$1["ArrowFunctionExpression"] = "ArrowFunctionExpression";
48
- AST_NODE_TYPES$1["AssignmentExpression"] = "AssignmentExpression";
49
- AST_NODE_TYPES$1["AssignmentPattern"] = "AssignmentPattern";
50
- AST_NODE_TYPES$1["AwaitExpression"] = "AwaitExpression";
51
- AST_NODE_TYPES$1["BinaryExpression"] = "BinaryExpression";
52
- AST_NODE_TYPES$1["BlockStatement"] = "BlockStatement";
53
- AST_NODE_TYPES$1["BreakStatement"] = "BreakStatement";
54
- AST_NODE_TYPES$1["CallExpression"] = "CallExpression";
55
- AST_NODE_TYPES$1["CatchClause"] = "CatchClause";
56
- AST_NODE_TYPES$1["ChainExpression"] = "ChainExpression";
57
- AST_NODE_TYPES$1["ClassBody"] = "ClassBody";
58
- AST_NODE_TYPES$1["ClassDeclaration"] = "ClassDeclaration";
59
- AST_NODE_TYPES$1["ClassExpression"] = "ClassExpression";
60
- AST_NODE_TYPES$1["ConditionalExpression"] = "ConditionalExpression";
61
- AST_NODE_TYPES$1["ContinueStatement"] = "ContinueStatement";
62
- AST_NODE_TYPES$1["DebuggerStatement"] = "DebuggerStatement";
63
- AST_NODE_TYPES$1["Decorator"] = "Decorator";
64
- AST_NODE_TYPES$1["DoWhileStatement"] = "DoWhileStatement";
65
- AST_NODE_TYPES$1["EmptyStatement"] = "EmptyStatement";
66
- AST_NODE_TYPES$1["ExportAllDeclaration"] = "ExportAllDeclaration";
67
- AST_NODE_TYPES$1["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
68
- AST_NODE_TYPES$1["ExportNamedDeclaration"] = "ExportNamedDeclaration";
69
- AST_NODE_TYPES$1["ExportSpecifier"] = "ExportSpecifier";
70
- AST_NODE_TYPES$1["ExpressionStatement"] = "ExpressionStatement";
71
- AST_NODE_TYPES$1["ForInStatement"] = "ForInStatement";
72
- AST_NODE_TYPES$1["ForOfStatement"] = "ForOfStatement";
73
- AST_NODE_TYPES$1["ForStatement"] = "ForStatement";
74
- AST_NODE_TYPES$1["FunctionDeclaration"] = "FunctionDeclaration";
75
- AST_NODE_TYPES$1["FunctionExpression"] = "FunctionExpression";
76
- AST_NODE_TYPES$1["Identifier"] = "Identifier";
77
- AST_NODE_TYPES$1["IfStatement"] = "IfStatement";
78
- AST_NODE_TYPES$1["ImportAttribute"] = "ImportAttribute";
79
- AST_NODE_TYPES$1["ImportDeclaration"] = "ImportDeclaration";
80
- AST_NODE_TYPES$1["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
81
- AST_NODE_TYPES$1["ImportExpression"] = "ImportExpression";
82
- AST_NODE_TYPES$1["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
83
- AST_NODE_TYPES$1["ImportSpecifier"] = "ImportSpecifier";
84
- AST_NODE_TYPES$1["JSXAttribute"] = "JSXAttribute";
85
- AST_NODE_TYPES$1["JSXClosingElement"] = "JSXClosingElement";
86
- AST_NODE_TYPES$1["JSXClosingFragment"] = "JSXClosingFragment";
87
- AST_NODE_TYPES$1["JSXElement"] = "JSXElement";
88
- AST_NODE_TYPES$1["JSXEmptyExpression"] = "JSXEmptyExpression";
89
- AST_NODE_TYPES$1["JSXExpressionContainer"] = "JSXExpressionContainer";
90
- AST_NODE_TYPES$1["JSXFragment"] = "JSXFragment";
91
- AST_NODE_TYPES$1["JSXIdentifier"] = "JSXIdentifier";
92
- AST_NODE_TYPES$1["JSXMemberExpression"] = "JSXMemberExpression";
93
- AST_NODE_TYPES$1["JSXNamespacedName"] = "JSXNamespacedName";
94
- AST_NODE_TYPES$1["JSXOpeningElement"] = "JSXOpeningElement";
95
- AST_NODE_TYPES$1["JSXOpeningFragment"] = "JSXOpeningFragment";
96
- AST_NODE_TYPES$1["JSXSpreadAttribute"] = "JSXSpreadAttribute";
97
- AST_NODE_TYPES$1["JSXSpreadChild"] = "JSXSpreadChild";
98
- AST_NODE_TYPES$1["JSXText"] = "JSXText";
99
- AST_NODE_TYPES$1["LabeledStatement"] = "LabeledStatement";
100
- AST_NODE_TYPES$1["Literal"] = "Literal";
101
- AST_NODE_TYPES$1["LogicalExpression"] = "LogicalExpression";
102
- AST_NODE_TYPES$1["MemberExpression"] = "MemberExpression";
103
- AST_NODE_TYPES$1["MetaProperty"] = "MetaProperty";
104
- AST_NODE_TYPES$1["MethodDefinition"] = "MethodDefinition";
105
- AST_NODE_TYPES$1["NewExpression"] = "NewExpression";
106
- AST_NODE_TYPES$1["ObjectExpression"] = "ObjectExpression";
107
- AST_NODE_TYPES$1["ObjectPattern"] = "ObjectPattern";
108
- AST_NODE_TYPES$1["PrivateIdentifier"] = "PrivateIdentifier";
109
- AST_NODE_TYPES$1["Program"] = "Program";
110
- AST_NODE_TYPES$1["Property"] = "Property";
111
- AST_NODE_TYPES$1["PropertyDefinition"] = "PropertyDefinition";
112
- AST_NODE_TYPES$1["RestElement"] = "RestElement";
113
- AST_NODE_TYPES$1["ReturnStatement"] = "ReturnStatement";
114
- AST_NODE_TYPES$1["SequenceExpression"] = "SequenceExpression";
115
- AST_NODE_TYPES$1["SpreadElement"] = "SpreadElement";
116
- AST_NODE_TYPES$1["StaticBlock"] = "StaticBlock";
117
- AST_NODE_TYPES$1["Super"] = "Super";
118
- AST_NODE_TYPES$1["SwitchCase"] = "SwitchCase";
119
- AST_NODE_TYPES$1["SwitchStatement"] = "SwitchStatement";
120
- AST_NODE_TYPES$1["TaggedTemplateExpression"] = "TaggedTemplateExpression";
121
- AST_NODE_TYPES$1["TemplateElement"] = "TemplateElement";
122
- AST_NODE_TYPES$1["TemplateLiteral"] = "TemplateLiteral";
123
- AST_NODE_TYPES$1["ThisExpression"] = "ThisExpression";
124
- AST_NODE_TYPES$1["ThrowStatement"] = "ThrowStatement";
125
- AST_NODE_TYPES$1["TryStatement"] = "TryStatement";
126
- AST_NODE_TYPES$1["UnaryExpression"] = "UnaryExpression";
127
- AST_NODE_TYPES$1["UpdateExpression"] = "UpdateExpression";
128
- AST_NODE_TYPES$1["VariableDeclaration"] = "VariableDeclaration";
129
- AST_NODE_TYPES$1["VariableDeclarator"] = "VariableDeclarator";
130
- AST_NODE_TYPES$1["WhileStatement"] = "WhileStatement";
131
- AST_NODE_TYPES$1["WithStatement"] = "WithStatement";
132
- AST_NODE_TYPES$1["YieldExpression"] = "YieldExpression";
133
- AST_NODE_TYPES$1["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
134
- AST_NODE_TYPES$1["TSAbstractKeyword"] = "TSAbstractKeyword";
135
- AST_NODE_TYPES$1["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
136
- AST_NODE_TYPES$1["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
137
- AST_NODE_TYPES$1["TSAnyKeyword"] = "TSAnyKeyword";
138
- AST_NODE_TYPES$1["TSArrayType"] = "TSArrayType";
139
- AST_NODE_TYPES$1["TSAsExpression"] = "TSAsExpression";
140
- AST_NODE_TYPES$1["TSAsyncKeyword"] = "TSAsyncKeyword";
141
- AST_NODE_TYPES$1["TSBigIntKeyword"] = "TSBigIntKeyword";
142
- AST_NODE_TYPES$1["TSBooleanKeyword"] = "TSBooleanKeyword";
143
- AST_NODE_TYPES$1["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
144
- AST_NODE_TYPES$1["TSClassImplements"] = "TSClassImplements";
145
- AST_NODE_TYPES$1["TSConditionalType"] = "TSConditionalType";
146
- AST_NODE_TYPES$1["TSConstructorType"] = "TSConstructorType";
147
- AST_NODE_TYPES$1["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
148
- AST_NODE_TYPES$1["TSDeclareFunction"] = "TSDeclareFunction";
149
- AST_NODE_TYPES$1["TSDeclareKeyword"] = "TSDeclareKeyword";
150
- AST_NODE_TYPES$1["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
151
- AST_NODE_TYPES$1["TSEnumBody"] = "TSEnumBody";
152
- AST_NODE_TYPES$1["TSEnumDeclaration"] = "TSEnumDeclaration";
153
- AST_NODE_TYPES$1["TSEnumMember"] = "TSEnumMember";
154
- AST_NODE_TYPES$1["TSExportAssignment"] = "TSExportAssignment";
155
- AST_NODE_TYPES$1["TSExportKeyword"] = "TSExportKeyword";
156
- AST_NODE_TYPES$1["TSExternalModuleReference"] = "TSExternalModuleReference";
157
- AST_NODE_TYPES$1["TSFunctionType"] = "TSFunctionType";
158
- AST_NODE_TYPES$1["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
159
- AST_NODE_TYPES$1["TSImportType"] = "TSImportType";
160
- AST_NODE_TYPES$1["TSIndexedAccessType"] = "TSIndexedAccessType";
161
- AST_NODE_TYPES$1["TSIndexSignature"] = "TSIndexSignature";
162
- AST_NODE_TYPES$1["TSInferType"] = "TSInferType";
163
- AST_NODE_TYPES$1["TSInstantiationExpression"] = "TSInstantiationExpression";
164
- AST_NODE_TYPES$1["TSInterfaceBody"] = "TSInterfaceBody";
165
- AST_NODE_TYPES$1["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
166
- AST_NODE_TYPES$1["TSInterfaceHeritage"] = "TSInterfaceHeritage";
167
- AST_NODE_TYPES$1["TSIntersectionType"] = "TSIntersectionType";
168
- AST_NODE_TYPES$1["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
169
- AST_NODE_TYPES$1["TSLiteralType"] = "TSLiteralType";
170
- AST_NODE_TYPES$1["TSMappedType"] = "TSMappedType";
171
- AST_NODE_TYPES$1["TSMethodSignature"] = "TSMethodSignature";
172
- AST_NODE_TYPES$1["TSModuleBlock"] = "TSModuleBlock";
173
- AST_NODE_TYPES$1["TSModuleDeclaration"] = "TSModuleDeclaration";
174
- AST_NODE_TYPES$1["TSNamedTupleMember"] = "TSNamedTupleMember";
175
- AST_NODE_TYPES$1["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
176
- AST_NODE_TYPES$1["TSNeverKeyword"] = "TSNeverKeyword";
177
- AST_NODE_TYPES$1["TSNonNullExpression"] = "TSNonNullExpression";
178
- AST_NODE_TYPES$1["TSNullKeyword"] = "TSNullKeyword";
179
- AST_NODE_TYPES$1["TSNumberKeyword"] = "TSNumberKeyword";
180
- AST_NODE_TYPES$1["TSObjectKeyword"] = "TSObjectKeyword";
181
- AST_NODE_TYPES$1["TSOptionalType"] = "TSOptionalType";
182
- AST_NODE_TYPES$1["TSParameterProperty"] = "TSParameterProperty";
183
- AST_NODE_TYPES$1["TSPrivateKeyword"] = "TSPrivateKeyword";
184
- AST_NODE_TYPES$1["TSPropertySignature"] = "TSPropertySignature";
185
- AST_NODE_TYPES$1["TSProtectedKeyword"] = "TSProtectedKeyword";
186
- AST_NODE_TYPES$1["TSPublicKeyword"] = "TSPublicKeyword";
187
- AST_NODE_TYPES$1["TSQualifiedName"] = "TSQualifiedName";
188
- AST_NODE_TYPES$1["TSReadonlyKeyword"] = "TSReadonlyKeyword";
189
- AST_NODE_TYPES$1["TSRestType"] = "TSRestType";
190
- AST_NODE_TYPES$1["TSSatisfiesExpression"] = "TSSatisfiesExpression";
191
- AST_NODE_TYPES$1["TSStaticKeyword"] = "TSStaticKeyword";
192
- AST_NODE_TYPES$1["TSStringKeyword"] = "TSStringKeyword";
193
- AST_NODE_TYPES$1["TSSymbolKeyword"] = "TSSymbolKeyword";
194
- AST_NODE_TYPES$1["TSTemplateLiteralType"] = "TSTemplateLiteralType";
195
- AST_NODE_TYPES$1["TSThisType"] = "TSThisType";
196
- AST_NODE_TYPES$1["TSTupleType"] = "TSTupleType";
197
- AST_NODE_TYPES$1["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
198
- AST_NODE_TYPES$1["TSTypeAnnotation"] = "TSTypeAnnotation";
199
- AST_NODE_TYPES$1["TSTypeAssertion"] = "TSTypeAssertion";
200
- AST_NODE_TYPES$1["TSTypeLiteral"] = "TSTypeLiteral";
201
- AST_NODE_TYPES$1["TSTypeOperator"] = "TSTypeOperator";
202
- AST_NODE_TYPES$1["TSTypeParameter"] = "TSTypeParameter";
203
- AST_NODE_TYPES$1["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
204
- AST_NODE_TYPES$1["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
205
- AST_NODE_TYPES$1["TSTypePredicate"] = "TSTypePredicate";
206
- AST_NODE_TYPES$1["TSTypeQuery"] = "TSTypeQuery";
207
- AST_NODE_TYPES$1["TSTypeReference"] = "TSTypeReference";
208
- AST_NODE_TYPES$1["TSUndefinedKeyword"] = "TSUndefinedKeyword";
209
- AST_NODE_TYPES$1["TSUnionType"] = "TSUnionType";
210
- AST_NODE_TYPES$1["TSUnknownKeyword"] = "TSUnknownKeyword";
211
- AST_NODE_TYPES$1["TSVoidKeyword"] = "TSVoidKeyword";
212
- })(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {}));
213
- var AST_TOKEN_TYPES;
214
- (function(AST_TOKEN_TYPES$1) {
215
- AST_TOKEN_TYPES$1["Boolean"] = "Boolean";
216
- AST_TOKEN_TYPES$1["Identifier"] = "Identifier";
217
- AST_TOKEN_TYPES$1["JSXIdentifier"] = "JSXIdentifier";
218
- AST_TOKEN_TYPES$1["PrivateIdentifier"] = "PrivateIdentifier";
219
- AST_TOKEN_TYPES$1["JSXText"] = "JSXText";
220
- AST_TOKEN_TYPES$1["Keyword"] = "Keyword";
221
- AST_TOKEN_TYPES$1["Null"] = "Null";
222
- AST_TOKEN_TYPES$1["Numeric"] = "Numeric";
223
- AST_TOKEN_TYPES$1["Punctuator"] = "Punctuator";
224
- AST_TOKEN_TYPES$1["RegularExpression"] = "RegularExpression";
225
- AST_TOKEN_TYPES$1["String"] = "String";
226
- AST_TOKEN_TYPES$1["Template"] = "Template";
227
- AST_TOKEN_TYPES$1["Block"] = "Block";
228
- AST_TOKEN_TYPES$1["Line"] = "Line";
229
- })(AST_TOKEN_TYPES || (exports.AST_TOKEN_TYPES = AST_TOKEN_TYPES = {}));
230
- }) });
231
-
232
- //#endregion
233
- //#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/lib.js
234
- var require_lib = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/lib.js": ((exports) => {
235
- Object.defineProperty(exports, "__esModule", { value: true });
236
- }) });
237
-
238
- //#endregion
239
- //#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/parser-options.js
240
- var require_parser_options = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/parser-options.js": ((exports) => {
241
- Object.defineProperty(exports, "__esModule", { value: true });
242
- }) });
243
-
244
- //#endregion
245
- //#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/ts-estree.js
246
- var require_ts_estree = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/ts-estree.js": ((exports) => {
247
- var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
248
- if (k2 === void 0) k2 = k;
249
- var desc = Object.getOwnPropertyDescriptor(m, k);
250
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
251
- enumerable: true,
252
- get: function() {
253
- return m[k];
254
- }
255
- };
256
- Object.defineProperty(o, k2, desc);
257
- }) : (function(o, m, k, k2) {
258
- if (k2 === void 0) k2 = k;
259
- o[k2] = m[k];
260
- }));
261
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
262
- Object.defineProperty(o, "default", {
263
- enumerable: true,
264
- value: v
265
- });
266
- }) : function(o, v) {
267
- o["default"] = v;
268
- });
269
- var __importStar = exports && exports.__importStar || (function() {
270
- var ownKeys = function(o) {
271
- ownKeys = Object.getOwnPropertyNames || function(o$1) {
272
- var ar = [];
273
- for (var k in o$1) if (Object.prototype.hasOwnProperty.call(o$1, k)) ar[ar.length] = k;
274
- return ar;
275
- };
276
- return ownKeys(o);
277
- };
278
- return function(mod) {
279
- if (mod && mod.__esModule) return mod;
280
- var result = {};
281
- if (mod != null) {
282
- for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding$1(result, mod, k[i]);
283
- }
284
- __setModuleDefault(result, mod);
285
- return result;
286
- };
287
- })();
288
- Object.defineProperty(exports, "__esModule", { value: true });
289
- exports.TSESTree = __importStar(require_ast_spec());
290
- }) });
291
-
292
- //#endregion
293
- //#region ../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/index.js
294
- var require_dist = /* @__PURE__ */ __commonJS({ "../../../node_modules/.pnpm/@typescript-eslint+types@8.44.0/node_modules/@typescript-eslint/types/dist/index.js": ((exports) => {
295
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
296
- if (k2 === void 0) k2 = k;
297
- var desc = Object.getOwnPropertyDescriptor(m, k);
298
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
299
- enumerable: true,
300
- get: function() {
301
- return m[k];
302
- }
303
- };
304
- Object.defineProperty(o, k2, desc);
305
- }) : (function(o, m, k, k2) {
306
- if (k2 === void 0) k2 = k;
307
- o[k2] = m[k];
308
- }));
309
- var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
310
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
311
- };
312
- Object.defineProperty(exports, "__esModule", { value: true });
313
- exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
314
- var ast_spec_1 = require_ast_spec();
315
- Object.defineProperty(exports, "AST_NODE_TYPES", {
316
- enumerable: true,
317
- get: function() {
318
- return ast_spec_1.AST_NODE_TYPES;
319
- }
320
- });
321
- Object.defineProperty(exports, "AST_TOKEN_TYPES", {
322
- enumerable: true,
323
- get: function() {
324
- return ast_spec_1.AST_TOKEN_TYPES;
325
- }
326
- });
327
- __exportStar(require_lib(), exports);
328
- __exportStar(require_parser_options(), exports);
329
- __exportStar(require_ts_estree(), exports);
330
- }) });
331
-
332
- //#endregion
333
- //#region src/ast/env-checks.ts
334
- var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
335
- /**
336
- * Check if the given node is a member expression that accesses `process.env.NODE_ENV`
337
- * @param node The AST node
338
- * @returns True if the node is a member expression that accesses `process.env.NODE_ENV`, false otherwise
339
- */
340
- function isProcessEnvNodeEnv(node) {
341
- 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";
342
- }
343
- /**
344
- * Check if the given node is a binary expression that compares `process.env.NODE_ENV` with a string literal.
345
- * @param node The AST node
346
- * @param operator The operator used in the comparison
347
- * @param value The string literal value to compare against
348
- * @returns True if the node is a binary expression that compares `process.env.NODE_ENV` with the specified value, false otherwise
349
- */
350
- function isProcessEnvNodeEnvCompare(node, operator, value) {
351
- if (node == null) return false;
352
- if (node.type !== import_dist.AST_NODE_TYPES.BinaryExpression) return false;
353
- if (node.operator !== operator) return false;
354
- if (isProcessEnvNodeEnv(node.left) && AST.isLiteral(node.right, "string")) return node.right.value === value;
355
- if (AST.isLiteral(node.left, "string") && isProcessEnvNodeEnv(node.right)) return node.left.value === value;
356
- return false;
357
- }
358
- /**
359
- * Checks if the given node is a `vi.mock`.
360
- * @param node The node to check
361
- * @returns `true` if the node is a `vi.mock`, otherwise `false`.
362
- * @internal
363
- */
364
- function isViMock(node) {
365
- 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";
366
- }
367
- /**
368
- * Checks if the given node is a `vi.mock` callback.
369
- * @param node The node to check
370
- * @returns `true` if the node is a `vi.mock` callback, otherwise `false`.
371
- * @internal
372
- */
373
- function isViMockCallback(node) {
374
- return node != null && AST.isFunction(node) && node.parent.type === import_dist.AST_NODE_TYPES.CallExpression && isViMock(node.parent.callee) && node.parent.arguments[1] === node;
375
- }
376
-
377
- //#endregion
378
- //#region src/ast/selectors.ts
379
- const SEL_IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION = "ArrowFunctionExpression[body.type!='BlockStatement']";
380
- const SEL_OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR = [
381
- "VariableDeclarator",
382
- "[id.type='ObjectPattern']",
383
- "[init.type='Identifier']"
384
- ].join("");
385
- const SEL_DISPLAY_NAME_ASSIGNMENT_EXPRESSION = [
386
- "AssignmentExpression",
387
- "[operator='=']",
388
- "[left.type='MemberExpression']",
389
- "[left.property.name='displayName']"
390
- ].join("");
391
-
392
- //#endregion
393
3
  //#region src/constants.ts
394
4
  /**
395
5
  * Regular expressions for matching a HTML tag name
@@ -495,4 +105,4 @@ function report(context) {
495
105
  }
496
106
 
497
107
  //#endregion
498
- export { RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, SEL_DISPLAY_NAME_ASSIGNMENT_EXPRESSION, SEL_IMPLICIT_RETURN_ARROW_FUNCTION_EXPRESSION, SEL_OBJECT_DESTRUCTURING_VARIABLE_DECLARATOR, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isRegExp, isViMock, isViMockCallback, report, toRegExp };
108
+ export { RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_CAMEL_CASE, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_CONSTANT_CASE, RE_HOOK_NAME, RE_HTML_TAG, RE_JAVASCRIPT_PROTOCOL, RE_JS_EXT, RE_JS_IDENTIFIER, RE_KEBAB_CASE, RE_PASCAL_CASE, RE_REGEXP_STR, RE_SNAKE_CASE, RE_TS_EXT, isRegExp, report, toRegExp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/kit",
3
- "version": "2.0.0-next.187",
3
+ "version": "2.0.0-next.188",
4
4
  "description": "ESLint React's plugin kit for building plugins and rules.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -30,13 +30,12 @@
30
30
  "@typescript-eslint/utils": "^8.44.0",
31
31
  "ts-pattern": "^5.8.0",
32
32
  "zod": "^4.1.9",
33
- "@eslint-react/ast": "2.0.0-next.187",
34
- "@eslint-react/eff": "2.0.0-next.187"
33
+ "@eslint-react/eff": "2.0.0-next.188"
35
34
  },
36
35
  "devDependencies": {
37
36
  "@tsconfig/node22": "^22.0.2",
38
37
  "tsdown": "^0.15.2",
39
- "type-fest": "^5.0.0",
38
+ "type-fest": "^5.0.1",
40
39
  "@local/configs": "0.0.0"
41
40
  },
42
41
  "engines": {