eslint-linter-browserify 9.1.1 → 9.3.0

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.
Files changed (5) hide show
  1. package/linter.cjs +570 -383
  2. package/linter.js +571 -387
  3. package/linter.min.js +2 -9
  4. package/linter.mjs +570 -383
  5. package/package.json +5 -5
package/linter.cjs CHANGED
@@ -4,6 +4,9 @@ if (!global) { var global = globalThis || window; }
4
4
 
5
5
  Object.defineProperty(exports, '__esModule', { value: true });
6
6
 
7
+ var require$$0$5 = require('node:path');
8
+ var require$$0$4 = require('node:assert');
9
+
7
10
  function getDefaultExportFromNamespaceIfPresent (n) {
8
11
  return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
9
12
  }
@@ -236,256 +239,6 @@ var browser$1$1 = {
236
239
  uptime: uptime
237
240
  };
238
241
 
239
- // Copyright Joyent, Inc. and other Node contributors.
240
- //
241
- // Permission is hereby granted, free of charge, to any person obtaining a
242
- // copy of this software and associated documentation files (the
243
- // "Software"), to deal in the Software without restriction, including
244
- // without limitation the rights to use, copy, modify, merge, publish,
245
- // distribute, sublicense, and/or sell copies of the Software, and to permit
246
- // persons to whom the Software is furnished to do so, subject to the
247
- // following conditions:
248
- //
249
- // The above copyright notice and this permission notice shall be included
250
- // in all copies or substantial portions of the Software.
251
- //
252
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
253
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
254
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
255
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
256
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
257
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
258
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
259
-
260
- // resolves . and .. elements in a path array with directory names there
261
- // must be no slashes, empty elements, or device names (c:\) in the array
262
- // (so also no leading and trailing slashes - it does not distinguish
263
- // relative and absolute paths)
264
- function normalizeArray(parts, allowAboveRoot) {
265
- // if the path tries to go above the root, `up` ends up > 0
266
- var up = 0;
267
- for (var i = parts.length - 1; i >= 0; i--) {
268
- var last = parts[i];
269
- if (last === '.') {
270
- parts.splice(i, 1);
271
- } else if (last === '..') {
272
- parts.splice(i, 1);
273
- up++;
274
- } else if (up) {
275
- parts.splice(i, 1);
276
- up--;
277
- }
278
- }
279
-
280
- // if the path is allowed to go above the root, restore leading ..s
281
- if (allowAboveRoot) {
282
- for (; up--; up) {
283
- parts.unshift('..');
284
- }
285
- }
286
-
287
- return parts;
288
- }
289
-
290
- // Split a filename into [root, dir, basename, ext], unix version
291
- // 'root' is just a slash, or nothing.
292
- var splitPathRe =
293
- /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
294
- var splitPath = function(filename) {
295
- return splitPathRe.exec(filename).slice(1);
296
- };
297
-
298
- // path.resolve([from ...], to)
299
- // posix version
300
- function resolve() {
301
- var resolvedPath = '',
302
- resolvedAbsolute = false;
303
-
304
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
305
- var path = (i >= 0) ? arguments[i] : '/';
306
-
307
- // Skip empty and invalid entries
308
- if (typeof path !== 'string') {
309
- throw new TypeError('Arguments to path.resolve must be strings');
310
- } else if (!path) {
311
- continue;
312
- }
313
-
314
- resolvedPath = path + '/' + resolvedPath;
315
- resolvedAbsolute = path.charAt(0) === '/';
316
- }
317
-
318
- // At this point the path should be resolved to a full absolute path, but
319
- // handle relative paths to be safe (might happen when process.cwd() fails)
320
-
321
- // Normalize the path
322
- resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
323
- return !!p;
324
- }), !resolvedAbsolute).join('/');
325
-
326
- return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
327
- }
328
- // path.normalize(path)
329
- // posix version
330
- function normalize(path) {
331
- var isPathAbsolute = isAbsolute(path),
332
- trailingSlash = substr(path, -1) === '/';
333
-
334
- // Normalize the path
335
- path = normalizeArray(filter(path.split('/'), function(p) {
336
- return !!p;
337
- }), !isPathAbsolute).join('/');
338
-
339
- if (!path && !isPathAbsolute) {
340
- path = '.';
341
- }
342
- if (path && trailingSlash) {
343
- path += '/';
344
- }
345
-
346
- return (isPathAbsolute ? '/' : '') + path;
347
- }
348
- // posix version
349
- function isAbsolute(path) {
350
- return path.charAt(0) === '/';
351
- }
352
-
353
- // posix version
354
- function join() {
355
- var paths = Array.prototype.slice.call(arguments, 0);
356
- return normalize(filter(paths, function(p, index) {
357
- if (typeof p !== 'string') {
358
- throw new TypeError('Arguments to path.join must be strings');
359
- }
360
- return p;
361
- }).join('/'));
362
- }
363
-
364
-
365
- // path.relative(from, to)
366
- // posix version
367
- function relative(from, to) {
368
- from = resolve(from).substr(1);
369
- to = resolve(to).substr(1);
370
-
371
- function trim(arr) {
372
- var start = 0;
373
- for (; start < arr.length; start++) {
374
- if (arr[start] !== '') break;
375
- }
376
-
377
- var end = arr.length - 1;
378
- for (; end >= 0; end--) {
379
- if (arr[end] !== '') break;
380
- }
381
-
382
- if (start > end) return [];
383
- return arr.slice(start, end - start + 1);
384
- }
385
-
386
- var fromParts = trim(from.split('/'));
387
- var toParts = trim(to.split('/'));
388
-
389
- var length = Math.min(fromParts.length, toParts.length);
390
- var samePartsLength = length;
391
- for (var i = 0; i < length; i++) {
392
- if (fromParts[i] !== toParts[i]) {
393
- samePartsLength = i;
394
- break;
395
- }
396
- }
397
-
398
- var outputParts = [];
399
- for (var i = samePartsLength; i < fromParts.length; i++) {
400
- outputParts.push('..');
401
- }
402
-
403
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
404
-
405
- return outputParts.join('/');
406
- }
407
-
408
- var sep = '/';
409
- var delimiter = ':';
410
-
411
- function dirname(path) {
412
- var result = splitPath(path),
413
- root = result[0],
414
- dir = result[1];
415
-
416
- if (!root && !dir) {
417
- // No dirname whatsoever
418
- return '.';
419
- }
420
-
421
- if (dir) {
422
- // It has a dirname, strip trailing slash
423
- dir = dir.substr(0, dir.length - 1);
424
- }
425
-
426
- return root + dir;
427
- }
428
-
429
- function basename(path, ext) {
430
- var f = splitPath(path)[2];
431
- // TODO: make this comparison case-insensitive on windows?
432
- if (ext && f.substr(-1 * ext.length) === ext) {
433
- f = f.substr(0, f.length - ext.length);
434
- }
435
- return f;
436
- }
437
-
438
-
439
- function extname(path) {
440
- return splitPath(path)[3];
441
- }
442
- var _polyfillNode_path = {
443
- extname: extname,
444
- basename: basename,
445
- dirname: dirname,
446
- sep: sep,
447
- delimiter: delimiter,
448
- relative: relative,
449
- join: join,
450
- isAbsolute: isAbsolute,
451
- normalize: normalize,
452
- resolve: resolve
453
- };
454
- function filter (xs, f) {
455
- if (xs.filter) return xs.filter(f);
456
- var res = [];
457
- for (var i = 0; i < xs.length; i++) {
458
- if (f(xs[i], i, xs)) res.push(xs[i]);
459
- }
460
- return res;
461
- }
462
-
463
- // String.prototype.substr - negative index don't work in IE8
464
- var substr = 'ab'.substr(-1) === 'b' ?
465
- function (str, start, len) { return str.substr(start, len) } :
466
- function (str, start, len) {
467
- if (start < 0) start = str.length + start;
468
- return str.substr(start, len);
469
- }
470
- ;
471
-
472
- var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
473
- __proto__: null,
474
- basename: basename,
475
- default: _polyfillNode_path,
476
- delimiter: delimiter,
477
- dirname: dirname,
478
- extname: extname,
479
- isAbsolute: isAbsolute,
480
- join: join,
481
- normalize: normalize,
482
- relative: relative,
483
- resolve: resolve,
484
- sep: sep
485
- });
486
-
487
- var require$$0$3 = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(_polyfillNode_path$1);
488
-
489
242
  var eslintScope = {};
