@luxass/eslint-config 7.0.0-beta.2 → 7.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +77 -76
- package/dist/{lib-DHxUIJ7x.mjs → lib-ur-SnMJ-.mjs} +273 -273
- package/package.json +19 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Module, { createRequire } from "node:module";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
4
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
5
5
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
6
6
|
|
|
@@ -247,16 +247,16 @@ var require_eslint_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
247
247
|
* @returns {Variable|null} The found variable or null.
|
|
248
248
|
*/
|
|
249
249
|
function findVariable(initialScope, nameOrNode) {
|
|
250
|
-
let name
|
|
250
|
+
let name = "";
|
|
251
251
|
/** @type {Scope|null} */
|
|
252
252
|
let scope = initialScope;
|
|
253
|
-
if (typeof nameOrNode === "string") name
|
|
253
|
+
if (typeof nameOrNode === "string") name = nameOrNode;
|
|
254
254
|
else {
|
|
255
|
-
name
|
|
255
|
+
name = nameOrNode.name;
|
|
256
256
|
scope = getInnermostScope(scope, nameOrNode);
|
|
257
257
|
}
|
|
258
258
|
while (scope != null) {
|
|
259
|
-
const variable = scope.set.get(name
|
|
259
|
+
const variable = scope.set.get(name);
|
|
260
260
|
if (variable != null) return variable;
|
|
261
261
|
scope = scope.upper;
|
|
262
262
|
}
|
|
@@ -627,10 +627,10 @@ var require_eslint_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
627
627
|
* @param {object} object The object to get.
|
|
628
628
|
* @param {string|number|symbol} name The property name to get.
|
|
629
629
|
*/
|
|
630
|
-
function getPropertyDescriptor(object, name
|
|
630
|
+
function getPropertyDescriptor(object, name) {
|
|
631
631
|
let x = object;
|
|
632
632
|
while ((typeof x === "object" || typeof x === "function") && x !== null) {
|
|
633
|
-
const d = Object.getOwnPropertyDescriptor(x, name
|
|
633
|
+
const d = Object.getOwnPropertyDescriptor(x, name);
|
|
634
634
|
if (d) return d;
|
|
635
635
|
x = Object.getPrototypeOf(x);
|
|
636
636
|
}
|
|
@@ -641,8 +641,8 @@ var require_eslint_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
641
641
|
* @param {object} object The object to check.
|
|
642
642
|
* @param {string|number|symbol} name The property name to check.
|
|
643
643
|
*/
|
|
644
|
-
function isGetter(object, name
|
|
645
|
-
const d = getPropertyDescriptor(object, name
|
|
644
|
+
function isGetter(object, name) {
|
|
645
|
+
const d = getPropertyDescriptor(object, name);
|
|
646
646
|
return d != null && d.get != null;
|
|
647
647
|
}
|
|
648
648
|
/**
|
|
@@ -722,8 +722,8 @@ var require_eslint_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
722
722
|
*/
|
|
723
723
|
function isNameOfMutationArrayMethod(methodName) {
|
|
724
724
|
if (methodName == null || methodName.value == null) return false;
|
|
725
|
-
const name
|
|
726
|
-
return name
|
|
725
|
+
const name = methodName.value;
|
|
726
|
+
return name === "copyWithin" || name === "fill" || name === "pop" || name === "push" || name === "reverse" || name === "shift" || name === "sort" || name === "splice" || name === "unshift";
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
/**
|
|
@@ -1081,8 +1081,8 @@ var require_eslint_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
if (isObjectMethod || isClassMethod || isClassFieldMethod) if (parent.key.type === "PrivateIdentifier") tokens.push(`#${parent.key.name}`);
|
|
1083
1083
|
else {
|
|
1084
|
-
const name
|
|
1085
|
-
if (name
|
|
1084
|
+
const name = getPropertyName(parent);
|
|
1085
|
+
if (name) tokens.push(`'${name}'`);
|
|
1086
1086
|
else if (sourceCode) {
|
|
1087
1087
|
const keyText = sourceCode.getText(parent.key);
|
|
1088
1088
|
if (!keyText.includes("\n")) tokens.push(`[${keyText}]`);
|
|
@@ -1824,8 +1824,8 @@ var require_eslint_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1824
1824
|
* @param {number} index The index of the name.
|
|
1825
1825
|
* @returns {boolean} `false` if it's default.
|
|
1826
1826
|
*/
|
|
1827
|
-
function exceptDefault(name
|
|
1828
|
-
return !(index === 1 && name
|
|
1827
|
+
function exceptDefault(name, index) {
|
|
1828
|
+
return !(index === 1 && name === "default");
|
|
1829
1829
|
}
|
|
1830
1830
|
/** @typedef {import("./types.mjs").StaticValue} StaticValue */
|
|
1831
1831
|
var index = {
|
|
@@ -1934,9 +1934,9 @@ var require_astUtilities = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1934
1934
|
});
|
|
1935
1935
|
var __importStar = exports && exports.__importStar || (function() {
|
|
1936
1936
|
var ownKeys = function(o) {
|
|
1937
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
1937
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
1938
1938
|
var ar = [];
|
|
1939
|
-
for (var k in o
|
|
1939
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
1940
1940
|
return ar;
|
|
1941
1941
|
};
|
|
1942
1942
|
return ownKeys(o);
|
|
@@ -2047,9 +2047,9 @@ var require_PatternMatcher = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2047
2047
|
});
|
|
2048
2048
|
var __importStar = exports && exports.__importStar || (function() {
|
|
2049
2049
|
var ownKeys = function(o) {
|
|
2050
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
2050
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2051
2051
|
var ar = [];
|
|
2052
|
-
for (var k in o
|
|
2052
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2053
2053
|
return ar;
|
|
2054
2054
|
};
|
|
2055
2055
|
return ownKeys(o);
|
|
@@ -2103,9 +2103,9 @@ var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2103
2103
|
});
|
|
2104
2104
|
var __importStar = exports && exports.__importStar || (function() {
|
|
2105
2105
|
var ownKeys = function(o) {
|
|
2106
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
2106
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2107
2107
|
var ar = [];
|
|
2108
|
-
for (var k in o
|
|
2108
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2109
2109
|
return ar;
|
|
2110
2110
|
};
|
|
2111
2111
|
return ownKeys(o);
|
|
@@ -2174,9 +2174,9 @@ var require_ReferenceTracker = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2174
2174
|
});
|
|
2175
2175
|
var __importStar = exports && exports.__importStar || (function() {
|
|
2176
2176
|
var ownKeys = function(o) {
|
|
2177
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
2177
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2178
2178
|
var ar = [];
|
|
2179
|
-
for (var k in o
|
|
2179
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2180
2180
|
return ar;
|
|
2181
2181
|
};
|
|
2182
2182
|
return ownKeys(o);
|
|
@@ -2233,9 +2233,9 @@ var require_scopeAnalysis = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2233
2233
|
});
|
|
2234
2234
|
var __importStar = exports && exports.__importStar || (function() {
|
|
2235
2235
|
var ownKeys = function(o) {
|
|
2236
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
2236
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2237
2237
|
var ar = [];
|
|
2238
|
-
for (var k in o
|
|
2238
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2239
2239
|
return ar;
|
|
2240
2240
|
};
|
|
2241
2241
|
return ownKeys(o);
|
|
@@ -2286,8 +2286,8 @@ var require_eslint_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2286
2286
|
if (k2 === void 0) k2 = k;
|
|
2287
2287
|
o[k2] = m[k];
|
|
2288
2288
|
}));
|
|
2289
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
2290
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
2289
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$10) {
|
|
2290
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$10, p)) __createBinding(exports$10, m, p);
|
|
2291
2291
|
};
|
|
2292
2292
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2293
2293
|
__exportStar(require_astUtilities(), exports);
|
|
@@ -2350,175 +2350,175 @@ var require_ast_spec = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2350
2350
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2351
2351
|
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
|
|
2352
2352
|
var AST_NODE_TYPES;
|
|
2353
|
-
(function(AST_NODE_TYPES
|
|
2354
|
-
AST_NODE_TYPES
|
|
2355
|
-
AST_NODE_TYPES
|
|
2356
|
-
AST_NODE_TYPES
|
|
2357
|
-
AST_NODE_TYPES
|
|
2358
|
-
AST_NODE_TYPES
|
|
2359
|
-
AST_NODE_TYPES
|
|
2360
|
-
AST_NODE_TYPES
|
|
2361
|
-
AST_NODE_TYPES
|
|
2362
|
-
AST_NODE_TYPES
|
|
2363
|
-
AST_NODE_TYPES
|
|
2364
|
-
AST_NODE_TYPES
|
|
2365
|
-
AST_NODE_TYPES
|
|
2366
|
-
AST_NODE_TYPES
|
|
2367
|
-
AST_NODE_TYPES
|
|
2368
|
-
AST_NODE_TYPES
|
|
2369
|
-
AST_NODE_TYPES
|
|
2370
|
-
AST_NODE_TYPES
|
|
2371
|
-
AST_NODE_TYPES
|
|
2372
|
-
AST_NODE_TYPES
|
|
2373
|
-
AST_NODE_TYPES
|
|
2374
|
-
AST_NODE_TYPES
|
|
2375
|
-
AST_NODE_TYPES
|
|
2376
|
-
AST_NODE_TYPES
|
|
2377
|
-
AST_NODE_TYPES
|
|
2378
|
-
AST_NODE_TYPES
|
|
2379
|
-
AST_NODE_TYPES
|
|
2380
|
-
AST_NODE_TYPES
|
|
2381
|
-
AST_NODE_TYPES
|
|
2382
|
-
AST_NODE_TYPES
|
|
2383
|
-
AST_NODE_TYPES
|
|
2384
|
-
AST_NODE_TYPES
|
|
2385
|
-
AST_NODE_TYPES
|
|
2386
|
-
AST_NODE_TYPES
|
|
2387
|
-
AST_NODE_TYPES
|
|
2388
|
-
AST_NODE_TYPES
|
|
2389
|
-
AST_NODE_TYPES
|
|
2390
|
-
AST_NODE_TYPES
|
|
2391
|
-
AST_NODE_TYPES
|
|
2392
|
-
AST_NODE_TYPES
|
|
2393
|
-
AST_NODE_TYPES
|
|
2394
|
-
AST_NODE_TYPES
|
|
2395
|
-
AST_NODE_TYPES
|
|
2396
|
-
AST_NODE_TYPES
|
|
2397
|
-
AST_NODE_TYPES
|
|
2398
|
-
AST_NODE_TYPES
|
|
2399
|
-
AST_NODE_TYPES
|
|
2400
|
-
AST_NODE_TYPES
|
|
2401
|
-
AST_NODE_TYPES
|
|
2402
|
-
AST_NODE_TYPES
|
|
2403
|
-
AST_NODE_TYPES
|
|
2404
|
-
AST_NODE_TYPES
|
|
2405
|
-
AST_NODE_TYPES
|
|
2406
|
-
AST_NODE_TYPES
|
|
2407
|
-
AST_NODE_TYPES
|
|
2408
|
-
AST_NODE_TYPES
|
|
2409
|
-
AST_NODE_TYPES
|
|
2410
|
-
AST_NODE_TYPES
|
|
2411
|
-
AST_NODE_TYPES
|
|
2412
|
-
AST_NODE_TYPES
|
|
2413
|
-
AST_NODE_TYPES
|
|
2414
|
-
AST_NODE_TYPES
|
|
2415
|
-
AST_NODE_TYPES
|
|
2416
|
-
AST_NODE_TYPES
|
|
2417
|
-
AST_NODE_TYPES
|
|
2418
|
-
AST_NODE_TYPES
|
|
2419
|
-
AST_NODE_TYPES
|
|
2420
|
-
AST_NODE_TYPES
|
|
2421
|
-
AST_NODE_TYPES
|
|
2422
|
-
AST_NODE_TYPES
|
|
2423
|
-
AST_NODE_TYPES
|
|
2424
|
-
AST_NODE_TYPES
|
|
2425
|
-
AST_NODE_TYPES
|
|
2426
|
-
AST_NODE_TYPES
|
|
2427
|
-
AST_NODE_TYPES
|
|
2428
|
-
AST_NODE_TYPES
|
|
2429
|
-
AST_NODE_TYPES
|
|
2430
|
-
AST_NODE_TYPES
|
|
2431
|
-
AST_NODE_TYPES
|
|
2432
|
-
AST_NODE_TYPES
|
|
2433
|
-
AST_NODE_TYPES
|
|
2434
|
-
AST_NODE_TYPES
|
|
2435
|
-
AST_NODE_TYPES
|
|
2436
|
-
AST_NODE_TYPES
|
|
2437
|
-
AST_NODE_TYPES
|
|
2438
|
-
AST_NODE_TYPES
|
|
2439
|
-
AST_NODE_TYPES
|
|
2440
|
-
AST_NODE_TYPES
|
|
2441
|
-
AST_NODE_TYPES
|
|
2442
|
-
AST_NODE_TYPES
|
|
2443
|
-
AST_NODE_TYPES
|
|
2444
|
-
AST_NODE_TYPES
|
|
2445
|
-
AST_NODE_TYPES
|
|
2446
|
-
AST_NODE_TYPES
|
|
2447
|
-
AST_NODE_TYPES
|
|
2448
|
-
AST_NODE_TYPES
|
|
2449
|
-
AST_NODE_TYPES
|
|
2450
|
-
AST_NODE_TYPES
|
|
2451
|
-
AST_NODE_TYPES
|
|
2452
|
-
AST_NODE_TYPES
|
|
2453
|
-
AST_NODE_TYPES
|
|
2454
|
-
AST_NODE_TYPES
|
|
2455
|
-
AST_NODE_TYPES
|
|
2456
|
-
AST_NODE_TYPES
|
|
2457
|
-
AST_NODE_TYPES
|
|
2458
|
-
AST_NODE_TYPES
|
|
2459
|
-
AST_NODE_TYPES
|
|
2460
|
-
AST_NODE_TYPES
|
|
2461
|
-
AST_NODE_TYPES
|
|
2462
|
-
AST_NODE_TYPES
|
|
2463
|
-
AST_NODE_TYPES
|
|
2464
|
-
AST_NODE_TYPES
|
|
2465
|
-
AST_NODE_TYPES
|
|
2466
|
-
AST_NODE_TYPES
|
|
2467
|
-
AST_NODE_TYPES
|
|
2468
|
-
AST_NODE_TYPES
|
|
2469
|
-
AST_NODE_TYPES
|
|
2470
|
-
AST_NODE_TYPES
|
|
2471
|
-
AST_NODE_TYPES
|
|
2472
|
-
AST_NODE_TYPES
|
|
2473
|
-
AST_NODE_TYPES
|
|
2474
|
-
AST_NODE_TYPES
|
|
2475
|
-
AST_NODE_TYPES
|
|
2476
|
-
AST_NODE_TYPES
|
|
2477
|
-
AST_NODE_TYPES
|
|
2478
|
-
AST_NODE_TYPES
|
|
2479
|
-
AST_NODE_TYPES
|
|
2480
|
-
AST_NODE_TYPES
|
|
2481
|
-
AST_NODE_TYPES
|
|
2482
|
-
AST_NODE_TYPES
|
|
2483
|
-
AST_NODE_TYPES
|
|
2484
|
-
AST_NODE_TYPES
|
|
2485
|
-
AST_NODE_TYPES
|
|
2486
|
-
AST_NODE_TYPES
|
|
2487
|
-
AST_NODE_TYPES
|
|
2488
|
-
AST_NODE_TYPES
|
|
2489
|
-
AST_NODE_TYPES
|
|
2490
|
-
AST_NODE_TYPES
|
|
2491
|
-
AST_NODE_TYPES
|
|
2492
|
-
AST_NODE_TYPES
|
|
2493
|
-
AST_NODE_TYPES
|
|
2494
|
-
AST_NODE_TYPES
|
|
2495
|
-
AST_NODE_TYPES
|
|
2496
|
-
AST_NODE_TYPES
|
|
2497
|
-
AST_NODE_TYPES
|
|
2498
|
-
AST_NODE_TYPES
|
|
2499
|
-
AST_NODE_TYPES
|
|
2500
|
-
AST_NODE_TYPES
|
|
2501
|
-
AST_NODE_TYPES
|
|
2502
|
-
AST_NODE_TYPES
|
|
2503
|
-
AST_NODE_TYPES
|
|
2504
|
-
AST_NODE_TYPES
|
|
2505
|
-
AST_NODE_TYPES
|
|
2506
|
-
AST_NODE_TYPES
|
|
2507
|
-
AST_NODE_TYPES
|
|
2508
|
-
AST_NODE_TYPES
|
|
2509
|
-
AST_NODE_TYPES
|
|
2510
|
-
AST_NODE_TYPES
|
|
2511
|
-
AST_NODE_TYPES
|
|
2512
|
-
AST_NODE_TYPES
|
|
2513
|
-
AST_NODE_TYPES
|
|
2514
|
-
AST_NODE_TYPES
|
|
2515
|
-
AST_NODE_TYPES
|
|
2516
|
-
AST_NODE_TYPES
|
|
2517
|
-
AST_NODE_TYPES
|
|
2518
|
-
AST_NODE_TYPES
|
|
2519
|
-
AST_NODE_TYPES
|
|
2520
|
-
AST_NODE_TYPES
|
|
2521
|
-
AST_NODE_TYPES
|
|
2353
|
+
(function(AST_NODE_TYPES) {
|
|
2354
|
+
AST_NODE_TYPES["AccessorProperty"] = "AccessorProperty";
|
|
2355
|
+
AST_NODE_TYPES["ArrayExpression"] = "ArrayExpression";
|
|
2356
|
+
AST_NODE_TYPES["ArrayPattern"] = "ArrayPattern";
|
|
2357
|
+
AST_NODE_TYPES["ArrowFunctionExpression"] = "ArrowFunctionExpression";
|
|
2358
|
+
AST_NODE_TYPES["AssignmentExpression"] = "AssignmentExpression";
|
|
2359
|
+
AST_NODE_TYPES["AssignmentPattern"] = "AssignmentPattern";
|
|
2360
|
+
AST_NODE_TYPES["AwaitExpression"] = "AwaitExpression";
|
|
2361
|
+
AST_NODE_TYPES["BinaryExpression"] = "BinaryExpression";
|
|
2362
|
+
AST_NODE_TYPES["BlockStatement"] = "BlockStatement";
|
|
2363
|
+
AST_NODE_TYPES["BreakStatement"] = "BreakStatement";
|
|
2364
|
+
AST_NODE_TYPES["CallExpression"] = "CallExpression";
|
|
2365
|
+
AST_NODE_TYPES["CatchClause"] = "CatchClause";
|
|
2366
|
+
AST_NODE_TYPES["ChainExpression"] = "ChainExpression";
|
|
2367
|
+
AST_NODE_TYPES["ClassBody"] = "ClassBody";
|
|
2368
|
+
AST_NODE_TYPES["ClassDeclaration"] = "ClassDeclaration";
|
|
2369
|
+
AST_NODE_TYPES["ClassExpression"] = "ClassExpression";
|
|
2370
|
+
AST_NODE_TYPES["ConditionalExpression"] = "ConditionalExpression";
|
|
2371
|
+
AST_NODE_TYPES["ContinueStatement"] = "ContinueStatement";
|
|
2372
|
+
AST_NODE_TYPES["DebuggerStatement"] = "DebuggerStatement";
|
|
2373
|
+
AST_NODE_TYPES["Decorator"] = "Decorator";
|
|
2374
|
+
AST_NODE_TYPES["DoWhileStatement"] = "DoWhileStatement";
|
|
2375
|
+
AST_NODE_TYPES["EmptyStatement"] = "EmptyStatement";
|
|
2376
|
+
AST_NODE_TYPES["ExportAllDeclaration"] = "ExportAllDeclaration";
|
|
2377
|
+
AST_NODE_TYPES["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
|
|
2378
|
+
AST_NODE_TYPES["ExportNamedDeclaration"] = "ExportNamedDeclaration";
|
|
2379
|
+
AST_NODE_TYPES["ExportSpecifier"] = "ExportSpecifier";
|
|
2380
|
+
AST_NODE_TYPES["ExpressionStatement"] = "ExpressionStatement";
|
|
2381
|
+
AST_NODE_TYPES["ForInStatement"] = "ForInStatement";
|
|
2382
|
+
AST_NODE_TYPES["ForOfStatement"] = "ForOfStatement";
|
|
2383
|
+
AST_NODE_TYPES["ForStatement"] = "ForStatement";
|
|
2384
|
+
AST_NODE_TYPES["FunctionDeclaration"] = "FunctionDeclaration";
|
|
2385
|
+
AST_NODE_TYPES["FunctionExpression"] = "FunctionExpression";
|
|
2386
|
+
AST_NODE_TYPES["Identifier"] = "Identifier";
|
|
2387
|
+
AST_NODE_TYPES["IfStatement"] = "IfStatement";
|
|
2388
|
+
AST_NODE_TYPES["ImportAttribute"] = "ImportAttribute";
|
|
2389
|
+
AST_NODE_TYPES["ImportDeclaration"] = "ImportDeclaration";
|
|
2390
|
+
AST_NODE_TYPES["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
|
|
2391
|
+
AST_NODE_TYPES["ImportExpression"] = "ImportExpression";
|
|
2392
|
+
AST_NODE_TYPES["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
|
|
2393
|
+
AST_NODE_TYPES["ImportSpecifier"] = "ImportSpecifier";
|
|
2394
|
+
AST_NODE_TYPES["JSXAttribute"] = "JSXAttribute";
|
|
2395
|
+
AST_NODE_TYPES["JSXClosingElement"] = "JSXClosingElement";
|
|
2396
|
+
AST_NODE_TYPES["JSXClosingFragment"] = "JSXClosingFragment";
|
|
2397
|
+
AST_NODE_TYPES["JSXElement"] = "JSXElement";
|
|
2398
|
+
AST_NODE_TYPES["JSXEmptyExpression"] = "JSXEmptyExpression";
|
|
2399
|
+
AST_NODE_TYPES["JSXExpressionContainer"] = "JSXExpressionContainer";
|
|
2400
|
+
AST_NODE_TYPES["JSXFragment"] = "JSXFragment";
|
|
2401
|
+
AST_NODE_TYPES["JSXIdentifier"] = "JSXIdentifier";
|
|
2402
|
+
AST_NODE_TYPES["JSXMemberExpression"] = "JSXMemberExpression";
|
|
2403
|
+
AST_NODE_TYPES["JSXNamespacedName"] = "JSXNamespacedName";
|
|
2404
|
+
AST_NODE_TYPES["JSXOpeningElement"] = "JSXOpeningElement";
|
|
2405
|
+
AST_NODE_TYPES["JSXOpeningFragment"] = "JSXOpeningFragment";
|
|
2406
|
+
AST_NODE_TYPES["JSXSpreadAttribute"] = "JSXSpreadAttribute";
|
|
2407
|
+
AST_NODE_TYPES["JSXSpreadChild"] = "JSXSpreadChild";
|
|
2408
|
+
AST_NODE_TYPES["JSXText"] = "JSXText";
|
|
2409
|
+
AST_NODE_TYPES["LabeledStatement"] = "LabeledStatement";
|
|
2410
|
+
AST_NODE_TYPES["Literal"] = "Literal";
|
|
2411
|
+
AST_NODE_TYPES["LogicalExpression"] = "LogicalExpression";
|
|
2412
|
+
AST_NODE_TYPES["MemberExpression"] = "MemberExpression";
|
|
2413
|
+
AST_NODE_TYPES["MetaProperty"] = "MetaProperty";
|
|
2414
|
+
AST_NODE_TYPES["MethodDefinition"] = "MethodDefinition";
|
|
2415
|
+
AST_NODE_TYPES["NewExpression"] = "NewExpression";
|
|
2416
|
+
AST_NODE_TYPES["ObjectExpression"] = "ObjectExpression";
|
|
2417
|
+
AST_NODE_TYPES["ObjectPattern"] = "ObjectPattern";
|
|
2418
|
+
AST_NODE_TYPES["PrivateIdentifier"] = "PrivateIdentifier";
|
|
2419
|
+
AST_NODE_TYPES["Program"] = "Program";
|
|
2420
|
+
AST_NODE_TYPES["Property"] = "Property";
|
|
2421
|
+
AST_NODE_TYPES["PropertyDefinition"] = "PropertyDefinition";
|
|
2422
|
+
AST_NODE_TYPES["RestElement"] = "RestElement";
|
|
2423
|
+
AST_NODE_TYPES["ReturnStatement"] = "ReturnStatement";
|
|
2424
|
+
AST_NODE_TYPES["SequenceExpression"] = "SequenceExpression";
|
|
2425
|
+
AST_NODE_TYPES["SpreadElement"] = "SpreadElement";
|
|
2426
|
+
AST_NODE_TYPES["StaticBlock"] = "StaticBlock";
|
|
2427
|
+
AST_NODE_TYPES["Super"] = "Super";
|
|
2428
|
+
AST_NODE_TYPES["SwitchCase"] = "SwitchCase";
|
|
2429
|
+
AST_NODE_TYPES["SwitchStatement"] = "SwitchStatement";
|
|
2430
|
+
AST_NODE_TYPES["TaggedTemplateExpression"] = "TaggedTemplateExpression";
|
|
2431
|
+
AST_NODE_TYPES["TemplateElement"] = "TemplateElement";
|
|
2432
|
+
AST_NODE_TYPES["TemplateLiteral"] = "TemplateLiteral";
|
|
2433
|
+
AST_NODE_TYPES["ThisExpression"] = "ThisExpression";
|
|
2434
|
+
AST_NODE_TYPES["ThrowStatement"] = "ThrowStatement";
|
|
2435
|
+
AST_NODE_TYPES["TryStatement"] = "TryStatement";
|
|
2436
|
+
AST_NODE_TYPES["UnaryExpression"] = "UnaryExpression";
|
|
2437
|
+
AST_NODE_TYPES["UpdateExpression"] = "UpdateExpression";
|
|
2438
|
+
AST_NODE_TYPES["VariableDeclaration"] = "VariableDeclaration";
|
|
2439
|
+
AST_NODE_TYPES["VariableDeclarator"] = "VariableDeclarator";
|
|
2440
|
+
AST_NODE_TYPES["WhileStatement"] = "WhileStatement";
|
|
2441
|
+
AST_NODE_TYPES["WithStatement"] = "WithStatement";
|
|
2442
|
+
AST_NODE_TYPES["YieldExpression"] = "YieldExpression";
|
|
2443
|
+
AST_NODE_TYPES["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
|
|
2444
|
+
AST_NODE_TYPES["TSAbstractKeyword"] = "TSAbstractKeyword";
|
|
2445
|
+
AST_NODE_TYPES["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
|
|
2446
|
+
AST_NODE_TYPES["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
|
|
2447
|
+
AST_NODE_TYPES["TSAnyKeyword"] = "TSAnyKeyword";
|
|
2448
|
+
AST_NODE_TYPES["TSArrayType"] = "TSArrayType";
|
|
2449
|
+
AST_NODE_TYPES["TSAsExpression"] = "TSAsExpression";
|
|
2450
|
+
AST_NODE_TYPES["TSAsyncKeyword"] = "TSAsyncKeyword";
|
|
2451
|
+
AST_NODE_TYPES["TSBigIntKeyword"] = "TSBigIntKeyword";
|
|
2452
|
+
AST_NODE_TYPES["TSBooleanKeyword"] = "TSBooleanKeyword";
|
|
2453
|
+
AST_NODE_TYPES["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
|
|
2454
|
+
AST_NODE_TYPES["TSClassImplements"] = "TSClassImplements";
|
|
2455
|
+
AST_NODE_TYPES["TSConditionalType"] = "TSConditionalType";
|
|
2456
|
+
AST_NODE_TYPES["TSConstructorType"] = "TSConstructorType";
|
|
2457
|
+
AST_NODE_TYPES["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
|
|
2458
|
+
AST_NODE_TYPES["TSDeclareFunction"] = "TSDeclareFunction";
|
|
2459
|
+
AST_NODE_TYPES["TSDeclareKeyword"] = "TSDeclareKeyword";
|
|
2460
|
+
AST_NODE_TYPES["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
|
|
2461
|
+
AST_NODE_TYPES["TSEnumBody"] = "TSEnumBody";
|
|
2462
|
+
AST_NODE_TYPES["TSEnumDeclaration"] = "TSEnumDeclaration";
|
|
2463
|
+
AST_NODE_TYPES["TSEnumMember"] = "TSEnumMember";
|
|
2464
|
+
AST_NODE_TYPES["TSExportAssignment"] = "TSExportAssignment";
|
|
2465
|
+
AST_NODE_TYPES["TSExportKeyword"] = "TSExportKeyword";
|
|
2466
|
+
AST_NODE_TYPES["TSExternalModuleReference"] = "TSExternalModuleReference";
|
|
2467
|
+
AST_NODE_TYPES["TSFunctionType"] = "TSFunctionType";
|
|
2468
|
+
AST_NODE_TYPES["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
|
|
2469
|
+
AST_NODE_TYPES["TSImportType"] = "TSImportType";
|
|
2470
|
+
AST_NODE_TYPES["TSIndexedAccessType"] = "TSIndexedAccessType";
|
|
2471
|
+
AST_NODE_TYPES["TSIndexSignature"] = "TSIndexSignature";
|
|
2472
|
+
AST_NODE_TYPES["TSInferType"] = "TSInferType";
|
|
2473
|
+
AST_NODE_TYPES["TSInstantiationExpression"] = "TSInstantiationExpression";
|
|
2474
|
+
AST_NODE_TYPES["TSInterfaceBody"] = "TSInterfaceBody";
|
|
2475
|
+
AST_NODE_TYPES["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
|
|
2476
|
+
AST_NODE_TYPES["TSInterfaceHeritage"] = "TSInterfaceHeritage";
|
|
2477
|
+
AST_NODE_TYPES["TSIntersectionType"] = "TSIntersectionType";
|
|
2478
|
+
AST_NODE_TYPES["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
|
|
2479
|
+
AST_NODE_TYPES["TSLiteralType"] = "TSLiteralType";
|
|
2480
|
+
AST_NODE_TYPES["TSMappedType"] = "TSMappedType";
|
|
2481
|
+
AST_NODE_TYPES["TSMethodSignature"] = "TSMethodSignature";
|
|
2482
|
+
AST_NODE_TYPES["TSModuleBlock"] = "TSModuleBlock";
|
|
2483
|
+
AST_NODE_TYPES["TSModuleDeclaration"] = "TSModuleDeclaration";
|
|
2484
|
+
AST_NODE_TYPES["TSNamedTupleMember"] = "TSNamedTupleMember";
|
|
2485
|
+
AST_NODE_TYPES["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
|
|
2486
|
+
AST_NODE_TYPES["TSNeverKeyword"] = "TSNeverKeyword";
|
|
2487
|
+
AST_NODE_TYPES["TSNonNullExpression"] = "TSNonNullExpression";
|
|
2488
|
+
AST_NODE_TYPES["TSNullKeyword"] = "TSNullKeyword";
|
|
2489
|
+
AST_NODE_TYPES["TSNumberKeyword"] = "TSNumberKeyword";
|
|
2490
|
+
AST_NODE_TYPES["TSObjectKeyword"] = "TSObjectKeyword";
|
|
2491
|
+
AST_NODE_TYPES["TSOptionalType"] = "TSOptionalType";
|
|
2492
|
+
AST_NODE_TYPES["TSParameterProperty"] = "TSParameterProperty";
|
|
2493
|
+
AST_NODE_TYPES["TSPrivateKeyword"] = "TSPrivateKeyword";
|
|
2494
|
+
AST_NODE_TYPES["TSPropertySignature"] = "TSPropertySignature";
|
|
2495
|
+
AST_NODE_TYPES["TSProtectedKeyword"] = "TSProtectedKeyword";
|
|
2496
|
+
AST_NODE_TYPES["TSPublicKeyword"] = "TSPublicKeyword";
|
|
2497
|
+
AST_NODE_TYPES["TSQualifiedName"] = "TSQualifiedName";
|
|
2498
|
+
AST_NODE_TYPES["TSReadonlyKeyword"] = "TSReadonlyKeyword";
|
|
2499
|
+
AST_NODE_TYPES["TSRestType"] = "TSRestType";
|
|
2500
|
+
AST_NODE_TYPES["TSSatisfiesExpression"] = "TSSatisfiesExpression";
|
|
2501
|
+
AST_NODE_TYPES["TSStaticKeyword"] = "TSStaticKeyword";
|
|
2502
|
+
AST_NODE_TYPES["TSStringKeyword"] = "TSStringKeyword";
|
|
2503
|
+
AST_NODE_TYPES["TSSymbolKeyword"] = "TSSymbolKeyword";
|
|
2504
|
+
AST_NODE_TYPES["TSTemplateLiteralType"] = "TSTemplateLiteralType";
|
|
2505
|
+
AST_NODE_TYPES["TSThisType"] = "TSThisType";
|
|
2506
|
+
AST_NODE_TYPES["TSTupleType"] = "TSTupleType";
|
|
2507
|
+
AST_NODE_TYPES["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
|
|
2508
|
+
AST_NODE_TYPES["TSTypeAnnotation"] = "TSTypeAnnotation";
|
|
2509
|
+
AST_NODE_TYPES["TSTypeAssertion"] = "TSTypeAssertion";
|
|
2510
|
+
AST_NODE_TYPES["TSTypeLiteral"] = "TSTypeLiteral";
|
|
2511
|
+
AST_NODE_TYPES["TSTypeOperator"] = "TSTypeOperator";
|
|
2512
|
+
AST_NODE_TYPES["TSTypeParameter"] = "TSTypeParameter";
|
|
2513
|
+
AST_NODE_TYPES["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
|
|
2514
|
+
AST_NODE_TYPES["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
|
|
2515
|
+
AST_NODE_TYPES["TSTypePredicate"] = "TSTypePredicate";
|
|
2516
|
+
AST_NODE_TYPES["TSTypeQuery"] = "TSTypeQuery";
|
|
2517
|
+
AST_NODE_TYPES["TSTypeReference"] = "TSTypeReference";
|
|
2518
|
+
AST_NODE_TYPES["TSUndefinedKeyword"] = "TSUndefinedKeyword";
|
|
2519
|
+
AST_NODE_TYPES["TSUnionType"] = "TSUnionType";
|
|
2520
|
+
AST_NODE_TYPES["TSUnknownKeyword"] = "TSUnknownKeyword";
|
|
2521
|
+
AST_NODE_TYPES["TSVoidKeyword"] = "TSVoidKeyword";
|
|
2522
2522
|
})(AST_NODE_TYPES || (exports.AST_NODE_TYPES = AST_NODE_TYPES = {}));
|
|
2523
2523
|
var AST_TOKEN_TYPES;
|
|
2524
2524
|
(function(AST_TOKEN_TYPES) {
|
|
@@ -2578,9 +2578,9 @@ var require_ts_estree$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2578
2578
|
});
|
|
2579
2579
|
var __importStar = exports && exports.__importStar || (function() {
|
|
2580
2580
|
var ownKeys = function(o) {
|
|
2581
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
2581
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
2582
2582
|
var ar = [];
|
|
2583
|
-
for (var k in o
|
|
2583
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
2584
2584
|
return ar;
|
|
2585
2585
|
};
|
|
2586
2586
|
return ownKeys(o);
|
|
@@ -2617,8 +2617,8 @@ var require_dist$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2617
2617
|
if (k2 === void 0) k2 = k;
|
|
2618
2618
|
o[k2] = m[k];
|
|
2619
2619
|
}));
|
|
2620
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
2621
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
2620
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$9) {
|
|
2621
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$9, p)) __createBinding(exports$9, m, p);
|
|
2622
2622
|
};
|
|
2623
2623
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2624
2624
|
exports.AST_TOKEN_TYPES = exports.AST_NODE_TYPES = void 0;
|
|
@@ -2780,8 +2780,8 @@ var require_ast_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2780
2780
|
if (k2 === void 0) k2 = k;
|
|
2781
2781
|
o[k2] = m[k];
|
|
2782
2782
|
}));
|
|
2783
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
2784
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
2783
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$8) {
|
|
2784
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$8, p)) __createBinding(exports$8, m, p);
|
|
2785
2785
|
};
|
|
2786
2786
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2787
2787
|
__exportStar(require_eslint_utils$1(), exports);
|
|
@@ -2930,28 +2930,28 @@ var require_RuleCreator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2930
2930
|
* @returns Function to create a rule with the docs URL format.
|
|
2931
2931
|
*/
|
|
2932
2932
|
function RuleCreator(urlCreator) {
|
|
2933
|
-
return function createNamedRule({ meta, name
|
|
2933
|
+
return function createNamedRule({ meta, name, ...rule }) {
|
|
2934
2934
|
return createRule({
|
|
2935
2935
|
meta: {
|
|
2936
2936
|
...meta,
|
|
2937
2937
|
docs: {
|
|
2938
2938
|
...meta.docs,
|
|
2939
|
-
url: urlCreator(name
|
|
2939
|
+
url: urlCreator(name)
|
|
2940
2940
|
}
|
|
2941
2941
|
},
|
|
2942
|
-
name
|
|
2943
|
-
...rule
|
|
2942
|
+
name,
|
|
2943
|
+
...rule
|
|
2944
2944
|
});
|
|
2945
2945
|
};
|
|
2946
2946
|
}
|
|
2947
|
-
function createRule({ create, defaultOptions, meta, name
|
|
2947
|
+
function createRule({ create, defaultOptions, meta, name }) {
|
|
2948
2948
|
return {
|
|
2949
2949
|
create(context) {
|
|
2950
2950
|
return create(context, (0, applyDefault_1.applyDefault)(defaultOptions, context.options));
|
|
2951
2951
|
},
|
|
2952
2952
|
defaultOptions,
|
|
2953
2953
|
meta,
|
|
2954
|
-
name
|
|
2954
|
+
name
|
|
2955
2955
|
};
|
|
2956
2956
|
}
|
|
2957
2957
|
/**
|
|
@@ -2982,8 +2982,8 @@ var require_eslint_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2982
2982
|
if (k2 === void 0) k2 = k;
|
|
2983
2983
|
o[k2] = m[k];
|
|
2984
2984
|
}));
|
|
2985
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
2986
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
2985
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$7) {
|
|
2986
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$7, p)) __createBinding(exports$7, m, p);
|
|
2987
2987
|
};
|
|
2988
2988
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2989
2989
|
__exportStar(require_applyDefault(), exports);
|
|
@@ -3381,9 +3381,9 @@ var require_visitor_keys = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3381
3381
|
});
|
|
3382
3382
|
var __importStar = exports && exports.__importStar || (function() {
|
|
3383
3383
|
var ownKeys = function(o) {
|
|
3384
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
3384
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
3385
3385
|
var ar = [];
|
|
3386
|
-
for (var k in o
|
|
3386
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
3387
3387
|
return ar;
|
|
3388
3388
|
};
|
|
3389
3389
|
return ownKeys(o);
|
|
@@ -3709,9 +3709,9 @@ var require_DefinitionBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3709
3709
|
* @public
|
|
3710
3710
|
*/
|
|
3711
3711
|
parent;
|
|
3712
|
-
constructor(type, name
|
|
3712
|
+
constructor(type, name, node, parent) {
|
|
3713
3713
|
this.type = type;
|
|
3714
|
-
this.name = name
|
|
3714
|
+
this.name = name;
|
|
3715
3715
|
this.node = node;
|
|
3716
3716
|
this.parent = parent;
|
|
3717
3717
|
}
|
|
@@ -3750,8 +3750,8 @@ var require_CatchClauseDefinition = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
3750
3750
|
var CatchClauseDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3751
3751
|
isTypeDefinition = false;
|
|
3752
3752
|
isVariableDefinition = true;
|
|
3753
|
-
constructor(name
|
|
3754
|
-
super(DefinitionType_1.DefinitionType.CatchClause, name
|
|
3753
|
+
constructor(name, node) {
|
|
3754
|
+
super(DefinitionType_1.DefinitionType.CatchClause, name, node, null);
|
|
3755
3755
|
}
|
|
3756
3756
|
};
|
|
3757
3757
|
exports.CatchClauseDefinition = CatchClauseDefinition;
|
|
@@ -3767,8 +3767,8 @@ var require_ClassNameDefinition = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3767
3767
|
var ClassNameDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3768
3768
|
isTypeDefinition = true;
|
|
3769
3769
|
isVariableDefinition = true;
|
|
3770
|
-
constructor(name
|
|
3771
|
-
super(DefinitionType_1.DefinitionType.ClassName, name
|
|
3770
|
+
constructor(name, node) {
|
|
3771
|
+
super(DefinitionType_1.DefinitionType.ClassName, name, node, null);
|
|
3772
3772
|
}
|
|
3773
3773
|
};
|
|
3774
3774
|
exports.ClassNameDefinition = ClassNameDefinition;
|
|
@@ -3790,8 +3790,8 @@ var require_FunctionNameDefinition = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
3790
3790
|
var FunctionNameDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3791
3791
|
isTypeDefinition = false;
|
|
3792
3792
|
isVariableDefinition = true;
|
|
3793
|
-
constructor(name
|
|
3794
|
-
super(DefinitionType_1.DefinitionType.FunctionName, name
|
|
3793
|
+
constructor(name, node) {
|
|
3794
|
+
super(DefinitionType_1.DefinitionType.FunctionName, name, node, null);
|
|
3795
3795
|
}
|
|
3796
3796
|
};
|
|
3797
3797
|
exports.FunctionNameDefinition = FunctionNameDefinition;
|
|
@@ -3807,8 +3807,8 @@ var require_ImplicitGlobalVariableDefinition = /* @__PURE__ */ __commonJSMin(((e
|
|
|
3807
3807
|
var ImplicitGlobalVariableDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3808
3808
|
isTypeDefinition = false;
|
|
3809
3809
|
isVariableDefinition = true;
|
|
3810
|
-
constructor(name
|
|
3811
|
-
super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name
|
|
3810
|
+
constructor(name, node) {
|
|
3811
|
+
super(DefinitionType_1.DefinitionType.ImplicitGlobalVariable, name, node, null);
|
|
3812
3812
|
}
|
|
3813
3813
|
};
|
|
3814
3814
|
exports.ImplicitGlobalVariableDefinition = ImplicitGlobalVariableDefinition;
|
|
@@ -3824,8 +3824,8 @@ var require_ImportBindingDefinition = /* @__PURE__ */ __commonJSMin(((exports) =
|
|
|
3824
3824
|
var ImportBindingDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3825
3825
|
isTypeDefinition = true;
|
|
3826
3826
|
isVariableDefinition = true;
|
|
3827
|
-
constructor(name
|
|
3828
|
-
super(DefinitionType_1.DefinitionType.ImportBinding, name
|
|
3827
|
+
constructor(name, node, decl) {
|
|
3828
|
+
super(DefinitionType_1.DefinitionType.ImportBinding, name, node, decl);
|
|
3829
3829
|
}
|
|
3830
3830
|
};
|
|
3831
3831
|
exports.ImportBindingDefinition = ImportBindingDefinition;
|
|
@@ -3845,8 +3845,8 @@ var require_ParameterDefinition = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3845
3845
|
isTypeDefinition = false;
|
|
3846
3846
|
isVariableDefinition = true;
|
|
3847
3847
|
rest;
|
|
3848
|
-
constructor(name
|
|
3849
|
-
super(DefinitionType_1.DefinitionType.Parameter, name
|
|
3848
|
+
constructor(name, node, rest) {
|
|
3849
|
+
super(DefinitionType_1.DefinitionType.Parameter, name, node, null);
|
|
3850
3850
|
this.rest = rest;
|
|
3851
3851
|
}
|
|
3852
3852
|
};
|
|
@@ -3863,8 +3863,8 @@ var require_TSEnumMemberDefinition = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
3863
3863
|
var TSEnumMemberDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3864
3864
|
isTypeDefinition = true;
|
|
3865
3865
|
isVariableDefinition = true;
|
|
3866
|
-
constructor(name
|
|
3867
|
-
super(DefinitionType_1.DefinitionType.TSEnumMember, name
|
|
3866
|
+
constructor(name, node) {
|
|
3867
|
+
super(DefinitionType_1.DefinitionType.TSEnumMember, name, node, null);
|
|
3868
3868
|
}
|
|
3869
3869
|
};
|
|
3870
3870
|
exports.TSEnumMemberDefinition = TSEnumMemberDefinition;
|
|
@@ -3880,8 +3880,8 @@ var require_TSEnumNameDefinition = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3880
3880
|
var TSEnumNameDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3881
3881
|
isTypeDefinition = true;
|
|
3882
3882
|
isVariableDefinition = true;
|
|
3883
|
-
constructor(name
|
|
3884
|
-
super(DefinitionType_1.DefinitionType.TSEnumName, name
|
|
3883
|
+
constructor(name, node) {
|
|
3884
|
+
super(DefinitionType_1.DefinitionType.TSEnumName, name, node, null);
|
|
3885
3885
|
}
|
|
3886
3886
|
};
|
|
3887
3887
|
exports.TSEnumNameDefinition = TSEnumNameDefinition;
|
|
@@ -3897,8 +3897,8 @@ var require_TSModuleNameDefinition = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
3897
3897
|
var TSModuleNameDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3898
3898
|
isTypeDefinition = true;
|
|
3899
3899
|
isVariableDefinition = true;
|
|
3900
|
-
constructor(name
|
|
3901
|
-
super(DefinitionType_1.DefinitionType.TSModuleName, name
|
|
3900
|
+
constructor(name, node) {
|
|
3901
|
+
super(DefinitionType_1.DefinitionType.TSModuleName, name, node, null);
|
|
3902
3902
|
}
|
|
3903
3903
|
};
|
|
3904
3904
|
exports.TSModuleNameDefinition = TSModuleNameDefinition;
|
|
@@ -3914,8 +3914,8 @@ var require_TypeDefinition = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3914
3914
|
var TypeDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3915
3915
|
isTypeDefinition = true;
|
|
3916
3916
|
isVariableDefinition = false;
|
|
3917
|
-
constructor(name
|
|
3918
|
-
super(DefinitionType_1.DefinitionType.Type, name
|
|
3917
|
+
constructor(name, node) {
|
|
3918
|
+
super(DefinitionType_1.DefinitionType.Type, name, node, null);
|
|
3919
3919
|
}
|
|
3920
3920
|
};
|
|
3921
3921
|
exports.TypeDefinition = TypeDefinition;
|
|
@@ -3931,8 +3931,8 @@ var require_VariableDefinition = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3931
3931
|
var VariableDefinition = class extends DefinitionBase_1.DefinitionBase {
|
|
3932
3932
|
isTypeDefinition = false;
|
|
3933
3933
|
isVariableDefinition = true;
|
|
3934
|
-
constructor(name
|
|
3935
|
-
super(DefinitionType_1.DefinitionType.Variable, name
|
|
3934
|
+
constructor(name, node, decl) {
|
|
3935
|
+
super(DefinitionType_1.DefinitionType.Variable, name, node, decl);
|
|
3936
3936
|
}
|
|
3937
3937
|
};
|
|
3938
3938
|
exports.VariableDefinition = VariableDefinition;
|
|
@@ -3955,8 +3955,8 @@ var require_definition = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3955
3955
|
if (k2 === void 0) k2 = k;
|
|
3956
3956
|
o[k2] = m[k];
|
|
3957
3957
|
}));
|
|
3958
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
3959
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
3958
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
|
|
3959
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
|
|
3960
3960
|
};
|
|
3961
3961
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3962
3962
|
__exportStar(require_CatchClauseDefinition(), exports);
|
|
@@ -8747,8 +8747,8 @@ var require_VariableBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8747
8747
|
* Reference to the enclosing Scope.
|
|
8748
8748
|
*/
|
|
8749
8749
|
scope;
|
|
8750
|
-
constructor(name
|
|
8751
|
-
this.name = name
|
|
8750
|
+
constructor(name, scope) {
|
|
8751
|
+
this.name = name;
|
|
8752
8752
|
this.scope = scope;
|
|
8753
8753
|
}
|
|
8754
8754
|
};
|
|
@@ -8812,8 +8812,8 @@ var require_ImplicitLibVariable = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8812
8812
|
* `true` if the variable is valid in a value context, false otherwise
|
|
8813
8813
|
*/
|
|
8814
8814
|
isValueVariable;
|
|
8815
|
-
constructor(scope, name
|
|
8816
|
-
super(name
|
|
8815
|
+
constructor(scope, name, { eslintImplicitGlobalSetting, isTypeVariable, isValueVariable, writeable }) {
|
|
8816
|
+
super(name, scope);
|
|
8817
8817
|
this.isTypeVariable = isTypeVariable ?? false;
|
|
8818
8818
|
this.isValueVariable = isValueVariable ?? false;
|
|
8819
8819
|
this.writeable = writeable ?? false;
|
|
@@ -9062,8 +9062,8 @@ var require_ScopeBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9062
9062
|
};
|
|
9063
9063
|
#staticCloseRef = (ref) => {
|
|
9064
9064
|
const resolve = () => {
|
|
9065
|
-
const name
|
|
9066
|
-
const variable = this.set.get(name
|
|
9065
|
+
const name = ref.identifier.name;
|
|
9066
|
+
const variable = this.set.get(name);
|
|
9067
9067
|
if (!variable) return false;
|
|
9068
9068
|
if (!this.isValidResolution(ref, variable)) return false;
|
|
9069
9069
|
const isValidTypeReference = ref.isTypeReference && variable.isTypeVariable;
|
|
@@ -9096,8 +9096,8 @@ var require_ScopeBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9096
9096
|
return VARIABLE_SCOPE_TYPES.has(this.type);
|
|
9097
9097
|
}
|
|
9098
9098
|
shouldStaticallyCloseForGlobal(ref, scopeManager) {
|
|
9099
|
-
const name
|
|
9100
|
-
const variable = this.set.get(name
|
|
9099
|
+
const name = ref.identifier.name;
|
|
9100
|
+
const variable = this.set.get(name);
|
|
9101
9101
|
if (!variable) return false;
|
|
9102
9102
|
if (scopeManager.isModule()) return true;
|
|
9103
9103
|
const defs = variable.defs;
|
|
@@ -9124,11 +9124,11 @@ var require_ScopeBase = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9124
9124
|
* References in default parameters isn't resolved to variables which are in their function body.
|
|
9125
9125
|
*/
|
|
9126
9126
|
defineVariable(nameOrVariable, set, variables, node, def) {
|
|
9127
|
-
const name
|
|
9128
|
-
let variable = set.get(name
|
|
9127
|
+
const name = typeof nameOrVariable === "string" ? nameOrVariable : nameOrVariable.name;
|
|
9128
|
+
let variable = set.get(name);
|
|
9129
9129
|
if (!variable) {
|
|
9130
|
-
variable = typeof nameOrVariable === "string" ? new variable_1.Variable(name
|
|
9131
|
-
set.set(name
|
|
9130
|
+
variable = typeof nameOrVariable === "string" ? new variable_1.Variable(name, this) : nameOrVariable;
|
|
9131
|
+
set.set(name, variable);
|
|
9132
9132
|
variables.push(variable);
|
|
9133
9133
|
}
|
|
9134
9134
|
if (def) {
|
|
@@ -9356,8 +9356,8 @@ var require_GlobalScope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9356
9356
|
this.implicit.leftToBeResolved = this.leftToResolve;
|
|
9357
9357
|
return super.close(scopeManager);
|
|
9358
9358
|
}
|
|
9359
|
-
defineImplicitVariable(name
|
|
9360
|
-
this.defineVariable(new variable_1.ImplicitLibVariable(this, name
|
|
9359
|
+
defineImplicitVariable(name, options) {
|
|
9360
|
+
this.defineVariable(new variable_1.ImplicitLibVariable(this, name, options), this.set, this.variables, null, null);
|
|
9361
9361
|
}
|
|
9362
9362
|
};
|
|
9363
9363
|
exports.GlobalScope = GlobalScope;
|
|
@@ -9499,8 +9499,8 @@ var require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9499
9499
|
if (k2 === void 0) k2 = k;
|
|
9500
9500
|
o[k2] = m[k];
|
|
9501
9501
|
}));
|
|
9502
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
9503
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
9502
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$5) {
|
|
9503
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$5, p)) __createBinding(exports$5, m, p);
|
|
9504
9504
|
};
|
|
9505
9505
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9506
9506
|
__exportStar(require_BlockScope(), exports);
|
|
@@ -10084,7 +10084,7 @@ var require_Referencer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10084
10084
|
}
|
|
10085
10085
|
for (const lib of flattenedLibs) {
|
|
10086
10086
|
for (const referencedLib of lib.libs) flattenedLibs.add(referencedLib);
|
|
10087
|
-
for (const [name
|
|
10087
|
+
for (const [name, variable] of lib.variables) globalScope.defineImplicitVariable(name, variable);
|
|
10088
10088
|
}
|
|
10089
10089
|
globalScope.defineImplicitVariable("const", {
|
|
10090
10090
|
eslintImplicitGlobalSetting: "readonly",
|
|
@@ -10107,10 +10107,10 @@ var require_Referencer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10107
10107
|
/**
|
|
10108
10108
|
* Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself
|
|
10109
10109
|
*/
|
|
10110
|
-
referenceInSomeUpperScope(name
|
|
10110
|
+
referenceInSomeUpperScope(name) {
|
|
10111
10111
|
let scope = this.scopeManager.currentScope;
|
|
10112
10112
|
while (scope) {
|
|
10113
|
-
const variable = scope.set.get(name
|
|
10113
|
+
const variable = scope.set.get(name);
|
|
10114
10114
|
if (!variable) {
|
|
10115
10115
|
scope = scope.upper;
|
|
10116
10116
|
continue;
|
|
@@ -10357,8 +10357,8 @@ var require_Referencer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10357
10357
|
this.scopeManager.nestTSEnumScope(node);
|
|
10358
10358
|
for (const member of node.body.members) {
|
|
10359
10359
|
if (member.id.type === types_1.AST_NODE_TYPES.Literal && typeof member.id.value === "string") {
|
|
10360
|
-
const name
|
|
10361
|
-
this.currentScope().defineLiteralIdentifier(name
|
|
10360
|
+
const name = member.id;
|
|
10361
|
+
this.currentScope().defineLiteralIdentifier(name, new definition_1.TSEnumMemberDefinition(name, member));
|
|
10362
10362
|
} else if (member.id.type === types_1.AST_NODE_TYPES.Identifier) this.currentScope().defineIdentifier(member.id, new definition_1.TSEnumMemberDefinition(member.id, member));
|
|
10363
10363
|
this.visit(member.initializer);
|
|
10364
10364
|
}
|
|
@@ -10695,8 +10695,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10695
10695
|
if (k2 === void 0) k2 = k;
|
|
10696
10696
|
o[k2] = m[k];
|
|
10697
10697
|
}));
|
|
10698
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
10699
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
10698
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$4) {
|
|
10699
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$4, p)) __createBinding(exports$4, m, p);
|
|
10700
10700
|
};
|
|
10701
10701
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10702
10702
|
exports.ScopeManager = exports.Visitor = exports.Reference = exports.PatternVisitor = exports.analyze = void 0;
|
|
@@ -10767,9 +10767,9 @@ var require_Scope = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10767
10767
|
});
|
|
10768
10768
|
var __importStar = exports && exports.__importStar || (function() {
|
|
10769
10769
|
var ownKeys = function(o) {
|
|
10770
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
10770
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
10771
10771
|
var ar = [];
|
|
10772
|
-
for (var k in o
|
|
10772
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
10773
10773
|
return ar;
|
|
10774
10774
|
};
|
|
10775
10775
|
return ownKeys(o);
|
|
@@ -10821,8 +10821,8 @@ var require_ts_eslint = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10821
10821
|
if (k2 === void 0) k2 = k;
|
|
10822
10822
|
o[k2] = m[k];
|
|
10823
10823
|
}));
|
|
10824
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
10825
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
10824
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$3) {
|
|
10825
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$3, p)) __createBinding(exports$3, m, p);
|
|
10826
10826
|
};
|
|
10827
10827
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10828
10828
|
__exportStar(require_AST(), exports);
|
|
@@ -10871,8 +10871,8 @@ var require_ts_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10871
10871
|
if (k2 === void 0) k2 = k;
|
|
10872
10872
|
o[k2] = m[k];
|
|
10873
10873
|
}));
|
|
10874
|
-
var __exportStar = exports && exports.__exportStar || function(m, exports$
|
|
10875
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$
|
|
10874
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports$2) {
|
|
10875
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$2, p)) __createBinding(exports$2, m, p);
|
|
10876
10876
|
};
|
|
10877
10877
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10878
10878
|
__exportStar(require_isArray(), exports);
|
|
@@ -10906,9 +10906,9 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10906
10906
|
});
|
|
10907
10907
|
var __importStar = exports && exports.__importStar || (function() {
|
|
10908
10908
|
var ownKeys = function(o) {
|
|
10909
|
-
ownKeys = Object.getOwnPropertyNames || function(o
|
|
10909
|
+
ownKeys = Object.getOwnPropertyNames || function(o) {
|
|
10910
10910
|
var ar = [];
|
|
10911
|
-
for (var k in o
|
|
10911
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
10912
10912
|
return ar;
|
|
10913
10913
|
};
|
|
10914
10914
|
return ownKeys(o);
|
|
@@ -10939,14 +10939,14 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10939
10939
|
//#endregion
|
|
10940
10940
|
//#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/utils.js
|
|
10941
10941
|
var import_dist = require_dist();
|
|
10942
|
-
const createRule = import_dist.ESLintUtils.RuleCreator((name
|
|
10942
|
+
const createRule = import_dist.ESLintUtils.RuleCreator((name) => `https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/${name}.md`);
|
|
10943
10943
|
|
|
10944
10944
|
//#endregion
|
|
10945
10945
|
//#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.53.0_eslint@9.39.2_24da780f368b860d5b1e09d753136340/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/enums.js
|
|
10946
10946
|
const rule$3 = createRule({
|
|
10947
10947
|
create(context) {
|
|
10948
10948
|
return { TSEnumDeclaration(node) {
|
|
10949
|
-
const name
|
|
10949
|
+
const name = node.id.name;
|
|
10950
10950
|
const isExported = node.parent.type === import_dist.AST_NODE_TYPES.ExportNamedDeclaration;
|
|
10951
10951
|
let canSuggestion = true;
|
|
10952
10952
|
const body = [];
|
|
@@ -10980,7 +10980,7 @@ const rule$3 = createRule({
|
|
|
10980
10980
|
fixer.insertTextAfter(node.body, " as const"),
|
|
10981
10981
|
fixer.insertTextAfter(node.parent.parent ?? node.parent, `
|
|
10982
10982
|
|
|
10983
|
-
${isExported ? "export " : ""}type ${name
|
|
10983
|
+
${isExported ? "export " : ""}type ${name} = typeof ${name}[keyof typeof ${name}]`)
|
|
10984
10984
|
];
|
|
10985
10985
|
},
|
|
10986
10986
|
messageId: "enumFix"
|
|
@@ -11148,7 +11148,7 @@ const plugin = {
|
|
|
11148
11148
|
};
|
|
11149
11149
|
const recommended = {
|
|
11150
11150
|
plugins: { "erasable-syntax-only": plugin },
|
|
11151
|
-
rules: Object.fromEntries(Object.keys(rules).map((rule
|
|
11151
|
+
rules: Object.fromEntries(Object.keys(rules).map((rule) => [`erasable-syntax-only/${rule}`, "error"]))
|
|
11152
11152
|
};
|
|
11153
11153
|
var index_default = plugin;
|
|
11154
11154
|
|