490
243
 
491
244
  var lookup = [];
@@ -3670,7 +3423,7 @@ var _polyfillNode_assert = /*#__PURE__*/Object.freeze({
3670
3423
  throws: throws
3671
3424
  });
3672
3425
 
3673
- var require$$0$2 = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(_polyfillNode_assert);
3426
+ var require$$0$3 = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(_polyfillNode_assert);
3674
3427
 
3675
3428
  var estraverse = {};
3676
3429
 
@@ -4690,7 +4443,7 @@ function requireEslintScope () {
4690
4443
 
4691
4444
  Object.defineProperty(eslintScope, '__esModule', { value: true });
4692
4445
 
4693
- var assert = require$$0$2;
4446
+ var assert = require$$0$3;
4694
4447
  var estraverse = requireEstraverse();
4695
4448
  var esrecurse = requireEsrecurse();
4696
4449
 
@@ -17382,7 +17135,7 @@ function requireLodash_merge () {
17382
17135
  }
17383
17136
 
17384
17137
  var name = "eslint";
17385
- var version = "9.1.1";
17138
+ var version = "9.3.0";
17386
17139
  var author = "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>";
17387
17140
  var description$2 = "An AST-based pattern checker for JavaScript.";
17388
17141
  var bin = {
@@ -17436,11 +17189,11 @@ var bugs = "https://github.com/eslint/eslint/issues/";
17436
17189
  var dependencies$2 = {
17437
17190
  "@eslint-community/eslint-utils": "^4.2.0",
17438
17191
  "@eslint-community/regexpp": "^4.6.1",
17439
- "@eslint/eslintrc": "^3.0.2",
17440
- "@eslint/js": "9.1.1",
17192
+ "@eslint/eslintrc": "^3.1.0",
17193
+ "@eslint/js": "9.3.0",
17441
17194
  "@humanwhocodes/config-array": "^0.13.0",
17442
17195
  "@humanwhocodes/module-importer": "^1.0.1",
17443
- "@humanwhocodes/retry": "^0.2.3",
17196
+ "@humanwhocodes/retry": "^0.3.0",
17444
17197
  "@nodelib/fs.walk": "^1.2.8",
17445
17198
  ajv: "^6.12.4",
17446
17199
  chalk: "^4.0.0",
@@ -17472,6 +17225,7 @@ var dependencies$2 = {
17472
17225
  var devDependencies = {
17473
17226
  "@babel/core": "^7.4.3",
17474
17227
  "@babel/preset-env": "^7.4.3",
17228
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
17475
17229
  "@types/estree": "^1.0.5",
17476
17230
  "@types/node": "^20.11.5",
17477
17231
  "@wdio/browser-runner": "^8.14.6",
@@ -17488,12 +17242,11 @@ var devDependencies = {
17488
17242
  ejs: "^3.0.2",
17489
17243
  eslint: "file:.",
17490
17244
  "eslint-config-eslint": "file:packages/eslint-config-eslint",
17491
- "eslint-plugin-eslint-comments": "^3.2.0",
17492
17245
  "eslint-plugin-eslint-plugin": "^6.0.0",
17493
17246
  "eslint-plugin-internal-rules": "file:tools/internal-rules",
17494
- "eslint-plugin-jsdoc": "^46.9.0",
17495
- "eslint-plugin-n": "^16.6.0",
17496
- "eslint-plugin-unicorn": "^49.0.0",
17247
+ "eslint-plugin-jsdoc": "^48.2.3",
17248
+ "eslint-plugin-n": "^17.2.0",
17249
+ "eslint-plugin-unicorn": "^52.0.0",
17497
17250
  "eslint-release": "^3.2.2",
17498
17251
  eslump: "^3.0.0",
17499
17252
  esprima: "^4.0.1",
@@ -17510,7 +17263,7 @@ var devDependencies = {
17510
17263
  "markdown-it": "^12.2.0",
17511
17264
  "markdown-it-container": "^3.0.0",
17512
17265
  markdownlint: "^0.34.0",
17513
- "markdownlint-cli": "^0.39.0",
17266
+ "markdownlint-cli": "^0.40.0",
17514
17267
  marked: "^4.0.8",
17515
17268
  metascraper: "^5.25.7",
17516
17269
  "metascraper-description": "^5.25.7",
@@ -17649,6 +17402,256 @@ var eslintrcUniversal = {};
17649
17402
 
17650
17403
  var require$$1$1 = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(_polyfillNode_util$1);
17651
17404
 
17405
+ // Copyright Joyent, Inc. and other Node contributors.
17406
+ //
17407
+ // Permission is hereby granted, free of charge, to any person obtaining a
17408
+ // copy of this software and associated documentation files (the
17409
+ // "Software"), to deal in the Software without restriction, including
17410
+ // without limitation the rights to use, copy, modify, merge, publish,
17411
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
17412
+ // persons to whom the Software is furnished to do so, subject to the
17413
+ // following conditions:
17414
+ //
17415
+ // The above copyright notice and this permission notice shall be included
17416
+ // in all copies or substantial portions of the Software.
17417
+ //
17418
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17419
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17420
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17421
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17422
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17423
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
17424
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
17425
+
17426
+ // resolves . and .. elements in a path array with directory names there
17427
+ // must be no slashes, empty elements, or device names (c:\) in the array
17428
+ // (so also no leading and trailing slashes - it does not distinguish
17429
+ // relative and absolute paths)
17430
+ function normalizeArray(parts, allowAboveRoot) {
17431
+ // if the path tries to go above the root, `up` ends up > 0
17432
+ var up = 0;
17433
+ for (var i = parts.length - 1; i >= 0; i--) {
17434
+ var last = parts[i];
17435
+ if (last === '.') {
17436
+ parts.splice(i, 1);
17437
+ } else if (last === '..') {
17438
+ parts.splice(i, 1);
17439
+ up++;
17440
+ } else if (up) {
17441
+ parts.splice(i, 1);
17442
+ up--;
17443
+ }
17444
+ }
17445
+
17446
+ // if the path is allowed to go above the root, restore leading ..s
17447
+ if (allowAboveRoot) {
17448
+ for (; up--; up) {
17449
+ parts.unshift('..');
17450
+ }
17451
+ }
17452
+
17453
+ return parts;
17454
+ }
17455
+
17456
+ // Split a filename into [root, dir, basename, ext], unix version
17457
+ // 'root' is just a slash, or nothing.
17458
+ var splitPathRe =
17459
+ /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
17460
+ var splitPath = function(filename) {
17461
+ return splitPathRe.exec(filename).slice(1);
17462
+ };
17463
+
17464
+ // path.resolve([from ...], to)
17465
+ // posix version
17466
+ function resolve() {
17467
+ var resolvedPath = '',
17468
+ resolvedAbsolute = false;
17469
+
17470
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
17471
+ var path = (i >= 0) ? arguments[i] : '/';
17472
+
17473
+ // Skip empty and invalid entries
17474
+ if (typeof path !== 'string') {
17475
+ throw new TypeError('Arguments to path.resolve must be strings');
17476
+ } else if (!path) {
17477
+ continue;
17478
+ }
17479
+
17480
+ resolvedPath = path + '/' + resolvedPath;
17481
+ resolvedAbsolute = path.charAt(0) === '/';
17482
+ }
17483
+
17484
+ // At this point the path should be resolved to a full absolute path, but
17485
+ // handle relative paths to be safe (might happen when process.cwd() fails)
17486
+
17487
+ // Normalize the path
17488
+ resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
17489
+ return !!p;
17490
+ }), !resolvedAbsolute).join('/');
17491
+
17492
+ return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
17493
+ }
17494
+ // path.normalize(path)
17495
+ // posix version
17496
+ function normalize(path) {
17497
+ var isPathAbsolute = isAbsolute(path),
17498
+ trailingSlash = substr(path, -1) === '/';
17499
+
17500
+ // Normalize the path
17501
+ path = normalizeArray(filter(path.split('/'), function(p) {
17502
+ return !!p;
17503
+ }), !isPathAbsolute).join('/');
17504
+
17505
+ if (!path && !isPathAbsolute) {
17506
+ path = '.';
17507
+ }
17508
+ if (path && trailingSlash) {
17509
+ path += '/';
17510
+ }
17511
+
17512
+ return (isPathAbsolute ? '/' : '') + path;
17513
+ }
17514
+ // posix version
17515
+ function isAbsolute(path) {
17516
+ return path.charAt(0) === '/';
17517
+ }
17518
+
17519
+ // posix version
17520
+ function join() {
17521
+ var paths = Array.prototype.slice.call(arguments, 0);
17522
+ return normalize(filter(paths, function(p, index) {
17523
+ if (typeof p !== 'string') {
17524
+ throw new TypeError('Arguments to path.join must be strings');
17525
+ }
17526
+ return p;
17527
+ }).join('/'));
17528
+ }
17529
+
17530
+
17531
+ // path.relative(from, to)
17532
+ // posix version
17533
+ function relative(from, to) {
17534
+ from = resolve(from).substr(1);
17535
+ to = resolve(to).substr(1);
17536
+
17537
+ function trim(arr) {
17538
+ var start = 0;
17539
+ for (; start < arr.length; start++) {
17540
+ if (arr[start] !== '') break;
17541
+ }
17542
+
17543
+ var end = arr.length - 1;
17544
+ for (; end >= 0; end--) {
17545
+ if (arr[end] !== '') break;
17546
+ }
17547
+
17548
+ if (start > end) return [];
17549
+ return arr.slice(start, end - start + 1);
17550
+ }
17551
+
17552
+ var fromParts = trim(from.split('/'));
17553
+ var toParts = trim(to.split('/'));
17554
+
17555
+ var length = Math.min(fromParts.length, toParts.length);
17556
+ var samePartsLength = length;
17557
+ for (var i = 0; i < length; i++) {
17558
+ if (fromParts[i] !== toParts[i]) {
17559
+ samePartsLength = i;
17560
+ break;
17561
+ }
17562
+ }
17563
+
17564
+ var outputParts = [];
17565
+ for (var i = samePartsLength; i < fromParts.length; i++) {
17566
+ outputParts.push('..');
17567
+ }
17568
+
17569
+ outputParts = outputParts.concat(toParts.slice(samePartsLength));
17570
+
17571
+ return outputParts.join('/');
17572
+ }
17573
+
17574
+ var sep = '/';
17575
+ var delimiter = ':';
17576
+
17577
+ function dirname(path) {
17578
+ var result = splitPath(path),
17579
+ root = result[0],
17580
+ dir = result[1];
17581
+
17582
+ if (!root && !dir) {
17583
+ // No dirname whatsoever
17584
+ return '.';
17585
+ }
17586
+
17587
+ if (dir) {
17588
+ // It has a dirname, strip trailing slash
17589
+ dir = dir.substr(0, dir.length - 1);
17590
+ }
17591
+
17592
+ return root + dir;
17593
+ }
17594
+
17595
+ function basename(path, ext) {
17596
+ var f = splitPath(path)[2];
17597
+ // TODO: make this comparison case-insensitive on windows?
17598
+ if (ext && f.substr(-1 * ext.length) === ext) {
17599
+ f = f.substr(0, f.length - ext.length);
17600
+ }
17601
+ return f;
17602
+ }
17603
+
17604
+
17605
+ function extname(path) {
17606
+ return splitPath(path)[3];
17607
+ }
17608
+ var _polyfillNode_path = {
17609
+ extname: extname,
17610
+ basename: basename,
17611
+ dirname: dirname,
17612
+ sep: sep,
17613
+ delimiter: delimiter,
17614
+ relative: relative,
17615
+ join: join,
17616
+ isAbsolute: isAbsolute,
17617
+ normalize: normalize,
17618
+ resolve: resolve
17619
+ };
17620
+ function filter (xs, f) {
17621
+ if (xs.filter) return xs.filter(f);
17622
+ var res = [];
17623
+ for (var i = 0; i < xs.length; i++) {
17624
+ if (f(xs[i], i, xs)) res.push(xs[i]);
17625
+ }
17626
+ return res;
17627
+ }
17628
+
17629
+ // String.prototype.substr - negative index don't work in IE8
17630
+ var substr = 'ab'.substr(-1) === 'b' ?
17631
+ function (str, start, len) { return str.substr(start, len) } :
17632
+ function (str, start, len) {
17633
+ if (start < 0) start = str.length + start;
17634
+ return str.substr(start, len);
17635
+ }
17636
+ ;
17637
+
17638
+ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
17639
+ __proto__: null,
17640
+ basename: basename,
17641
+ default: _polyfillNode_path,
17642
+ delimiter: delimiter,
17643
+ dirname: dirname,
17644
+ extname: extname,
17645
+ isAbsolute: isAbsolute,
17646
+ join: join,
17647
+ normalize: normalize,
17648
+ relative: relative,
17649
+ resolve: resolve,
17650
+ sep: sep
17651
+ });
17652
+
17653
+ var require$$0$2 = /*@__PURE__*/getDefaultExportFromNamespaceIfPresent(_polyfillNode_path$1);
17654
+
17652
17655
  var uri_all = {exports: {}};
17653
17656
 
17654
17657
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
@@ -27201,7 +27204,7 @@ function requireEslintrcUniversal () {
27201
27204
  Object.defineProperty(eslintrcUniversal, '__esModule', { value: true });
27202
27205
 
27203
27206
  var util = require$$1$1;
27204
- var path = require$$0$3;
27207
+ var path = require$$0$2;
27205
27208
  var Ajv = requireAjv$1();
27206
27209
  var globals = requireGlobals$1();
27207
27210
 
@@ -32796,7 +32799,7 @@ function requireTokenStore () {
32796
32799
  // Requirements
32797
32800
  //------------------------------------------------------------------------------
32798
32801
 
32799
- const assert = require$$0$2;
32802
+ const assert = require$$0$4;
32800
32803
  const { isCommentToken } = requireEslintUtils();
32801
32804
  const cursors = requireCursors();
32802
32805
  const ForwardTokenCursor = requireForwardTokenCursor();
@@ -34081,7 +34084,7 @@ function requireForkContext () {
34081
34084
  // Requirements
34082
34085
  //------------------------------------------------------------------------------
34083
34086
 
34084
- const assert = require$$0$2,
34087
+ const assert = require$$0$4,
34085
34088
  CodePathSegment = requireCodePathSegment();
34086
34089
 
34087
34090
  //------------------------------------------------------------------------------
@@ -37195,7 +37198,7 @@ function requireCodePathAnalyzer () {
37195
37198
  // Requirements
37196
37199
  //------------------------------------------------------------------------------
37197
37200
 
37198
- const assert = require$$0$2,
37201
+ const assert = require$$0$4,
37199
37202
  { breakableTypePattern } = requireAstUtils$1(),
37200
37203
  CodePath = requireCodePath(),
37201
37204
  CodePathSegment = requireCodePathSegment(),
@@ -41603,7 +41606,7 @@ function requireSourceCode$1 () {
41603
41606
  * https://github.com/eslint/eslint/issues/16302
41604
41607
  */
41605
41608
  const configGlobals = Object.assign(
41606
- {},
41609
+ Object.create(null), // https://github.com/eslint/eslint/issues/18363
41607
41610
  getGlobalsForEcmaVersion(languageOptions.ecmaVersion),
41608
41611
  languageOptions.sourceType === "commonjs" ? globals.commonjs : void 0,
41609
41612
  languageOptions.globals
@@ -42934,7 +42937,7 @@ function requireReportTranslator () {
42934
42937
  // Requirements
42935
42938
  //------------------------------------------------------------------------------
42936
42939
 
42937
- const assert = require$$0$2;
42940
+ const assert = require$$0$4;
42938
42941
  const ruleFixer = requireRuleFixer();
42939
42942
  const { interpolate } = requireInterpolate();
42940
42943
 
@@ -49715,25 +49718,6 @@ function requireCamelcase () {
49715
49718
  return camelcase;
49716
49719
  }
49717
49720
 
49718
- /**
49719
- * @fileoverview Pattern for detecting any letter (even letters outside of ASCII).
49720
- * NOTE: This file was generated using this script in JSCS based on the Unicode 7.0.0 standard: https://github.com/jscs-dev/node-jscs/blob/f5ed14427deb7e7aac84f3056a5aab2d9f3e563e/publish/helpers/generate-patterns.js
49721
- * Do not edit this file by hand-- please use https://github.com/mathiasbynens/regenerate to regenerate the regular expression exported from this file.
49722
- * @author Kevin Partington
49723
- * @license MIT License (from JSCS). See below.
49724
- */
49725
-
49726
- var letters;
49727
- var hasRequiredLetters;
49728
-
49729
- function requireLetters () {
49730
- if (hasRequiredLetters) return letters;
49731
- hasRequiredLetters = 1;
49732
-
49733
- letters = /[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/u;
49734
- return letters;
49735
- }
49736
-
49737
49721
  /**
49738
49722
  * @fileoverview enforce or disallow capitalization of the first letter of a comment
49739
49723
  * @author Kevin Partington
@@ -49750,7 +49734,6 @@ function requireCapitalizedComments () {
49750
49734
  // Requirements
49751
49735
  //------------------------------------------------------------------------------
49752
49736
 
49753
- const LETTER_PATTERN = requireLetters();
49754
49737
  const astUtils = requireAstUtils();
49755
49738
 
49756
49739
  //------------------------------------------------------------------------------
@@ -49759,7 +49742,8 @@ function requireCapitalizedComments () {
49759
49742
 
49760
49743
  const DEFAULT_IGNORE_PATTERN = astUtils.COMMENTS_IGNORE_PATTERN,
49761
49744
  WHITESPACE = /\s/gu,
49762
- MAYBE_URL = /^\s*[^:/?#\s]+:\/\/[^?#]/u; // TODO: Combine w/ max-len pattern?
49745
+ MAYBE_URL = /^\s*[^:/?#\s]+:\/\/[^?#]/u, // TODO: Combine w/ max-len pattern?
49746
+ LETTER_PATTERN = /\p{L}/u;
49763
49747
 
49764
49748
  /*
49765
49749
  * Base schema body for defining the basic capitalization rule, ignorePattern,
@@ -49975,7 +49959,8 @@ function requireCapitalizedComments () {
49975
49959
  return true;
49976
49960
  }
49977
49961
 
49978
- const firstWordChar = commentWordCharsOnly[0];
49962
+ // Get the first Unicode character (1 or 2 code units).
49963
+ const [firstWordChar] = commentWordCharsOnly;
49979
49964
 
49980
49965
  if (!LETTER_PATTERN.test(firstWordChar)) {
49981
49966
  return true;
@@ -50015,12 +50000,14 @@ function requireCapitalizedComments () {
50015
50000
  messageId,
50016
50001
  fix(fixer) {
50017
50002
  const match = comment.value.match(LETTER_PATTERN);
50003
+ const char = match[0];
50018
50004
 
50019
- return fixer.replaceTextRange(
50005
+ // Offset match.index by 2 to account for the first 2 characters that start the comment (// or /*)
50006
+ const charIndex = comment.range[0] + match.index + 2;
50020
50007
 
50021
- // Offset match.index by 2 to account for the first 2 characters that start the comment (// or /*)
50022
- [comment.range[0] + match.index + 2, comment.range[0] + match.index + 3],
50023
- capitalize === "always" ? match[0].toLocaleUpperCase() : match[0].toLocaleLowerCase()
50008
+ return fixer.replaceTextRange(
50009
+ [charIndex, charIndex + char.length],
50010
+ capitalize === "always" ? char.toLocaleUpperCase() : char.toLocaleLowerCase()
50024
50011
  );
50025
50012
  }
50026
50013
  });
@@ -54733,6 +54720,15 @@ function requireFuncStyle () {
54733
54720
  allowArrowFunctions: {
54734
54721
  type: "boolean",
54735
54722
  default: false
54723
+ },
54724
+ overrides: {
54725
+ type: "object",
54726
+ properties: {
54727
+ namedExports: {
54728
+ enum: ["declaration", "expression", "ignore"]
54729
+ }
54730
+ },
54731
+ additionalProperties: false
54736
54732
  }
54737
54733
  },
54738
54734
  additionalProperties: false
@@ -54750,13 +54746,22 @@ function requireFuncStyle () {
54750
54746
  const style = context.options[0],
54751
54747
  allowArrowFunctions = context.options[1] && context.options[1].allowArrowFunctions,
54752
54748
  enforceDeclarations = (style === "declaration"),
54749
+ exportFunctionStyle = context.options[1] && context.options[1].overrides && context.options[1].overrides.namedExports,
54753
54750
  stack = [];
54754
54751
 
54755
54752
  const nodesToCheck = {
54756
54753
  FunctionDeclaration(node) {
54757
54754
  stack.push(false);
54758
54755
 
54759
- if (!enforceDeclarations && node.parent.type !== "ExportDefaultDeclaration") {
54756
+ if (
54757
+ !enforceDeclarations &&
54758
+ node.parent.type !== "ExportDefaultDeclaration" &&
54759
+ (typeof exportFunctionStyle === "undefined" || node.parent.type !== "ExportNamedDeclaration")
54760
+ ) {
54761
+ context.report({ node, messageId: "expression" });
54762
+ }
54763
+
54764
+ if (node.parent.type === "ExportNamedDeclaration" && exportFunctionStyle === "expression") {
54760
54765
  context.report({ node, messageId: "expression" });
54761
54766
  }
54762
54767
  },
@@ -54767,7 +54772,18 @@ function requireFuncStyle () {
54767
54772
  FunctionExpression(node) {
54768
54773
  stack.push(false);
54769
54774
 
54770
- if (enforceDeclarations && node.parent.type === "VariableDeclarator") {
54775
+ if (
54776
+ enforceDeclarations &&
54777
+ node.parent.type === "VariableDeclarator" &&
54778
+ (typeof exportFunctionStyle === "undefined" || node.parent.parent.parent.type !== "ExportNamedDeclaration")
54779
+ ) {
54780
+ context.report({ node: node.parent, messageId: "declaration" });
54781
+ }
54782
+
54783
+ if (
54784
+ node.parent.type === "VariableDeclarator" && node.parent.parent.parent.type === "ExportNamedDeclaration" &&
54785
+ exportFunctionStyle === "declaration"
54786
+ ) {
54771
54787
  context.report({ node: node.parent, messageId: "declaration" });
54772
54788
  }
54773
54789
  },
@@ -54790,8 +54806,17 @@ function requireFuncStyle () {
54790
54806
  nodesToCheck["ArrowFunctionExpression:exit"] = function(node) {
54791
54807
  const hasThisExpr = stack.pop();
54792
54808
 
54793
- if (enforceDeclarations && !hasThisExpr && node.parent.type === "VariableDeclarator") {
54794
- context.report({ node: node.parent, messageId: "declaration" });
54809
+ if (!hasThisExpr && node.parent.type === "VariableDeclarator") {
54810
+ if (
54811
+ enforceDeclarations &&
54812
+ (typeof exportFunctionStyle === "undefined" || node.parent.parent.parent.type !== "ExportNamedDeclaration")
54813
+ ) {
54814
+ context.report({ node: node.parent, messageId: "declaration" });
54815
+ }
54816
+
54817
+ if (node.parent.parent.parent.type === "ExportNamedDeclaration" && exportFunctionStyle === "declaration") {
54818
+ context.report({ node: node.parent, messageId: "declaration" });
54819
+ }
54795
54820
  }
54796
54821
  };
54797
54822
  }
@@ -61788,6 +61813,7 @@ function requireKeywordSpacing () {
61788
61813
  /**
61789
61814
  * @fileoverview Rule to enforce the position of line comments
61790
61815
  * @author Alberto Rodríguez
61816
+ * @deprecated in ESLint v9.3.0
61791
61817
  */
61792
61818
 
61793
61819
  var lineCommentPosition;
@@ -61806,6 +61832,8 @@ function requireLineCommentPosition () {
61806
61832
  /** @type {import('../shared/types').Rule} */
61807
61833
  lineCommentPosition = {
61808
61834
  meta: {
61835
+ deprecated: true,
61836
+ replacedBy: [],
61809
61837
  type: "layout",
61810
61838
 
61811
61839
  docs: {
@@ -65284,6 +65312,7 @@ function requireMaxStatementsPerLine () {
65284
65312
  /**
65285
65313
  * @fileoverview enforce a particular style for multiline comments
65286
65314
  * @author Teddy Katz
65315
+ * @deprecated in ESLint v9.3.0
65287
65316
  */
65288
65317
 
65289
65318
  var multilineCommentStyle;
@@ -65302,8 +65331,9 @@ function requireMultilineCommentStyle () {
65302
65331
  /** @type {import('../shared/types').Rule} */
65303
65332
  multilineCommentStyle = {
65304
65333
  meta: {
65334
+ deprecated: true,
65335
+ replacedBy: [],
65305
65336
  type: "suggestion",
65306
-
65307
65337
  docs: {
65308
65338
  description: "Enforce a particular style for multiline comments",
65309
65339
  recommended: false,
@@ -67670,9 +67700,12 @@ function requireNoCaseDeclarations () {
67670
67700
  url: "https://eslint.org/docs/latest/rules/no-case-declarations"
67671
67701
  },
67672
67702
 
67703
+ hasSuggestions: true,
67704
+
67673
67705
  schema: [],
67674
67706
 
67675
67707
  messages: {
67708
+ addBrackets: "Add {} brackets around the case block.",
67676
67709
  unexpected: "Unexpected lexical declaration in case block."
67677
67710
  }
67678
67711
  },
@@ -67704,7 +67737,16 @@ function requireNoCaseDeclarations () {
67704
67737
  if (isLexicalDeclaration(statement)) {
67705
67738
  context.report({
67706
67739
  node: statement,
67707
- messageId: "unexpected"
67740
+ messageId: "unexpected",
67741
+ suggest: [
67742
+ {
67743
+ messageId: "addBrackets",
67744
+ fix: fixer => [
67745
+ fixer.insertTextBefore(node.consequent[0], "{ "),
67746
+ fixer.insertTextAfter(node.consequent.at(-1), " }")
67747
+ ]
67748
+ }
67749
+ ]
67708
67750
  });
67709
67751
  }
67710
67752
  }
@@ -68647,7 +68689,7 @@ function requireNoConstantBinaryExpression () {
68647
68689
  * truthiness.
68648
68690
  * https://262.ecma-international.org/5.1/#sec-11.9.3
68649
68691
  *
68650
- * Javascript `==` operator works by converting the boolean to `1` (true) or
68692
+ * JavaScript `==` operator works by converting the boolean to `1` (true) or
68651
68693
  * `+0` (false) and then checks the values `==` equality to that number.
68652
68694
  * @param {Scope} scope The scope in which node was found.
68653
68695
  * @param {ASTNode} node The node to test.
@@ -75123,14 +75165,28 @@ function requireNoExtraBooleanCast () {
75123
75165
  },
75124
75166
 
75125
75167
  schema: [{
75126
- type: "object",
75127
- properties: {
75128
- enforceForLogicalOperands: {
75129
- type: "boolean",
75130
- default: false
75168
+ anyOf: [
75169
+ {
75170
+ type: "object",
75171
+ properties: {
75172
+ enforceForInnerExpressions: {
75173
+ type: "boolean"
75174
+ }
75175
+ },
75176
+ additionalProperties: false
75177
+ },
75178
+
75179
+ // deprecated
75180
+ {
75181
+ type: "object",
75182
+ properties: {
75183
+ enforceForLogicalOperands: {
75184
+ type: "boolean"
75185
+ }
75186
+ },
75187
+ additionalProperties: false
75131
75188
  }
75132
- },
75133
- additionalProperties: false
75189
+ ]
75134
75190
  }],
75135
75191
  fixable: "code",
75136
75192
 
@@ -75142,6 +75198,9 @@ function requireNoExtraBooleanCast () {
75142
75198
 
75143
75199
  create(context) {
75144
75200
  const sourceCode = context.sourceCode;
75201
+ const enforceForLogicalOperands = context.options[0]?.enforceForLogicalOperands === true;
75202
+ const enforceForInnerExpressions = context.options[0]?.enforceForInnerExpressions === true;
75203
+
75145
75204
 
75146
75205
  // Node types which have a test which will coerce values to booleans.
75147
75206
  const BOOLEAN_NODE_TYPES = new Set([
@@ -75165,19 +75224,6 @@ function requireNoExtraBooleanCast () {
75165
75224
  node.callee.name === "Boolean";
75166
75225
  }
75167
75226
 
75168
- /**
75169
- * Checks whether the node is a logical expression and that the option is enabled
75170
- * @param {ASTNode} node the node
75171
- * @returns {boolean} if the node is a logical expression and option is enabled
75172
- */
75173
- function isLogicalContext(node) {
75174
- return node.type === "LogicalExpression" &&
75175
- (node.operator === "||" || node.operator === "&&") &&
75176
- (context.options.length && context.options[0].enforceForLogicalOperands === true);
75177
-
75178
- }
75179
-
75180
-
75181
75227
  /**
75182
75228
  * Check if a node is in a context where its value would be coerced to a boolean at runtime.
75183
75229
  * @param {ASTNode} node The node
@@ -75208,12 +75254,51 @@ function requireNoExtraBooleanCast () {
75208
75254
  return isInFlaggedContext(node.parent);
75209
75255
  }
75210
75256
 
75211
- return isInBooleanContext(node) ||
75212
- (isLogicalContext(node.parent) &&
75257
+ /*
75258
+ * legacy behavior - enforceForLogicalOperands will only recurse on
75259
+ * logical expressions, not on other contexts.
75260
+ * enforceForInnerExpressions will recurse on logical expressions
75261
+ * as well as the other recursive syntaxes.
75262
+ */
75263
+
75264
+ if (enforceForLogicalOperands || enforceForInnerExpressions) {
75265
+ if (node.parent.type === "LogicalExpression") {
75266
+ if (node.parent.operator === "||" || node.parent.operator === "&&") {
75267
+ return isInFlaggedContext(node.parent);
75268
+ }
75213
75269
 
75214
- // For nested logical statements
75215
- isInFlaggedContext(node.parent)
75216
- );
75270
+ // Check the right hand side of a `??` operator.
75271
+ if (enforceForInnerExpressions &&
75272
+ node.parent.operator === "??" &&
75273
+ node.parent.right === node
75274
+ ) {
75275
+ return isInFlaggedContext(node.parent);
75276
+ }
75277
+ }
75278
+ }
75279
+
75280
+ if (enforceForInnerExpressions) {
75281
+ if (
75282
+ node.parent.type === "ConditionalExpression" &&
75283
+ (node.parent.consequent === node || node.parent.alternate === node)
75284
+ ) {
75285
+ return isInFlaggedContext(node.parent);
75286
+ }
75287
+
75288
+ /*
75289
+ * Check last expression only in a sequence, i.e. if ((1, 2, Boolean(3))) {}, since
75290
+ * the others don't affect the result of the expression.
75291
+ */
75292
+ if (
75293
+ node.parent.type === "SequenceExpression" &&
75294
+ node.parent.expressions.at(-1) === node
75295
+ ) {
75296
+ return isInFlaggedContext(node.parent);
75297
+ }
75298
+
75299
+ }
75300
+
75301
+ return isInBooleanContext(node);
75217
75302
  }
75218
75303
 
75219
75304
 
@@ -75240,7 +75325,6 @@ function requireNoExtraBooleanCast () {
75240
75325
  * Determines whether the given node needs to be parenthesized when replacing the previous node.
75241
75326
  * It assumes that `previousNode` is the node to be reported by this rule, so it has a limited list
75242
75327
  * of possible parent node types. By the same assumption, the node's role in a particular parent is already known.
75243
- * For example, if the parent is `ConditionalExpression`, `previousNode` must be its `test` child.
75244
75328
  * @param {ASTNode} previousNode Previous node.
75245
75329
  * @param {ASTNode} node The node to check.
75246
75330
  * @throws {Error} (Unreachable.)
@@ -75250,6 +75334,7 @@ function requireNoExtraBooleanCast () {
75250
75334
  if (previousNode.parent.type === "ChainExpression") {
75251
75335
  return needsParens(previousNode.parent, node);
75252
75336
  }
75337
+
75253
75338
  if (isParenthesized(previousNode)) {
75254
75339
 
75255
75340
  // parentheses around the previous node will stay, so there is no need for an additional pair
@@ -75267,9 +75352,18 @@ function requireNoExtraBooleanCast () {
75267
75352
  case "DoWhileStatement":
75268
75353
  case "WhileStatement":
75269
75354
  case "ForStatement":
75355
+ case "SequenceExpression":
75270
75356
  return false;
75271
75357
  case "ConditionalExpression":
75272
- return precedence(node) <= precedence(parent);
75358
+ if (previousNode === parent.test) {
75359
+ return precedence(node) <= precedence(parent);
75360
+ }
75361
+ if (previousNode === parent.consequent || previousNode === parent.alternate) {
75362
+ return precedence(node) < precedence({ type: "AssignmentExpression" });
75363
+ }
75364
+
75365
+ /* c8 ignore next */
75366
+ throw new Error("Ternary child must be test, consequent, or alternate.");
75273
75367
  case "UnaryExpression":
75274
75368
  return precedence(node) < precedence(parent);
75275
75369
  case "LogicalExpression":
@@ -81162,12 +81256,10 @@ function requireNoMisleadingCharacterClass () {
81162
81256
  const findCharacterSequences = {
81163
81257
  *surrogatePairWithoutUFlag(chars) {
81164
81258
  for (const [index, char] of chars.entries()) {
81165
- if (index === 0) {
81166
- continue;
81167
- }
81168
81259
  const previous = chars[index - 1];
81169
81260
 
81170
81261
  if (
81262
+ previous && char &&
81171
81263
  isSurrogatePair(previous.value, char.value) &&
81172
81264
  !isUnicodeCodePointEscape(previous) &&
81173
81265
  !isUnicodeCodePointEscape(char)
@@ -81179,12 +81271,10 @@ function requireNoMisleadingCharacterClass () {
81179
81271
 
81180
81272
  *surrogatePair(chars) {
81181
81273
  for (const [index, char] of chars.entries()) {
81182
- if (index === 0) {
81183
- continue;
81184
- }
81185
81274
  const previous = chars[index - 1];
81186
81275
 
81187
81276
  if (
81277
+ previous && char &&
81188
81278
  isSurrogatePair(previous.value, char.value) &&
81189
81279
  (
81190
81280
  isUnicodeCodePointEscape(previous) ||
@@ -81196,14 +81286,17 @@ function requireNoMisleadingCharacterClass () {
81196
81286
  }
81197
81287
  },
81198
81288
 
81199
- *combiningClass(chars) {
81289
+ *combiningClass(chars, unfilteredChars) {
81290
+
81291
+ /*
81292
+ * When `allowEscape` is `true`, a combined character should only be allowed if the combining mark appears as an escape sequence.
81293
+ * This means that the base character should be considered even if it's escaped.
81294
+ */
81200
81295
  for (const [index, char] of chars.entries()) {
81201
- if (index === 0) {
81202
- continue;
81203
- }
81204
- const previous = chars[index - 1];
81296
+ const previous = unfilteredChars[index - 1];
81205
81297
 
81206
81298
  if (
81299
+ previous && char &&
81207
81300
  isCombiningCharacter(char.value) &&
81208
81301
  !isCombiningCharacter(previous.value)
81209
81302
  ) {
@@ -81214,12 +81307,10 @@ function requireNoMisleadingCharacterClass () {
81214
81307
 
81215
81308
  *emojiModifier(chars) {
81216
81309
  for (const [index, char] of chars.entries()) {
81217
- if (index === 0) {
81218
- continue;
81219
- }
81220
81310
  const previous = chars[index - 1];
81221
81311
 
81222
81312
  if (
81313
+ previous && char &&
81223
81314
  isEmojiModifier(char.value) &&
81224
81315
  !isEmojiModifier(previous.value)
81225
81316
  ) {
@@ -81230,12 +81321,10 @@ function requireNoMisleadingCharacterClass () {
81230
81321
 
81231
81322
  *regionalIndicatorSymbol(chars) {
81232
81323
  for (const [index, char] of chars.entries()) {
81233
- if (index === 0) {
81234
- continue;
81235
- }
81236
81324
  const previous = chars[index - 1];
81237
81325
 
81238
81326
  if (
81327
+ previous && char &&
81239
81328
  isRegionalIndicatorSymbol(char.value) &&
81240
81329
  isRegionalIndicatorSymbol(previous.value)
81241
81330
  ) {
@@ -81248,17 +81337,18 @@ function requireNoMisleadingCharacterClass () {
81248
81337
  let sequence = null;
81249
81338
 
81250
81339
  for (const [index, char] of chars.entries()) {
81251
- if (index === 0 || index === chars.length - 1) {
81252
- continue;
81253
- }
81340
+ const previous = chars[index - 1];
81341
+ const next = chars[index + 1];
81342
+
81254
81343
  if (
81344
+ previous && char && next &&
81255
81345
  char.value === 0x200d &&
81256
- chars[index - 1].value !== 0x200d &&
81257
- chars[index + 1].value !== 0x200d
81346
+ previous.value !== 0x200d &&
81347
+ next.value !== 0x200d
81258
81348
  ) {
81259
81349
  if (sequence) {
81260
- if (sequence.at(-1) === chars[index - 1]) {
81261
- sequence.push(char, chars[index + 1]); // append to the sequence
81350
+ if (sequence.at(-1) === previous) {
81351
+ sequence.push(char, next); // append to the sequence
81262
81352
  } else {
81263
81353
  yield sequence;
81264
81354
  sequence = chars.slice(index - 1, index + 2);
@@ -81304,6 +81394,41 @@ function requireNoMisleadingCharacterClass () {
81304
81394
  return staticValue;
81305
81395
  }
81306
81396
 
81397
+ /**
81398
+ * Checks whether a specified regexpp character is represented as an acceptable escape sequence.
81399
+ * This function requires the source text of the character to be known.
81400
+ * @param {Character} char Character to check.
81401
+ * @param {string} charSource Source text of the character to check.
81402
+ * @returns {boolean} Whether the specified regexpp character is represented as an acceptable escape sequence.
81403
+ */
81404
+ function checkForAcceptableEscape(char, charSource) {
81405
+ if (!charSource.startsWith("\\")) {
81406
+ return false;
81407
+ }
81408
+ const match = /(?<=^\\+).$/su.exec(charSource);
81409
+
81410
+ return match?.[0] !== String.fromCodePoint(char.value);
81411
+ }
81412
+
81413
+ /**
81414
+ * Checks whether a specified regexpp character is represented as an acceptable escape sequence.
81415
+ * This function works with characters that are produced by a string or template literal.
81416
+ * It requires the source text and the CodeUnit list of the literal to be known.
81417
+ * @param {Character} char Character to check.
81418
+ * @param {string} nodeSource Source text of the string or template literal that produces the character.
81419
+ * @param {CodeUnit[]} codeUnits List of CodeUnit objects of the literal that produces the character.
81420
+ * @returns {boolean} Whether the specified regexpp character is represented as an acceptable escape sequence.
81421
+ */
81422
+ function checkForAcceptableEscapeInString(char, nodeSource, codeUnits) {
81423
+ const firstIndex = char.start;
81424
+ const lastIndex = char.end - 1;
81425
+ const start = codeUnits[firstIndex].start;
81426
+ const end = codeUnits[lastIndex].end;
81427
+ const charSource = nodeSource.slice(start, end);
81428
+
81429
+ return checkForAcceptableEscape(char, charSource);
81430
+ }
81431
+
81307
81432
  //------------------------------------------------------------------------------
81308
81433
  // Rule Definition
81309
81434
  //------------------------------------------------------------------------------
@@ -81321,7 +81446,18 @@ function requireNoMisleadingCharacterClass () {
81321
81446
 
81322
81447
  hasSuggestions: true,
81323
81448
 
81324
- schema: [],
81449
+ schema: [
81450
+ {
81451
+ type: "object",
81452
+ properties: {
81453
+ allowEscape: {
81454
+ type: "boolean",
81455
+ default: false
81456
+ }
81457
+ },
81458
+ additionalProperties: false
81459
+ }
81460
+ ],
81325
81461
 
81326
81462
  messages: {
81327
81463
  surrogatePairWithoutUFlag: "Unexpected surrogate pair in character class. Use 'u' flag.",
@@ -81334,6 +81470,7 @@ function requireNoMisleadingCharacterClass () {
81334
81470
  }
81335
81471
  },
81336
81472
  create(context) {
81473
+ const allowEscape = context.options[0]?.allowEscape;
81337
81474
  const sourceCode = context.sourceCode;
81338
81475
  const parser = new RegExpParser();
81339
81476
  const checkedPatternNodes = new Set();
@@ -81365,24 +81502,62 @@ function requireNoMisleadingCharacterClass () {
81365
81502
  return;
81366
81503
  }
81367
81504
 
81505
+ let codeUnits = null;
81506
+
81507
+ /**
81508
+ * Checks whether a specified regexpp character is represented as an acceptable escape sequence.
81509
+ * For the purposes of this rule, an escape sequence is considered acceptable if it consists of one or more backslashes followed by the character being escaped.
81510
+ * @param {Character} char Character to check.
81511
+ * @returns {boolean} Whether the specified regexpp character is represented as an acceptable escape sequence.
81512
+ */
81513
+ function isAcceptableEscapeSequence(char) {
81514
+ if (node.type === "Literal" && node.regex) {
81515
+ return checkForAcceptableEscape(char, char.raw);
81516
+ }
81517
+ if (node.type === "Literal" && typeof node.value === "string") {
81518
+ const nodeSource = node.raw;
81519
+
81520
+ codeUnits ??= parseStringLiteral(nodeSource);
81521
+
81522
+ return checkForAcceptableEscapeInString(char, nodeSource, codeUnits);
81523
+ }
81524
+ if (astUtils.isStaticTemplateLiteral(node)) {
81525
+ const nodeSource = sourceCode.getText(node);
81526
+
81527
+ codeUnits ??= parseTemplateToken(nodeSource);
81528
+
81529
+ return checkForAcceptableEscapeInString(char, nodeSource, codeUnits);
81530
+ }
81531
+ return false;
81532
+ }
81533
+
81368
81534
  const foundKindMatches = new Map();
81369
81535
 
81370
81536
  visitRegExpAST(patternNode, {
81371
81537
  onCharacterClassEnter(ccNode) {
81372
- for (const chars of iterateCharacterSequence(ccNode.elements)) {
81538
+ for (const unfilteredChars of iterateCharacterSequence(ccNode.elements)) {
81539
+ let chars;
81540
+
81541
+ if (allowEscape) {
81542
+
81543
+ // Replace escape sequences with null to avoid having them flagged.
81544
+ chars = unfilteredChars.map(char => (isAcceptableEscapeSequence(char) ? null : char));
81545
+ } else {
81546
+ chars = unfilteredChars;
81547
+ }
81373
81548
  for (const kind of kinds) {
81549
+ const matches = findCharacterSequences[kind](chars, unfilteredChars);
81550
+
81374
81551
  if (foundKindMatches.has(kind)) {
81375
- foundKindMatches.get(kind).push(...findCharacterSequences[kind](chars));
81552
+ foundKindMatches.get(kind).push(...matches);
81376
81553
  } else {
81377
- foundKindMatches.set(kind, [...findCharacterSequences[kind](chars)]);
81554
+ foundKindMatches.set(kind, [...matches]);
81378
81555
  }
81379
81556
  }
81380
81557
  }
81381
81558
  }
81382
81559
  });
81383
81560
 
81384
- let codeUnits = null;
81385
-
81386
81561
  /**
81387
81562
  * Finds the report loc(s) for a range of matches.
81388
81563
  * Only literals and expression-less templates generate granular errors.
@@ -85369,7 +85544,8 @@ function requireNoRestrictedExports () {
85369
85544
  type: "string"
85370
85545
  },
85371
85546
  uniqueItems: true
85372
- }
85547
+ },
85548
+ restrictedNamedExportsPattern: { type: "string" }
85373
85549
  },
85374
85550
  additionalProperties: false
85375
85551
  },
@@ -85384,6 +85560,7 @@ function requireNoRestrictedExports () {
85384
85560
  },
85385
85561
  uniqueItems: true
85386
85562
  },
85563
+ restrictedNamedExportsPattern: { type: "string" },
85387
85564
  restrictDefaultExports: {
85388
85565
  type: "object",
85389
85566
  properties: {
@@ -85430,6 +85607,7 @@ function requireNoRestrictedExports () {
85430
85607
  create(context) {
85431
85608
 
85432
85609
  const restrictedNames = new Set(context.options[0] && context.options[0].restrictedNamedExports);
85610
+ const restrictedNamePattern = context.options[0] && context.options[0].restrictedNamedExportsPattern;
85433
85611
  const restrictDefaultExports = context.options[0] && context.options[0].restrictDefaultExports;
85434
85612
  const sourceCode = context.sourceCode;
85435
85613
 
@@ -85441,7 +85619,15 @@ function requireNoRestrictedExports () {
85441
85619
  function checkExportedName(node) {
85442
85620
  const name = astUtils.getModuleExportName(node);
85443
85621
 
85444
- if (restrictedNames.has(name)) {
85622
+ let matchesRestrictedNamePattern = false;
85623
+
85624
+ if (restrictedNamePattern && name !== "default") {
85625
+ const patternRegex = new RegExp(restrictedNamePattern, "u");
85626
+
85627
+ matchesRestrictedNamePattern = patternRegex.test(name);
85628
+ }
85629
+
85630
+ if (matchesRestrictedNamePattern || restrictedNames.has(name)) {
85445
85631
  context.report({
85446
85632
  node,
85447
85633
  messageId: "restrictedNamed",
@@ -98091,35 +98277,22 @@ function requireObjectShorthand () {
98091
98277
  const arrowToken = sourceCode.getTokenBefore(node.value.body, astUtils.isArrowToken);
98092
98278
  const fnBody = sourceCode.text.slice(arrowToken.range[1], node.value.range[1]);
98093
98279
 
98094
- let shouldAddParensAroundParameters = false;
98095
- let tokenBeforeParams;
98096
-
98097
- if (node.value.params.length === 0) {
98098
- tokenBeforeParams = sourceCode.getFirstToken(node.value, astUtils.isOpeningParenToken);
98099
- } else {
98100
- tokenBeforeParams = sourceCode.getTokenBefore(node.value.params[0]);
98101
- }
98102
-
98103
- if (node.value.params.length === 1) {
98104
- const hasParen = astUtils.isOpeningParenToken(tokenBeforeParams);
98105
- const isTokenOutsideNode = tokenBeforeParams.range[0] < node.range[0];
98106
-
98107
- shouldAddParensAroundParameters = !hasParen || isTokenOutsideNode;
98108
- }
98280
+ // First token should not be `async`
98281
+ const firstValueToken = sourceCode.getFirstToken(node.value, {
98282
+ skip: node.value.async ? 1 : 0
98283
+ });
98109
98284
 
98110
- const sliceStart = shouldAddParensAroundParameters
98111
- ? node.value.params[0].range[0]
98112
- : tokenBeforeParams.range[0];
98285
+ const sliceStart = firstValueToken.range[0];
98113
98286
  const sliceEnd = sourceCode.getTokenBefore(arrowToken).range[1];
98287
+ const shouldAddParens = node.value.params.length === 1 && node.value.params[0].range[0] === sliceStart;
98114
98288
 
98115
98289
  const oldParamText = sourceCode.text.slice(sliceStart, sliceEnd);
98116
- const newParamText = shouldAddParensAroundParameters ? `(${oldParamText})` : oldParamText;
98290
+ const newParamText = shouldAddParens ? `(${oldParamText})` : oldParamText;
98117
98291
 
98118
98292
  return fixer.replaceTextRange(
98119
98293
  fixRange,
98120
98294
  methodPrefix + newParamText + fnBody
98121
98295
  );
98122
-
98123
98296
  }
98124
98297
 
98125
98298
  /**
@@ -98304,6 +98477,13 @@ function requireObjectShorthand () {
98304
98477
  node,
98305
98478
  messageId: "expectedPropertyShorthand",
98306
98479
  fix(fixer) {
98480
+
98481
+ // x: /* */ x
98482
+ // x: (/* */ x)
98483
+ if (sourceCode.getCommentsInside(node).length > 0) {
98484
+ return null;
98485
+ }
98486
+
98307
98487
  return fixer.replaceText(node, node.value.name);
98308
98488
  }
98309
98489
  });
@@ -98317,6 +98497,13 @@ function requireObjectShorthand () {
98317
98497
  node,
98318
98498
  messageId: "expectedPropertyShorthand",
98319
98499
  fix(fixer) {
98500
+
98501
+ // "x": /* */ x
98502
+ // "x": (/* */ x)
98503
+ if (sourceCode.getCommentsInside(node).length > 0) {
98504
+ return null;
98505
+ }
98506
+
98320
98507
  return fixer.replaceText(node, node.value.name);
98321
98508
  }
98322
98509
  });
@@ -112154,7 +112341,7 @@ function requireMinimatch () {
112154
112341
  minimatch_1 = minimatch;
112155
112342
  minimatch.Minimatch = Minimatch;
112156
112343
 
112157
- var path = (function () { try { return require$$0$3 } catch (e) {}}()) || {
112344
+ var path = (function () { try { return require$$0$2 } catch (e) {}}()) || {
112158
112345
  sep: '/'
112159
112346
  };
112160
112347
  minimatch.sep = path.sep;
@@ -113605,7 +113792,7 @@ function requireApi () {
113605
113792
  if (hasRequiredApi) return api;
113606
113793
  hasRequiredApi = 1;
113607
113794
 
113608
- var path = require$$0$3;
113795
+ var path = require$$0$2;
113609
113796
  var minimatch = requireMinimatch();
113610
113797
  var createDebug = requireSrc$1();
113611
113798
  var objectSchema = requireSrc();
@@ -116333,7 +116520,7 @@ function requireLinter () {
116333
116520
  //------------------------------------------------------------------------------
116334
116521
 
116335
116522
  const
116336
- path = require$$0$3,
116523
+ path = require$$0$5,
116337
116524
  eslintScope = requireEslintScope(),
116338
116525
  evk = requireEslintVisitorKeys$2(),
116339
116526
  espree = requireEspree(),
@@ -117097,7 +117284,7 @@ function requireLinter () {
117097
117284
  */
117098
117285
  function resolveGlobals(providedGlobals, enabledEnvironments) {
117099
117286
  return Object.assign(
117100
- {},
117287
+ Object.create(null),
117101
117288
  ...enabledEnvironments.filter(env => env.globals).map(env => env.globals),
117102
117289
  providedGlobals
117103
117290
  );