eslint-linter-browserify 10.2.1 → 10.4.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 +689 -382
  2. package/linter.js +689 -382
  3. package/linter.min.js +3 -3
  4. package/linter.mjs +689 -382
  5. package/package.json +5 -5
package/linter.cjs CHANGED
@@ -520,11 +520,11 @@ var hasRequiredEstraverse;
520
520
  function requireEstraverse () {
521
521
  if (hasRequiredEstraverse) return estraverse;
522
522
  hasRequiredEstraverse = 1;
523
- (function (exports$1) {
523
+ (function (exports) {
524
524
  /*jslint vars:false, bitwise:true*/
525
525
  /*jshint indent:4*/
526
526
  /*global exports:true*/
527
- (function clone(exports$1) {
527
+ (function clone(exports) {
528
528
 
529
529
  var Syntax,
530
530
  VisitorOption,
@@ -1289,17 +1289,17 @@ function requireEstraverse () {
1289
1289
  return tree;
1290
1290
  }
1291
1291
 
1292
- exports$1.Syntax = Syntax;
1293
- exports$1.traverse = traverse;
1294
- exports$1.replace = replace;
1295
- exports$1.attachComments = attachComments;
1296
- exports$1.VisitorKeys = VisitorKeys;
1297
- exports$1.VisitorOption = VisitorOption;
1298
- exports$1.Controller = Controller;
1299
- exports$1.cloneEnvironment = function () { return clone({}); };
1300
-
1301
- return exports$1;
1302
- }(exports$1));
1292
+ exports.Syntax = Syntax;
1293
+ exports.traverse = traverse;
1294
+ exports.replace = replace;
1295
+ exports.attachComments = attachComments;
1296
+ exports.VisitorKeys = VisitorKeys;
1297
+ exports.VisitorOption = VisitorOption;
1298
+ exports.Controller = Controller;
1299
+ exports.cloneEnvironment = function () { return clone({}); };
1300
+
1301
+ return exports;
1302
+ }(exports));
1303
1303
  /* vim: set sw=4 ts=4 et tw=80 : */
1304
1304
  } (estraverse));
1305
1305
  return estraverse;
@@ -4216,7 +4216,7 @@ function requireEslintVisitorKeys$2 () {
4216
4216
  return eslintVisitorKeys$2;
4217
4217
  }
4218
4218
 
4219
- var version = "10.2.1";
4219
+ var version = "10.4.0";
4220
4220
  var require$$3$1 = {
4221
4221
  version: version};
4222
4222
 
@@ -4700,17 +4700,17 @@ var hasRequiredBrowser;
4700
4700
  function requireBrowser () {
4701
4701
  if (hasRequiredBrowser) return browser.exports;
4702
4702
  hasRequiredBrowser = 1;
4703
- (function (module, exports$1) {
4703
+ (function (module, exports) {
4704
4704
  /**
4705
4705
  * This is the web browser implementation of `debug()`.
4706
4706
  */
4707
4707
 
4708
- exports$1.formatArgs = formatArgs;
4709
- exports$1.save = save;
4710
- exports$1.load = load;
4711
- exports$1.useColors = useColors;
4712
- exports$1.storage = localstorage();
4713
- exports$1.destroy = (() => {
4708
+ exports.formatArgs = formatArgs;
4709
+ exports.save = save;
4710
+ exports.load = load;
4711
+ exports.useColors = useColors;
4712
+ exports.storage = localstorage();
4713
+ exports.destroy = (() => {
4714
4714
  let warned = false;
4715
4715
 
4716
4716
  return () => {
@@ -4725,7 +4725,7 @@ function requireBrowser () {
4725
4725
  * Colors.
4726
4726
  */
4727
4727
 
4728
- exports$1.colors = [
4728
+ exports.colors = [
4729
4729
  '#0000CC',
4730
4730
  '#0000FF',
4731
4731
  '#0033CC',
@@ -4890,7 +4890,7 @@ function requireBrowser () {
4890
4890
  *
4891
4891
  * @api public
4892
4892
  */
4893
- exports$1.log = console.debug || console.log || (() => {});
4893
+ exports.log = console.debug || console.log || (() => {});
4894
4894
 
4895
4895
  /**
4896
4896
  * Save `namespaces`.
@@ -4901,9 +4901,9 @@ function requireBrowser () {
4901
4901
  function save(namespaces) {
4902
4902
  try {
4903
4903
  if (namespaces) {
4904
- exports$1.storage.setItem('debug', namespaces);
4904
+ exports.storage.setItem('debug', namespaces);
4905
4905
  } else {
4906
- exports$1.storage.removeItem('debug');
4906
+ exports.storage.removeItem('debug');
4907
4907
  }
4908
4908
  } catch (error) {
4909
4909
  // Swallow
@@ -4920,7 +4920,7 @@ function requireBrowser () {
4920
4920
  function load() {
4921
4921
  let r;
4922
4922
  try {
4923
- r = exports$1.storage.getItem('debug') || exports$1.storage.getItem('DEBUG') ;
4923
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
4924
4924
  } catch (error) {
4925
4925
  // Swallow
4926
4926
  // XXX (@Qix-) should we be logging these?
@@ -4956,7 +4956,7 @@ function requireBrowser () {
4956
4956
  }
4957
4957
  }
4958
4958
 
4959
- module.exports = requireCommon()(exports$1);
4959
+ module.exports = requireCommon()(exports);
4960
4960
 
4961
4961
  const {formatters} = module.exports;
4962
4962
 
@@ -5597,9 +5597,9 @@ var hasRequiredEslintUtils;
5597
5597
  function requireEslintUtils () {
5598
5598
  if (hasRequiredEslintUtils) return eslintUtils;
5599
5599
  hasRequiredEslintUtils = 1;
5600
- (function (exports$1) {
5600
+ (function (exports) {
5601
5601
 
5602
- Object.defineProperty(exports$1, '__esModule', { value: true });
5602
+ Object.defineProperty(exports, '__esModule', { value: true });
5603
5603
 
5604
5604
  var eslintVisitorKeys = requireEslintVisitorKeys$1();
5605
5605
 
@@ -8162,44 +8162,44 @@ function requireEslintUtils () {
8162
8162
  ReferenceTracker,
8163
8163
  };
8164
8164
 
8165
- exports$1.CALL = CALL;
8166
- exports$1.CONSTRUCT = CONSTRUCT;
8167
- exports$1.ESM = ESM;
8168
- exports$1.PatternMatcher = PatternMatcher;
8169
- exports$1.READ = READ;
8170
- exports$1.ReferenceTracker = ReferenceTracker;
8171
- exports$1["default"] = index;
8172
- exports$1.findVariable = findVariable;
8173
- exports$1.getFunctionHeadLocation = getFunctionHeadLocation;
8174
- exports$1.getFunctionNameWithKind = getFunctionNameWithKind;
8175
- exports$1.getInnermostScope = getInnermostScope;
8176
- exports$1.getPropertyName = getPropertyName;
8177
- exports$1.getStaticValue = getStaticValue;
8178
- exports$1.getStringIfConstant = getStringIfConstant;
8179
- exports$1.hasSideEffect = hasSideEffect;
8180
- exports$1.isArrowToken = isArrowToken;
8181
- exports$1.isClosingBraceToken = isClosingBraceToken;
8182
- exports$1.isClosingBracketToken = isClosingBracketToken;
8183
- exports$1.isClosingParenToken = isClosingParenToken;
8184
- exports$1.isColonToken = isColonToken;
8185
- exports$1.isCommaToken = isCommaToken;
8186
- exports$1.isCommentToken = isCommentToken;
8187
- exports$1.isNotArrowToken = isNotArrowToken;
8188
- exports$1.isNotClosingBraceToken = isNotClosingBraceToken;
8189
- exports$1.isNotClosingBracketToken = isNotClosingBracketToken;
8190
- exports$1.isNotClosingParenToken = isNotClosingParenToken;
8191
- exports$1.isNotColonToken = isNotColonToken;
8192
- exports$1.isNotCommaToken = isNotCommaToken;
8193
- exports$1.isNotCommentToken = isNotCommentToken;
8194
- exports$1.isNotOpeningBraceToken = isNotOpeningBraceToken;
8195
- exports$1.isNotOpeningBracketToken = isNotOpeningBracketToken;
8196
- exports$1.isNotOpeningParenToken = isNotOpeningParenToken;
8197
- exports$1.isNotSemicolonToken = isNotSemicolonToken;
8198
- exports$1.isOpeningBraceToken = isOpeningBraceToken;
8199
- exports$1.isOpeningBracketToken = isOpeningBracketToken;
8200
- exports$1.isOpeningParenToken = isOpeningParenToken;
8201
- exports$1.isParenthesized = isParenthesized;
8202
- exports$1.isSemicolonToken = isSemicolonToken;
8165
+ exports.CALL = CALL;
8166
+ exports.CONSTRUCT = CONSTRUCT;
8167
+ exports.ESM = ESM;
8168
+ exports.PatternMatcher = PatternMatcher;
8169
+ exports.READ = READ;
8170
+ exports.ReferenceTracker = ReferenceTracker;
8171
+ exports["default"] = index;
8172
+ exports.findVariable = findVariable;
8173
+ exports.getFunctionHeadLocation = getFunctionHeadLocation;
8174
+ exports.getFunctionNameWithKind = getFunctionNameWithKind;
8175
+ exports.getInnermostScope = getInnermostScope;
8176
+ exports.getPropertyName = getPropertyName;
8177
+ exports.getStaticValue = getStaticValue;
8178
+ exports.getStringIfConstant = getStringIfConstant;
8179
+ exports.hasSideEffect = hasSideEffect;
8180
+ exports.isArrowToken = isArrowToken;
8181
+ exports.isClosingBraceToken = isClosingBraceToken;
8182
+ exports.isClosingBracketToken = isClosingBracketToken;
8183
+ exports.isClosingParenToken = isClosingParenToken;
8184
+ exports.isColonToken = isColonToken;
8185
+ exports.isCommaToken = isCommaToken;
8186
+ exports.isCommentToken = isCommentToken;
8187
+ exports.isNotArrowToken = isNotArrowToken;
8188
+ exports.isNotClosingBraceToken = isNotClosingBraceToken;
8189
+ exports.isNotClosingBracketToken = isNotClosingBracketToken;
8190
+ exports.isNotClosingParenToken = isNotClosingParenToken;
8191
+ exports.isNotColonToken = isNotColonToken;
8192
+ exports.isNotCommaToken = isNotCommaToken;
8193
+ exports.isNotCommentToken = isNotCommentToken;
8194
+ exports.isNotOpeningBraceToken = isNotOpeningBraceToken;
8195
+ exports.isNotOpeningBracketToken = isNotOpeningBracketToken;
8196
+ exports.isNotOpeningParenToken = isNotOpeningParenToken;
8197
+ exports.isNotSemicolonToken = isNotSemicolonToken;
8198
+ exports.isOpeningBraceToken = isOpeningBraceToken;
8199
+ exports.isOpeningBracketToken = isOpeningBracketToken;
8200
+ exports.isOpeningParenToken = isOpeningParenToken;
8201
+ exports.isParenthesized = isParenthesized;
8202
+ exports.isSemicolonToken = isSemicolonToken;
8203
8203
 
8204
8204
  } (eslintUtils));
8205
8205
  return eslintUtils;
@@ -10116,6 +10116,15 @@ function requireDebugHelpers () {
10116
10116
  }
10117
10117
  }
10118
10118
 
10119
+ /**
10120
+ * Escape text for use in a DOT label.
10121
+ * @param {string} value The value to escape.
10122
+ * @returns {string} The escaped value.
10123
+ */
10124
+ function escapeDotLabelText(value) {
10125
+ return value.replace(/\\/gu, String.raw`\\`).replace(/"/gu, String.raw`\"`);
10126
+ }
10127
+
10119
10128
  //------------------------------------------------------------------------------
10120
10129
  // Public Interface
10121
10130
  //------------------------------------------------------------------------------
@@ -10218,7 +10227,9 @@ function requireDebugHelpers () {
10218
10227
  }
10219
10228
 
10220
10229
  if (segment.internal.nodes.length > 0) {
10221
- text += segment.internal.nodes.join("\\n");
10230
+ text += segment.internal.nodes
10231
+ .map(escapeDotLabelText)
10232
+ .join("\\n");
10222
10233
  } else {
10223
10234
  text += "????";
10224
10235
  }
@@ -13380,10 +13391,9 @@ function requireIdGenerator () {
13380
13391
  next() {
13381
13392
  this.n = (1 + this.n) | 0;
13382
13393
 
13383
- /* c8 ignore start */
13384
13394
  if (this.n < 0) {
13385
13395
  this.n = 1;
13386
- } /* c8 ignore stop */
13396
+ }
13387
13397
 
13388
13398
  return this.prefix + this.n;
13389
13399
  }
@@ -13819,8 +13829,8 @@ function requireCodePathAnalyzer () {
13819
13829
  }
13820
13830
 
13821
13831
  /**
13822
- * Checks whether or not a given logical expression node goes different path
13823
- * between the `true` case and the `false` case.
13832
+ * Checks whether a given logical expression node takes different paths for the
13833
+ * `true` and `false` cases.
13824
13834
  * @param {ASTNode} node A node to check.
13825
13835
  * @returns {boolean} `true` if the node is a test of a choice statement.
13826
13836
  */
@@ -13849,8 +13859,8 @@ function requireCodePathAnalyzer () {
13849
13859
  /**
13850
13860
  * Gets the boolean value of a given literal node.
13851
13861
  *
13852
- * This is used to detect infinity loops (e.g. `while (true) {}`).
13853
- * Statements preceded by an infinity loop are unreachable if the loop didn't
13862
+ * This is used to detect infinite loops (e.g. `while (true) {}`).
13863
+ * Statements preceded by an infinite loop are unreachable if the loop didn't
13854
13864
  * have any `break` statement.
13855
13865
  * @param {ASTNode} node A node to get.
13856
13866
  * @returns {boolean|undefined} a boolean value if the node is a Literal node,
@@ -13963,8 +13973,8 @@ function requireCodePathAnalyzer () {
13963
13973
  }
13964
13974
 
13965
13975
  /**
13966
- * Updates the current segment with empty.
13967
- * This is called at the last of functions or the program.
13976
+ * Updates the current segment with an empty array.
13977
+ * This is called when a code path ends.
13968
13978
  * @param {CodePathAnalyzer} analyzer The instance.
13969
13979
  * @param {ASTNode} node The current AST node.
13970
13980
  * @returns {void}
@@ -14457,7 +14467,7 @@ function requireCodePathAnalyzer () {
14457
14467
  * a = () => {}
14458
14468
  * }
14459
14469
  *
14460
- * In this case, The ArrowFunctionExpression code path is closed first
14470
+ * In this case, the ArrowFunctionExpression code path is closed first,
14461
14471
  * and then we need to close the code path for the PropertyDefinition
14462
14472
  * value.
14463
14473
  */
@@ -22725,13 +22735,13 @@ var hasRequiredCommonjs$2;
22725
22735
  function requireCommonjs$2 () {
22726
22736
  if (hasRequiredCommonjs$2) return commonjs;
22727
22737
  hasRequiredCommonjs$2 = 1;
22728
- (function (exports$1) {
22729
- Object.defineProperty(exports$1, "__esModule", { value: true });
22730
- exports$1.range = exports$1.balanced = void 0;
22738
+ (function (exports) {
22739
+ Object.defineProperty(exports, "__esModule", { value: true });
22740
+ exports.range = exports.balanced = void 0;
22731
22741
  const balanced = (a, b, str) => {
22732
22742
  const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
22733
22743
  const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
22734
- const r = ma !== null && mb != null && (0, exports$1.range)(ma, mb, str);
22744
+ const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str);
22735
22745
  return (r && {
22736
22746
  start: r[0],
22737
22747
  end: r[1],
@@ -22740,7 +22750,7 @@ function requireCommonjs$2 () {
22740
22750
  post: str.slice(r[1] + mb.length),
22741
22751
  });
22742
22752
  };
22743
- exports$1.balanced = balanced;
22753
+ exports.balanced = balanced;
22744
22754
  const maybeMatch = (reg, str) => {
22745
22755
  const m = str.match(reg);
22746
22756
  return m ? m[0] : null;
@@ -22782,7 +22792,7 @@ function requireCommonjs$2 () {
22782
22792
  }
22783
22793
  return result;
22784
22794
  };
22785
- exports$1.range = range;
22795
+ exports.range = range;
22786
22796
 
22787
22797
  } (commonjs));
22788
22798
  return commonjs;
@@ -22793,10 +22803,10 @@ var hasRequiredCommonjs$1;
22793
22803
  function requireCommonjs$1 () {
22794
22804
  if (hasRequiredCommonjs$1) return commonjs$1;
22795
22805
  hasRequiredCommonjs$1 = 1;
22796
- (function (exports$1) {
22797
- Object.defineProperty(exports$1, "__esModule", { value: true });
22798
- exports$1.EXPANSION_MAX = void 0;
22799
- exports$1.expand = expand;
22806
+ (function (exports) {
22807
+ Object.defineProperty(exports, "__esModule", { value: true });
22808
+ exports.EXPANSION_MAX = void 0;
22809
+ exports.expand = expand;
22800
22810
  const balanced_match_1 = requireCommonjs$2();
22801
22811
  const escSlash = '\0SLASH' + Math.random() + '\0';
22802
22812
  const escOpen = '\0OPEN' + Math.random() + '\0';
@@ -22813,7 +22823,7 @@ function requireCommonjs$1 () {
22813
22823
  const closePattern = /\\}/g;
22814
22824
  const commaPattern = /\\,/g;
22815
22825
  const periodPattern = /\\\./g;
22816
- exports$1.EXPANSION_MAX = 100_000;
22826
+ exports.EXPANSION_MAX = 100_000;
22817
22827
  function numeric(str) {
22818
22828
  return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
22819
22829
  }
@@ -22862,7 +22872,7 @@ function requireCommonjs$1 () {
22862
22872
  if (!str) {
22863
22873
  return [];
22864
22874
  }
22865
- const { max = exports$1.EXPANSION_MAX } = options;
22875
+ const { max = exports.EXPANSION_MAX } = options;
22866
22876
  // I don't know why Bash 4.3 does this, but it does.
22867
22877
  // Anything starting with {} will have the first two bytes preserved
22868
22878
  // but *only* at the top level, so {},a}b will not expand to anything,
@@ -24124,9 +24134,9 @@ var hasRequiredCommonjs;
24124
24134
  function requireCommonjs () {
24125
24135
  if (hasRequiredCommonjs) return commonjs$2;
24126
24136
  hasRequiredCommonjs = 1;
24127
- (function (exports$1) {
24128
- Object.defineProperty(exports$1, "__esModule", { value: true });
24129
- exports$1.unescape = exports$1.escape = exports$1.AST = exports$1.Minimatch = exports$1.match = exports$1.makeRe = exports$1.braceExpand = exports$1.defaults = exports$1.filter = exports$1.GLOBSTAR = exports$1.sep = exports$1.minimatch = void 0;
24137
+ (function (exports) {
24138
+ Object.defineProperty(exports, "__esModule", { value: true });
24139
+ exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
24130
24140
  const brace_expansion_1 = requireCommonjs$1();
24131
24141
  const assert_valid_pattern_js_1 = requireAssertValidPattern();
24132
24142
  const ast_js_1 = requireAst$1();
@@ -24140,7 +24150,7 @@ function requireCommonjs () {
24140
24150
  }
24141
24151
  return new Minimatch(pattern, options).match(p);
24142
24152
  };
24143
- exports$1.minimatch = minimatch;
24153
+ exports.minimatch = minimatch;
24144
24154
  // Optimized checking for the most common glob patterns.
24145
24155
  const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
24146
24156
  const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
@@ -24204,10 +24214,10 @@ function requireCommonjs () {
24204
24214
  posix: { sep: '/' },
24205
24215
  };
24206
24216
  /* c8 ignore stop */
24207
- exports$1.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
24208
- exports$1.minimatch.sep = exports$1.sep;
24209
- exports$1.GLOBSTAR = Symbol('globstar **');
24210
- exports$1.minimatch.GLOBSTAR = exports$1.GLOBSTAR;
24217
+ exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
24218
+ exports.minimatch.sep = exports.sep;
24219
+ exports.GLOBSTAR = Symbol('globstar **');
24220
+ exports.minimatch.GLOBSTAR = exports.GLOBSTAR;
24211
24221
  // any single thing other than /
24212
24222
  // don't need to escape / when using new RegExp()
24213
24223
  const qmark = '[^/]';
@@ -24220,15 +24230,15 @@ function requireCommonjs () {
24220
24230
  // not a ^ or / followed by a dot,
24221
24231
  // followed by anything, any number of times.
24222
24232
  const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
24223
- const filter = (pattern, options = {}) => (p) => (0, exports$1.minimatch)(p, pattern, options);
24224
- exports$1.filter = filter;
24225
- exports$1.minimatch.filter = exports$1.filter;
24233
+ const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options);
24234
+ exports.filter = filter;
24235
+ exports.minimatch.filter = exports.filter;
24226
24236
  const ext = (a, b = {}) => Object.assign({}, a, b);
24227
24237
  const defaults = (def) => {
24228
24238
  if (!def || typeof def !== 'object' || !Object.keys(def).length) {
24229
- return exports$1.minimatch;
24239
+ return exports.minimatch;
24230
24240
  }
24231
- const orig = exports$1.minimatch;
24241
+ const orig = exports.minimatch;
24232
24242
  const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
24233
24243
  return Object.assign(m, {
24234
24244
  Minimatch: class Minimatch extends orig.Minimatch {
@@ -24257,11 +24267,11 @@ function requireCommonjs () {
24257
24267
  braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
24258
24268
  match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
24259
24269
  sep: orig.sep,
24260
- GLOBSTAR: exports$1.GLOBSTAR,
24270
+ GLOBSTAR: exports.GLOBSTAR,
24261
24271
  });
24262
24272
  };
24263
- exports$1.defaults = defaults;
24264
- exports$1.minimatch.defaults = exports$1.defaults;
24273
+ exports.defaults = defaults;
24274
+ exports.minimatch.defaults = exports.defaults;
24265
24275
  // Brace expansion:
24266
24276
  // a{b,c}d -> abd acd
24267
24277
  // a{b,}c -> abc ac
@@ -24282,8 +24292,8 @@ function requireCommonjs () {
24282
24292
  }
24283
24293
  return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax });
24284
24294
  };
24285
- exports$1.braceExpand = braceExpand;
24286
- exports$1.minimatch.braceExpand = exports$1.braceExpand;
24295
+ exports.braceExpand = braceExpand;
24296
+ exports.minimatch.braceExpand = exports.braceExpand;
24287
24297
  // parse a component of the expanded set.
24288
24298
  // At this point, no pattern may contain "/" in it
24289
24299
  // so we're going to return a 2d array, where each entry is the full
@@ -24296,8 +24306,8 @@ function requireCommonjs () {
24296
24306
  // of * is equivalent to a single *. Globstar behavior is enabled by
24297
24307
  // default, and can be disabled by setting options.noglobstar.
24298
24308
  const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
24299
- exports$1.makeRe = makeRe;
24300
- exports$1.minimatch.makeRe = exports$1.makeRe;
24309
+ exports.makeRe = makeRe;
24310
+ exports.minimatch.makeRe = exports.makeRe;
24301
24311
  const match = (list, pattern, options = {}) => {
24302
24312
  const mm = new Minimatch(pattern, options);
24303
24313
  list = list.filter(f => mm.match(f));
@@ -24306,8 +24316,8 @@ function requireCommonjs () {
24306
24316
  }
24307
24317
  return list;
24308
24318
  };
24309
- exports$1.match = match;
24310
- exports$1.minimatch.match = exports$1.match;
24319
+ exports.match = match;
24320
+ exports.minimatch.match = exports.match;
24311
24321
  // replace stuff like \* with *
24312
24322
  const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
24313
24323
  const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
@@ -24788,15 +24798,15 @@ function requireCommonjs () {
24788
24798
  if (optimizationLevel >= 2) {
24789
24799
  file = this.levelTwoFileOptimize(file);
24790
24800
  }
24791
- if (pattern.includes(exports$1.GLOBSTAR)) {
24801
+ if (pattern.includes(exports.GLOBSTAR)) {
24792
24802
  return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
24793
24803
  }
24794
24804
  return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
24795
24805
  }
24796
24806
  #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
24797
24807
  // split the pattern into head, tail, and middle of ** delimited parts
24798
- const firstgs = pattern.indexOf(exports$1.GLOBSTAR, patternIndex);
24799
- const lastgs = pattern.lastIndexOf(exports$1.GLOBSTAR);
24808
+ const firstgs = pattern.indexOf(exports.GLOBSTAR, patternIndex);
24809
+ const lastgs = pattern.lastIndexOf(exports.GLOBSTAR);
24800
24810
  // split the pattern up into globstar-delimited sections
24801
24811
  // the tail has to be at the end, and the others just have
24802
24812
  // to be found in order from the head.
@@ -24880,7 +24890,7 @@ function requireCommonjs () {
24880
24890
  let nonGsParts = 0;
24881
24891
  const nonGsPartsSums = [0];
24882
24892
  for (const b of body) {
24883
- if (b === exports$1.GLOBSTAR) {
24893
+ if (b === exports.GLOBSTAR) {
24884
24894
  nonGsPartsSums.push(nonGsParts);
24885
24895
  currentBody = [[], 0];
24886
24896
  bodySegments.push(currentBody);
@@ -24965,7 +24975,7 @@ function requireCommonjs () {
24965
24975
  // should be impossible.
24966
24976
  // some invalid regexp stuff in the set.
24967
24977
  /* c8 ignore start */
24968
- if (p === false || p === exports$1.GLOBSTAR) {
24978
+ if (p === false || p === exports.GLOBSTAR) {
24969
24979
  return false;
24970
24980
  }
24971
24981
  /* c8 ignore stop */
@@ -25021,14 +25031,14 @@ function requireCommonjs () {
25021
25031
  /* c8 ignore stop */
25022
25032
  }
25023
25033
  braceExpand() {
25024
- return (0, exports$1.braceExpand)(this.pattern, this.options);
25034
+ return (0, exports.braceExpand)(this.pattern, this.options);
25025
25035
  }
25026
25036
  parse(pattern) {
25027
25037
  (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
25028
25038
  const options = this.options;
25029
25039
  // shortcuts
25030
25040
  if (pattern === '**')
25031
- return exports$1.GLOBSTAR;
25041
+ return exports.GLOBSTAR;
25032
25042
  if (pattern === '')
25033
25043
  return '';
25034
25044
  // far and away, the most common glob pattern parts are
@@ -25100,17 +25110,17 @@ function requireCommonjs () {
25100
25110
  flags.add(f);
25101
25111
  }
25102
25112
  return (typeof p === 'string' ? regExpEscape(p)
25103
- : p === exports$1.GLOBSTAR ? exports$1.GLOBSTAR
25113
+ : p === exports.GLOBSTAR ? exports.GLOBSTAR
25104
25114
  : p._src);
25105
25115
  });
25106
25116
  pp.forEach((p, i) => {
25107
25117
  const next = pp[i + 1];
25108
25118
  const prev = pp[i - 1];
25109
- if (p !== exports$1.GLOBSTAR || prev === exports$1.GLOBSTAR) {
25119
+ if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
25110
25120
  return;
25111
25121
  }
25112
25122
  if (prev === undefined) {
25113
- if (next !== undefined && next !== exports$1.GLOBSTAR) {
25123
+ if (next !== undefined && next !== exports.GLOBSTAR) {
25114
25124
  pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
25115
25125
  }
25116
25126
  else {
@@ -25120,12 +25130,12 @@ function requireCommonjs () {
25120
25130
  else if (next === undefined) {
25121
25131
  pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + ')?';
25122
25132
  }
25123
- else if (next !== exports$1.GLOBSTAR) {
25133
+ else if (next !== exports.GLOBSTAR) {
25124
25134
  pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
25125
- pp[i + 1] = exports$1.GLOBSTAR;
25135
+ pp[i + 1] = exports.GLOBSTAR;
25126
25136
  }
25127
25137
  });
25128
- const filtered = pp.filter(p => p !== exports$1.GLOBSTAR);
25138
+ const filtered = pp.filter(p => p !== exports.GLOBSTAR);
25129
25139
  // For partial matches, we need to make the pattern match
25130
25140
  // any prefix of the full path. We do this by generating
25131
25141
  // alternative patterns that match progressively longer prefixes.
@@ -25234,22 +25244,22 @@ function requireCommonjs () {
25234
25244
  return this.negate;
25235
25245
  }
25236
25246
  static defaults(def) {
25237
- return exports$1.minimatch.defaults(def).Minimatch;
25247
+ return exports.minimatch.defaults(def).Minimatch;
25238
25248
  }
25239
25249
  }
25240
- exports$1.Minimatch = Minimatch;
25250
+ exports.Minimatch = Minimatch;
25241
25251
  /* c8 ignore start */
25242
25252
  var ast_js_2 = requireAst$1();
25243
- Object.defineProperty(exports$1, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
25253
+ Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
25244
25254
  var escape_js_2 = require_escape();
25245
- Object.defineProperty(exports$1, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
25255
+ Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
25246
25256
  var unescape_js_2 = require_unescape();
25247
- Object.defineProperty(exports$1, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
25257
+ Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
25248
25258
  /* c8 ignore stop */
25249
- exports$1.minimatch.AST = ast_js_1.AST;
25250
- exports$1.minimatch.Minimatch = Minimatch;
25251
- exports$1.minimatch.escape = escape_js_1.escape;
25252
- exports$1.minimatch.unescape = unescape_js_1.unescape;
25259
+ exports.minimatch.AST = ast_js_1.AST;
25260
+ exports.minimatch.Minimatch = Minimatch;
25261
+ exports.minimatch.escape = escape_js_1.escape;
25262
+ exports.minimatch.unescape = unescape_js_1.unescape;
25253
25263
 
25254
25264
  } (commonjs$2));
25255
25265
  return commonjs$2;
@@ -25739,7 +25749,7 @@ var hasRequiredCjs;
25739
25749
  function requireCjs () {
25740
25750
  if (hasRequiredCjs) return cjs$1;
25741
25751
  hasRequiredCjs = 1;
25742
- (function (exports$1) {
25752
+ (function (exports) {
25743
25753
 
25744
25754
  var posixPath = requirePosix();
25745
25755
  var windowsPath = requireWindows();
@@ -27274,12 +27284,12 @@ function requireCjs () {
27274
27284
  }
27275
27285
  }
27276
27286
 
27277
- Object.defineProperty(exports$1, "ObjectSchema", {
27287
+ Object.defineProperty(exports, "ObjectSchema", {
27278
27288
  enumerable: true,
27279
27289
  get: function () { return objectSchema.ObjectSchema; }
27280
27290
  });
27281
- exports$1.ConfigArray = ConfigArray;
27282
- exports$1.ConfigArraySymbol = ConfigArraySymbol;
27291
+ exports.ConfigArray = ConfigArray;
27292
+ exports.ConfigArraySymbol = ConfigArraySymbol;
27283
27293
  } (cjs$1));
27284
27294
  return cjs$1;
27285
27295
  }
@@ -27293,10 +27303,10 @@ var hasRequiredUri_all;
27293
27303
  function requireUri_all () {
27294
27304
  if (hasRequiredUri_all) return uri_all.exports;
27295
27305
  hasRequiredUri_all = 1;
27296
- (function (module, exports$1) {
27306
+ (function (module, exports) {
27297
27307
  (function (global, factory) {
27298
- factory(exports$1) ;
27299
- }(this, (function (exports$1) {
27308
+ factory(exports) ;
27309
+ }(this, (function (exports) {
27300
27310
  function merge() {
27301
27311
  for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
27302
27312
  sets[_key] = arguments[_key];
@@ -28678,20 +28688,20 @@ function requireUri_all () {
28678
28688
  SCHEMES[handler$5.scheme] = handler$5;
28679
28689
  SCHEMES[handler$6.scheme] = handler$6;
28680
28690
 
28681
- exports$1.SCHEMES = SCHEMES;
28682
- exports$1.pctEncChar = pctEncChar;
28683
- exports$1.pctDecChars = pctDecChars;
28684
- exports$1.parse = parse;
28685
- exports$1.removeDotSegments = removeDotSegments;
28686
- exports$1.serialize = serialize;
28687
- exports$1.resolveComponents = resolveComponents;
28688
- exports$1.resolve = resolve;
28689
- exports$1.normalize = normalize;
28690
- exports$1.equal = equal;
28691
- exports$1.escapeComponent = escapeComponent;
28692
- exports$1.unescapeComponent = unescapeComponent;
28693
-
28694
- Object.defineProperty(exports$1, '__esModule', { value: true });
28691
+ exports.SCHEMES = SCHEMES;
28692
+ exports.pctEncChar = pctEncChar;
28693
+ exports.pctDecChars = pctDecChars;
28694
+ exports.parse = parse;
28695
+ exports.removeDotSegments = removeDotSegments;
28696
+ exports.serialize = serialize;
28697
+ exports.resolveComponents = resolveComponents;
28698
+ exports.resolve = resolve;
28699
+ exports.normalize = normalize;
28700
+ exports.equal = equal;
28701
+ exports.escapeComponent = escapeComponent;
28702
+ exports.unescapeComponent = unescapeComponent;
28703
+
28704
+ Object.defineProperty(exports, '__esModule', { value: true });
28695
28705
 
28696
28706
  })));
28697
28707
 
@@ -37589,10 +37599,10 @@ var hasRequiredAcorn;
37589
37599
  function requireAcorn () {
37590
37600
  if (hasRequiredAcorn) return acorn.exports;
37591
37601
  hasRequiredAcorn = 1;
37592
- (function (module, exports$1) {
37602
+ (function (module, exports) {
37593
37603
  (function (global, factory) {
37594
- factory(exports$1) ;
37595
- })(this, (function (exports$1) {
37604
+ factory(exports) ;
37605
+ })(this, (function (exports) {
37596
37606
  // This file was generated. Do not modify manually!
37597
37607
  var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
37598
37608
 
@@ -38439,10 +38449,10 @@ function requireAcorn () {
38439
38449
  // to its body instead of creating a new node.
38440
38450
 
38441
38451
  pp$8.parseTopLevel = function(node) {
38442
- var exports$1 = Object.create(null);
38452
+ var exports = Object.create(null);
38443
38453
  if (!node.body) { node.body = []; }
38444
38454
  while (this.type !== types$1.eof) {
38445
- var stmt = this.parseStatement(null, true, exports$1);
38455
+ var stmt = this.parseStatement(null, true, exports);
38446
38456
  node.body.push(stmt);
38447
38457
  }
38448
38458
  if (this.inModule)
@@ -38550,7 +38560,7 @@ function requireAcorn () {
38550
38560
  // `if (foo) /blah/.exec(foo)`, where looking at the previous token
38551
38561
  // does not help.
38552
38562
 
38553
- pp$8.parseStatement = function(context, topLevel, exports$1) {
38563
+ pp$8.parseStatement = function(context, topLevel, exports) {
38554
38564
  var starttype = this.type, node = this.startNode(), kind;
38555
38565
 
38556
38566
  if (this.isLet(context)) {
@@ -38605,7 +38615,7 @@ function requireAcorn () {
38605
38615
  if (!this.inModule)
38606
38616
  { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); }
38607
38617
  }
38608
- return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1)
38618
+ return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports)
38609
38619
 
38610
38620
  // If the statement does not start with a statement keyword or a
38611
38621
  // brace, it's an ExpressionStatement or LabeledStatement. We
@@ -39366,11 +39376,11 @@ function requireAcorn () {
39366
39376
 
39367
39377
  // Parses module export declaration.
39368
39378
 
39369
- pp$8.parseExportAllDeclaration = function(node, exports$1) {
39379
+ pp$8.parseExportAllDeclaration = function(node, exports) {
39370
39380
  if (this.options.ecmaVersion >= 11) {
39371
39381
  if (this.eatContextual("as")) {
39372
39382
  node.exported = this.parseModuleExportName();
39373
- this.checkExport(exports$1, node.exported, this.lastTokStart);
39383
+ this.checkExport(exports, node.exported, this.lastTokStart);
39374
39384
  } else {
39375
39385
  node.exported = null;
39376
39386
  }
@@ -39384,14 +39394,14 @@ function requireAcorn () {
39384
39394
  return this.finishNode(node, "ExportAllDeclaration")
39385
39395
  };
39386
39396
 
39387
- pp$8.parseExport = function(node, exports$1) {
39397
+ pp$8.parseExport = function(node, exports) {
39388
39398
  this.next();
39389
39399
  // export * from '...'
39390
39400
  if (this.eat(types$1.star)) {
39391
- return this.parseExportAllDeclaration(node, exports$1)
39401
+ return this.parseExportAllDeclaration(node, exports)
39392
39402
  }
39393
39403
  if (this.eat(types$1._default)) { // export default ...
39394
- this.checkExport(exports$1, "default", this.lastTokStart);
39404
+ this.checkExport(exports, "default", this.lastTokStart);
39395
39405
  node.declaration = this.parseExportDefaultDeclaration();
39396
39406
  return this.finishNode(node, "ExportDefaultDeclaration")
39397
39407
  }
@@ -39399,16 +39409,16 @@ function requireAcorn () {
39399
39409
  if (this.shouldParseExportStatement()) {
39400
39410
  node.declaration = this.parseExportDeclaration(node);
39401
39411
  if (node.declaration.type === "VariableDeclaration")
39402
- { this.checkVariableExport(exports$1, node.declaration.declarations); }
39412
+ { this.checkVariableExport(exports, node.declaration.declarations); }
39403
39413
  else
39404
- { this.checkExport(exports$1, node.declaration.id, node.declaration.id.start); }
39414
+ { this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
39405
39415
  node.specifiers = [];
39406
39416
  node.source = null;
39407
39417
  if (this.options.ecmaVersion >= 16)
39408
39418
  { node.attributes = []; }
39409
39419
  } else { // export { x, y as z } [from '...']
39410
39420
  node.declaration = null;
39411
- node.specifiers = this.parseExportSpecifiers(exports$1);
39421
+ node.specifiers = this.parseExportSpecifiers(exports);
39412
39422
  if (this.eatContextual("from")) {
39413
39423
  if (this.type !== types$1.string) { this.unexpected(); }
39414
39424
  node.source = this.parseExprAtom();
@@ -39458,47 +39468,47 @@ function requireAcorn () {
39458
39468
  }
39459
39469
  };
39460
39470
 
39461
- pp$8.checkExport = function(exports$1, name, pos) {
39462
- if (!exports$1) { return }
39471
+ pp$8.checkExport = function(exports, name, pos) {
39472
+ if (!exports) { return }
39463
39473
  if (typeof name !== "string")
39464
39474
  { name = name.type === "Identifier" ? name.name : name.value; }
39465
- if (hasOwn(exports$1, name))
39475
+ if (hasOwn(exports, name))
39466
39476
  { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
39467
- exports$1[name] = true;
39477
+ exports[name] = true;
39468
39478
  };
39469
39479
 
39470
- pp$8.checkPatternExport = function(exports$1, pat) {
39480
+ pp$8.checkPatternExport = function(exports, pat) {
39471
39481
  var type = pat.type;
39472
39482
  if (type === "Identifier")
39473
- { this.checkExport(exports$1, pat, pat.start); }
39483
+ { this.checkExport(exports, pat, pat.start); }
39474
39484
  else if (type === "ObjectPattern")
39475
39485
  { for (var i = 0, list = pat.properties; i < list.length; i += 1)
39476
39486
  {
39477
39487
  var prop = list[i];
39478
39488
 
39479
- this.checkPatternExport(exports$1, prop);
39489
+ this.checkPatternExport(exports, prop);
39480
39490
  } }
39481
39491
  else if (type === "ArrayPattern")
39482
39492
  { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
39483
39493
  var elt = list$1[i$1];
39484
39494
 
39485
- if (elt) { this.checkPatternExport(exports$1, elt); }
39495
+ if (elt) { this.checkPatternExport(exports, elt); }
39486
39496
  } }
39487
39497
  else if (type === "Property")
39488
- { this.checkPatternExport(exports$1, pat.value); }
39498
+ { this.checkPatternExport(exports, pat.value); }
39489
39499
  else if (type === "AssignmentPattern")
39490
- { this.checkPatternExport(exports$1, pat.left); }
39500
+ { this.checkPatternExport(exports, pat.left); }
39491
39501
  else if (type === "RestElement")
39492
- { this.checkPatternExport(exports$1, pat.argument); }
39502
+ { this.checkPatternExport(exports, pat.argument); }
39493
39503
  };
39494
39504
 
39495
- pp$8.checkVariableExport = function(exports$1, decls) {
39496
- if (!exports$1) { return }
39505
+ pp$8.checkVariableExport = function(exports, decls) {
39506
+ if (!exports) { return }
39497
39507
  for (var i = 0, list = decls; i < list.length; i += 1)
39498
39508
  {
39499
39509
  var decl = list[i];
39500
39510
 
39501
- this.checkPatternExport(exports$1, decl.id);
39511
+ this.checkPatternExport(exports, decl.id);
39502
39512
  }
39503
39513
  };
39504
39514
 
@@ -39513,13 +39523,13 @@ function requireAcorn () {
39513
39523
 
39514
39524
  // Parses a comma-separated list of module exports.
39515
39525
 
39516
- pp$8.parseExportSpecifier = function(exports$1) {
39526
+ pp$8.parseExportSpecifier = function(exports) {
39517
39527
  var node = this.startNode();
39518
39528
  node.local = this.parseModuleExportName();
39519
39529
 
39520
39530
  node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
39521
39531
  this.checkExport(
39522
- exports$1,
39532
+ exports,
39523
39533
  node.exported,
39524
39534
  node.exported.start
39525
39535
  );
@@ -39527,7 +39537,7 @@ function requireAcorn () {
39527
39537
  return this.finishNode(node, "ExportSpecifier")
39528
39538
  };
39529
39539
 
39530
- pp$8.parseExportSpecifiers = function(exports$1) {
39540
+ pp$8.parseExportSpecifiers = function(exports) {
39531
39541
  var nodes = [], first = true;
39532
39542
  // export { x, y as z } [from '...']
39533
39543
  this.expect(types$1.braceL);
@@ -39537,7 +39547,7 @@ function requireAcorn () {
39537
39547
  if (this.afterTrailingComma(types$1.braceR)) { break }
39538
39548
  } else { first = false; }
39539
39549
 
39540
- nodes.push(this.parseExportSpecifier(exports$1));
39550
+ nodes.push(this.parseExportSpecifier(exports));
39541
39551
  }
39542
39552
  return nodes
39543
39553
  };
@@ -43858,28 +43868,28 @@ function requireAcorn () {
43858
43868
  return Parser.tokenizer(input, options)
43859
43869
  }
43860
43870
 
43861
- exports$1.Node = Node;
43862
- exports$1.Parser = Parser;
43863
- exports$1.Position = Position;
43864
- exports$1.SourceLocation = SourceLocation;
43865
- exports$1.TokContext = TokContext;
43866
- exports$1.Token = Token;
43867
- exports$1.TokenType = TokenType;
43868
- exports$1.defaultOptions = defaultOptions;
43869
- exports$1.getLineInfo = getLineInfo;
43870
- exports$1.isIdentifierChar = isIdentifierChar;
43871
- exports$1.isIdentifierStart = isIdentifierStart;
43872
- exports$1.isNewLine = isNewLine;
43873
- exports$1.keywordTypes = keywords;
43874
- exports$1.lineBreak = lineBreak;
43875
- exports$1.lineBreakG = lineBreakG;
43876
- exports$1.nonASCIIwhitespace = nonASCIIwhitespace;
43877
- exports$1.parse = parse;
43878
- exports$1.parseExpressionAt = parseExpressionAt;
43879
- exports$1.tokContexts = types;
43880
- exports$1.tokTypes = types$1;
43881
- exports$1.tokenizer = tokenizer;
43882
- exports$1.version = version;
43871
+ exports.Node = Node;
43872
+ exports.Parser = Parser;
43873
+ exports.Position = Position;
43874
+ exports.SourceLocation = SourceLocation;
43875
+ exports.TokContext = TokContext;
43876
+ exports.Token = Token;
43877
+ exports.TokenType = TokenType;
43878
+ exports.defaultOptions = defaultOptions;
43879
+ exports.getLineInfo = getLineInfo;
43880
+ exports.isIdentifierChar = isIdentifierChar;
43881
+ exports.isIdentifierStart = isIdentifierStart;
43882
+ exports.isNewLine = isNewLine;
43883
+ exports.keywordTypes = keywords;
43884
+ exports.lineBreak = lineBreak;
43885
+ exports.lineBreakG = lineBreakG;
43886
+ exports.nonASCIIwhitespace = nonASCIIwhitespace;
43887
+ exports.parse = parse;
43888
+ exports.parseExpressionAt = parseExpressionAt;
43889
+ exports.tokContexts = types;
43890
+ exports.tokTypes = types$1;
43891
+ exports.tokenizer = tokenizer;
43892
+ exports.version = version;
43883
43893
 
43884
43894
  }));
43885
43895
  } (acorn, acorn.exports));
@@ -44850,7 +44860,7 @@ var hasRequiredEspree;
44850
44860
  function requireEspree () {
44851
44861
  if (hasRequiredEspree) return espree;
44852
44862
  hasRequiredEspree = 1;
44853
- (function (exports$1) {
44863
+ (function (exports) {
44854
44864
 
44855
44865
  var acorn = requireAcorn();
44856
44866
  var jsx = requireAcornJsx();
@@ -46122,17 +46132,17 @@ function requireEspree () {
46122
46132
 
46123
46133
  const supportedEcmaVersions = /* #__PURE__ */ getSupportedEcmaVersions();
46124
46134
 
46125
- Object.defineProperty(exports$1, "VisitorKeys", {
46135
+ Object.defineProperty(exports, "VisitorKeys", {
46126
46136
  enumerable: true,
46127
46137
  get: function () { return eslintVisitorKeys.KEYS; }
46128
46138
  });
46129
- exports$1.Syntax = Syntax;
46130
- exports$1.latestEcmaVersion = latestEcmaVersion;
46131
- exports$1.name = name;
46132
- exports$1.parse = parse;
46133
- exports$1.supportedEcmaVersions = supportedEcmaVersions;
46134
- exports$1.tokenize = tokenize;
46135
- exports$1.version = version;
46139
+ exports.Syntax = Syntax;
46140
+ exports.latestEcmaVersion = latestEcmaVersion;
46141
+ exports.name = name;
46142
+ exports.parse = parse;
46143
+ exports.supportedEcmaVersions = supportedEcmaVersions;
46144
+ exports.tokenize = tokenize;
46145
+ exports.version = version;
46136
46146
  } (espree));
46137
46147
  return espree;
46138
46148
  }
@@ -47426,12 +47436,31 @@ function requireAstUtils () {
47426
47436
  }
47427
47437
 
47428
47438
  /**
47429
- * Determines whether an opening parenthesis `(`, bracket `[` or backtick ``` ` ``` needs to be preceded by a semicolon.
47430
- * This opening parenthesis or bracket should be at the start of an `ExpressionStatement`, a `MethodDefinition` or at
47431
- * the start of the body of an `ArrowFunctionExpression`.
47439
+ * Checks whether a token can cause continuation of a preceding expression
47440
+ * (for example, of a class field initializer expression) in a class body.
47441
+ * This function checks specifically for tokens that can appear at the start
47442
+ * of a class member: `[` (computed key), `*` (generator method), `in` or `instanceof` (valid keys)
47443
+ * Without a preceding semicolon, these tokens would be parsed as index access or operators.
47444
+ * @param {Token} token The token to check.
47445
+ * @returns {boolean} Whether the token can cause continuation of a preceding expression.
47446
+ */
47447
+ function canContinueExpressionInClassBody(token) {
47448
+ return (
47449
+ (token.type === "Punctuator" &&
47450
+ (token.value === "[" || token.value === "*")) ||
47451
+ // Different parsers may return these tokens as either "Identifier" or "Keyword"
47452
+ ((token.type === "Identifier" || token.type === "Keyword") &&
47453
+ (token.value === "in" || token.value === "instanceof"))
47454
+ );
47455
+ }
47456
+
47457
+ /**
47458
+ * Determines whether an opening parenthesis `(`, bracket `[`, asterisk `*`, or backtick ``` ` ``` needs to be preceded by a semicolon.
47459
+ * This opening parenthesis or bracket should be at the start of an `ExpressionStatement`, a `MethodDefinition`, a `PropertyDefinition`,
47460
+ * or at the start of the body of an `ArrowFunctionExpression`.
47432
47461
  * @type {(sourceCode: SourceCode, node: ASTNode) => boolean}
47433
47462
  * @param {SourceCode} sourceCode The source code object.
47434
- * @param {ASTNode} node A node at the position where an opening parenthesis or bracket will be inserted.
47463
+ * @param {ASTNode} node A node at the position where an opening parenthesis, bracket, or asterisk will be inserted.
47435
47464
  * @returns {boolean} Whether a semicolon is required before the opening parenthesis or bracket.
47436
47465
  */
47437
47466
  let needsPrecedingSemicolon;
@@ -47522,6 +47551,18 @@ function requireAstUtils () {
47522
47551
 
47523
47552
  const prevNode = sourceCode.getNodeByRangeIndex(prevToken.range[0]);
47524
47553
 
47554
+ // Uninitialized class fields don't need a semicolon
47555
+ if (
47556
+ // Key
47557
+ (prevNode.parent.type === "PropertyDefinition" &&
47558
+ prevNode.parent.key === prevNode) ||
47559
+ // Closing bracket of a computed key
47560
+ (prevNode.type === "PropertyDefinition" &&
47561
+ isClosingBracketToken(prevToken))
47562
+ ) {
47563
+ return false;
47564
+ }
47565
+
47525
47566
  if (
47526
47567
  prevNode.type === "TSDeclareFunction" ||
47527
47568
  prevNode.parent.type === "TSImportEqualsDeclaration" ||
@@ -49010,6 +49051,7 @@ function requireAstUtils () {
49010
49051
  isTopLevelExpressionStatement,
49011
49052
  isDirective,
49012
49053
  isStartOfExpressionStatement,
49054
+ canContinueExpressionInClassBody,
49013
49055
  needsPrecedingSemicolon,
49014
49056
  isImportAttributeKey,
49015
49057
  getOpeningParenOfParams,
@@ -53268,6 +53310,8 @@ function requireCapitalizedComments () {
53268
53310
  },
53269
53311
  ],
53270
53312
 
53313
+ defaultOptions: ["always"],
53314
+
53271
53315
  messages: {
53272
53316
  unexpectedLowercaseComment:
53273
53317
  "Comments should not begin with a lowercase character.",
@@ -53277,7 +53321,7 @@ function requireCapitalizedComments () {
53277
53321
  },
53278
53322
 
53279
53323
  create(context) {
53280
- const capitalize = context.options[0] || "always",
53324
+ const capitalize = context.options[0],
53281
53325
  normalizedOptions = getAllNormalizedOptions(context.options[1]),
53282
53326
  sourceCode = context.sourceCode;
53283
53327
 
@@ -53488,8 +53532,6 @@ function requireClassMethodsUseThis () {
53488
53532
  /** @type {import('../types').Rule.RuleModule} */
53489
53533
  classMethodsUseThis = {
53490
53534
  meta: {
53491
- dialects: ["javascript", "typescript"],
53492
- language: "javascript",
53493
53535
  type: "suggestion",
53494
53536
 
53495
53537
  defaultOptions: [
@@ -53502,6 +53544,7 @@ function requireClassMethodsUseThis () {
53502
53544
 
53503
53545
  docs: {
53504
53546
  description: "Enforce that class methods utilize `this`",
53547
+ dialects: ["JavaScript", "TypeScript"],
53505
53548
  recommended: false,
53506
53549
  url: "https://eslint.org/docs/latest/rules/class-methods-use-this",
53507
53550
  },
@@ -56811,12 +56854,11 @@ function requireDefaultParamLast () {
56811
56854
  /** @type {import('../types').Rule.RuleModule} */
56812
56855
  defaultParamLast = {
56813
56856
  meta: {
56814
- dialects: ["javascript", "typescript"],
56815
- language: "javascript",
56816
56857
  type: "suggestion",
56817
56858
 
56818
56859
  docs: {
56819
56860
  description: "Enforce default parameters to be last",
56861
+ dialects: ["JavaScript", "TypeScript"],
56820
56862
  recommended: false,
56821
56863
  frozen: true,
56822
56864
  url: "https://eslint.org/docs/latest/rules/default-param-last",
@@ -57526,6 +57568,8 @@ function requireEqeqeq () {
57526
57568
  ],
57527
57569
  },
57528
57570
 
57571
+ defaultOptions: ["always"],
57572
+
57529
57573
  fixable: "code",
57530
57574
 
57531
57575
  messages: {
@@ -57537,7 +57581,7 @@ function requireEqeqeq () {
57537
57581
  },
57538
57582
 
57539
57583
  create(context) {
57540
- const config = context.options[0] || "always";
57584
+ const config = context.options[0];
57541
57585
  const options = context.options[1] || {};
57542
57586
  const sourceCode = context.sourceCode;
57543
57587
 
@@ -57802,6 +57846,50 @@ function requireForDirection () {
57802
57846
  }
57803
57847
  return 0;
57804
57848
  }
57849
+ /**
57850
+ * Collects all expressions that modify the counter.
57851
+ * @param {ASTNode} node The expression node to check.
57852
+ * @param {string} counter The name of the counter variable.
57853
+ * @returns {ASTNode[]} An array of modifying expressions.
57854
+ */
57855
+ function getModifyingExpressions(node, counter) {
57856
+ if (node.type === "SequenceExpression") {
57857
+ return node.expressions.flatMap(expr =>
57858
+ getModifyingExpressions(expr, counter),
57859
+ );
57860
+ }
57861
+ if (
57862
+ node.type === "UpdateExpression" &&
57863
+ node.argument.type === "Identifier" &&
57864
+ node.argument.name === counter
57865
+ ) {
57866
+ return [node];
57867
+ }
57868
+ if (
57869
+ node.type === "AssignmentExpression" &&
57870
+ node.left.type === "Identifier" &&
57871
+ node.left.name === counter
57872
+ ) {
57873
+ return [node];
57874
+ }
57875
+ return [];
57876
+ }
57877
+
57878
+ /**
57879
+ * Determines the direction of a single update expression for the counter.
57880
+ * @param {ASTNode} expr An expression node to check (UpdateExpression or AssignmentExpression).
57881
+ * @param {string} counter The variable name of the counter.
57882
+ * @returns {number} 1 if incrementing, -1 if decrementing, 0 if unknown or not modifying the counter.
57883
+ */
57884
+ function getDirectionFromExpression(expr, counter) {
57885
+ if (expr.type === "UpdateExpression") {
57886
+ return getUpdateDirection(expr, counter);
57887
+ }
57888
+ if (expr.type === "AssignmentExpression") {
57889
+ return getAssignmentDirection(expr, counter);
57890
+ }
57891
+ return 0;
57892
+ }
57805
57893
 
57806
57894
  return {
57807
57895
  ForStatement(node) {
@@ -57831,17 +57919,17 @@ function requireForDirection () {
57831
57919
  return;
57832
57920
  }
57833
57921
 
57834
- if (update.type === "UpdateExpression") {
57835
- if (
57836
- getUpdateDirection(update, counter) ===
57837
- wrongDirection
57838
- ) {
57839
- report(node);
57840
- }
57841
- } else if (
57842
- update.type === "AssignmentExpression" &&
57843
- getAssignmentDirection(update, counter) ===
57844
- wrongDirection
57922
+ const mutatingExpressions = getModifyingExpressions(
57923
+ update,
57924
+ counter,
57925
+ );
57926
+
57927
+ if (
57928
+ mutatingExpressions.length === 1 &&
57929
+ getDirectionFromExpression(
57930
+ mutatingExpressions[0],
57931
+ counter,
57932
+ ) === wrongDirection
57845
57933
  ) {
57846
57934
  report(node);
57847
57935
  }
@@ -58255,6 +58343,8 @@ function requireFuncNameMatching () {
58255
58343
  ],
58256
58344
  },
58257
58345
 
58346
+ defaultOptions: ["always"],
58347
+
58258
58348
  messages: {
58259
58349
  matchProperty:
58260
58350
  "Function name `{{funcName}}` should match property name `{{name}}`.",
@@ -58720,8 +58810,6 @@ function requireFuncStyle () {
58720
58810
  /** @type {import('../types').Rule.RuleModule} */
58721
58811
  funcStyle = {
58722
58812
  meta: {
58723
- dialects: ["javascript", "typescript"],
58724
- language: "javascript",
58725
58813
  type: "suggestion",
58726
58814
 
58727
58815
  defaultOptions: [
@@ -58736,6 +58824,7 @@ function requireFuncStyle () {
58736
58824
  docs: {
58737
58825
  description:
58738
58826
  "Enforce the consistent use of either `function` declarations or expressions assigned to variables",
58827
+ dialects: ["JavaScript", "TypeScript"],
58739
58828
  recommended: false,
58740
58829
  frozen: true,
58741
58830
  url: "https://eslint.org/docs/latest/rules/func-style",
@@ -65585,12 +65674,11 @@ function requireInitDeclarations () {
65585
65674
  initDeclarations = {
65586
65675
  meta: {
65587
65676
  type: "suggestion",
65588
- dialects: ["typescript", "javascript"],
65589
- language: "javascript",
65590
65677
 
65591
65678
  docs: {
65592
65679
  description:
65593
65680
  "Require or disallow initialization in variable declarations",
65681
+ dialects: ["JavaScript", "TypeScript"],
65594
65682
  recommended: false,
65595
65683
  frozen: true,
65596
65684
  url: "https://eslint.org/docs/latest/rules/init-declarations",
@@ -65629,6 +65717,9 @@ function requireInitDeclarations () {
65629
65717
  },
65630
65718
  ],
65631
65719
  },
65720
+
65721
+ defaultOptions: ["always"],
65722
+
65632
65723
  messages: {
65633
65724
  initialized:
65634
65725
  "Variable '{{idName}}' should be initialized on declaration.",
@@ -65638,10 +65729,7 @@ function requireInitDeclarations () {
65638
65729
  },
65639
65730
 
65640
65731
  create(context) {
65641
- const MODE_ALWAYS = "always",
65642
- MODE_NEVER = "never";
65643
-
65644
- const mode = context.options[0] || MODE_ALWAYS;
65732
+ const mode = context.options[0];
65645
65733
  const params = context.options[1] || {};
65646
65734
 
65647
65735
  // Track whether we're inside a declared namespace
@@ -65680,10 +65768,10 @@ function requireInitDeclarations () {
65680
65768
  params.ignoreForLoopInit && isForLoop(node.parent);
65681
65769
  let messageId = "";
65682
65770
 
65683
- if (mode === MODE_ALWAYS && !initialized) {
65771
+ if (mode === "always" && !initialized) {
65684
65772
  messageId = "initialized";
65685
65773
  } else if (
65686
- mode === MODE_NEVER &&
65774
+ mode === "never" &&
65687
65775
  !CONSTANT_BINDINGS.has(kind) &&
65688
65776
  initialized &&
65689
65777
  !isIgnoredForLoop
@@ -69174,6 +69262,9 @@ function requireLogicalAssignmentOperators () {
69174
69262
  },
69175
69263
  ],
69176
69264
  },
69265
+
69266
+ defaultOptions: ["always"],
69267
+
69177
69268
  fixable: "code",
69178
69269
  hasSuggestions: true,
69179
69270
  messages: {
@@ -69196,7 +69287,7 @@ function requireLogicalAssignmentOperators () {
69196
69287
  },
69197
69288
 
69198
69289
  create(context) {
69199
- const mode = context.options[0] === "never" ? "never" : "always";
69290
+ const mode = context.options[0];
69200
69291
  const checkIf =
69201
69292
  mode === "always" &&
69202
69293
  context.options.length > 1 &&
@@ -69659,16 +69750,18 @@ function requireMaxClassesPerFile () {
69659
69750
  },
69660
69751
  ],
69661
69752
 
69753
+ defaultOptions: [1],
69754
+
69662
69755
  messages: {
69663
69756
  maximumExceeded:
69664
69757
  "File has too many classes ({{ classCount }}). Maximum allowed is {{ max }}.",
69665
69758
  },
69666
69759
  },
69667
69760
  create(context) {
69668
- const [option = {}] = context.options;
69761
+ const option = context.options[0];
69669
69762
  const [ignoreExpressions, max] =
69670
69763
  typeof option === "number"
69671
- ? [false, option || 1]
69764
+ ? [false, option]
69672
69765
  : [option.ignoreExpressions, option.max || 1];
69673
69766
 
69674
69767
  let classCount = 0;
@@ -69754,6 +69847,9 @@ function requireMaxDepth () {
69754
69847
  ],
69755
69848
  },
69756
69849
  ],
69850
+
69851
+ defaultOptions: [4],
69852
+
69757
69853
  messages: {
69758
69854
  tooDeeply:
69759
69855
  "Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}.",
@@ -70448,6 +70544,9 @@ function requireMaxLines () {
70448
70544
  ],
70449
70545
  },
70450
70546
  ],
70547
+
70548
+ defaultOptions: [300],
70549
+
70451
70550
  messages: {
70452
70551
  exceed: "File has too many lines ({{actual}}). Maximum allowed is {{max}}.",
70453
70552
  },
@@ -70659,6 +70758,9 @@ function requireMaxLinesPerFunction () {
70659
70758
  },
70660
70759
 
70661
70760
  schema: [OPTIONS_OR_INTEGER_SCHEMA],
70761
+
70762
+ defaultOptions: [50],
70763
+
70662
70764
  messages: {
70663
70765
  exceed: "{{name}} has too many lines ({{lineCount}}). Maximum allowed is {{maxLines}}.",
70664
70766
  },
@@ -70871,6 +70973,9 @@ function requireMaxNestedCallbacks () {
70871
70973
  ],
70872
70974
  },
70873
70975
  ],
70976
+
70977
+ defaultOptions: [10],
70978
+
70874
70979
  messages: {
70875
70980
  exceed: "Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.",
70876
70981
  },
@@ -70970,12 +71075,11 @@ function requireMaxParams () {
70970
71075
  maxParams = {
70971
71076
  meta: {
70972
71077
  type: "suggestion",
70973
- dialects: ["typescript", "javascript"],
70974
- language: "javascript",
70975
71078
 
70976
71079
  docs: {
70977
71080
  description:
70978
71081
  "Enforce a maximum number of parameters in function definitions",
71082
+ dialects: ["JavaScript", "TypeScript"],
70979
71083
  recommended: false,
70980
71084
  url: "https://eslint.org/docs/latest/rules/max-params",
70981
71085
  },
@@ -71015,6 +71119,9 @@ function requireMaxParams () {
71015
71119
  ],
71016
71120
  },
71017
71121
  ],
71122
+
71123
+ defaultOptions: [3],
71124
+
71018
71125
  messages: {
71019
71126
  exceed: "{{name}} has too many parameters ({{count}}). Maximum allowed is {{max}}.",
71020
71127
  },
@@ -71167,6 +71274,9 @@ function requireMaxStatements () {
71167
71274
  additionalProperties: false,
71168
71275
  },
71169
71276
  ],
71277
+
71278
+ defaultOptions: [10],
71279
+
71170
71280
  messages: {
71171
71281
  exceed: "{{name}} has too many statements ({{count}}). Maximum allowed is {{max}}.",
71172
71282
  },
@@ -73789,12 +73899,11 @@ function requireNoArrayConstructor () {
73789
73899
  /** @type {import('../types').Rule.RuleModule} */
73790
73900
  noArrayConstructor = {
73791
73901
  meta: {
73792
- dialects: ["javascript", "typescript"],
73793
- language: "javascript",
73794
73902
  type: "suggestion",
73795
73903
 
73796
73904
  docs: {
73797
73905
  description: "Disallow `Array` constructors",
73906
+ dialects: ["JavaScript", "TypeScript"],
73798
73907
  recommended: false,
73799
73908
  url: "https://eslint.org/docs/latest/rules/no-array-constructor",
73800
73909
  },
@@ -79833,11 +79942,10 @@ function requireNoDupeClassMembers () {
79833
79942
  noDupeClassMembers = {
79834
79943
  meta: {
79835
79944
  type: "problem",
79836
- dialects: ["javascript", "typescript"],
79837
- language: "javascript",
79838
79945
 
79839
79946
  docs: {
79840
79947
  description: "Disallow duplicate class members",
79948
+ dialects: ["JavaScript", "TypeScript"],
79841
79949
  recommended: true,
79842
79950
  url: "https://eslint.org/docs/latest/rules/no-dupe-class-members",
79843
79951
  },
@@ -80650,8 +80758,6 @@ function requireNoDuplicateImports () {
80650
80758
  /** @type {import('../types').Rule.RuleModule} */
80651
80759
  noDuplicateImports = {
80652
80760
  meta: {
80653
- dialects: ["javascript", "typescript"],
80654
- language: "javascript",
80655
80761
  type: "problem",
80656
80762
 
80657
80763
  defaultOptions: [
@@ -80663,6 +80769,7 @@ function requireNoDuplicateImports () {
80663
80769
 
80664
80770
  docs: {
80665
80771
  description: "Disallow duplicate module imports",
80772
+ dialects: ["JavaScript", "TypeScript"],
80666
80773
  recommended: false,
80667
80774
  url: "https://eslint.org/docs/latest/rules/no-duplicate-imports",
80668
80775
  },
@@ -81686,8 +81793,6 @@ function requireNoEmptyFunction () {
81686
81793
  /** @type {import('../types').Rule.RuleModule} */
81687
81794
  noEmptyFunction = {
81688
81795
  meta: {
81689
- dialects: ["javascript", "typescript"],
81690
- language: "javascript",
81691
81796
  hasSuggestions: true,
81692
81797
  type: "suggestion",
81693
81798
 
@@ -81695,6 +81800,7 @@ function requireNoEmptyFunction () {
81695
81800
 
81696
81801
  docs: {
81697
81802
  description: "Disallow empty functions",
81803
+ dialects: ["JavaScript", "TypeScript"],
81698
81804
  recommended: false,
81699
81805
  url: "https://eslint.org/docs/latest/rules/no-empty-function",
81700
81806
  },
@@ -87534,8 +87640,6 @@ function requireNoInvalidThis () {
87534
87640
  /** @type {import('../types').Rule.RuleModule} */
87535
87641
  noInvalidThis = {
87536
87642
  meta: {
87537
- dialects: ["javascript", "typescript"],
87538
- language: "javascript",
87539
87643
  type: "suggestion",
87540
87644
 
87541
87645
  defaultOptions: [{ capIsConstructor: true }],
@@ -87543,6 +87647,7 @@ function requireNoInvalidThis () {
87543
87647
  docs: {
87544
87648
  description:
87545
87649
  "Disallow use of `this` in contexts where the value of `this` is `undefined`",
87650
+ dialects: ["JavaScript", "TypeScript"],
87546
87651
  recommended: false,
87547
87652
  url: "https://eslint.org/docs/latest/rules/no-invalid-this",
87548
87653
  },
@@ -88614,12 +88719,11 @@ function requireNoLoopFunc () {
88614
88719
  noLoopFunc = {
88615
88720
  meta: {
88616
88721
  type: "suggestion",
88617
- dialects: ["typescript", "javascript"],
88618
- language: "javascript",
88619
88722
 
88620
88723
  docs: {
88621
88724
  description:
88622
88725
  "Disallow function declarations that contain unsafe references inside loop statements",
88726
+ dialects: ["JavaScript", "TypeScript"],
88623
88727
  recommended: false,
88624
88728
  url: "https://eslint.org/docs/latest/rules/no-loop-func",
88625
88729
  },
@@ -89072,11 +89176,10 @@ function requireNoLossOfPrecision () {
89072
89176
  noLossOfPrecision = {
89073
89177
  meta: {
89074
89178
  type: "problem",
89075
- dialects: ["typescript", "javascript"],
89076
- language: "javascript",
89077
89179
 
89078
89180
  docs: {
89079
89181
  description: "Disallow literal numbers that lose precision",
89182
+ dialects: ["JavaScript", "TypeScript"],
89080
89183
  recommended: true,
89081
89184
  url: "https://eslint.org/docs/latest/rules/no-loss-of-precision",
89082
89185
  },
@@ -89201,11 +89304,10 @@ function requireNoMagicNumbers () {
89201
89304
  noMagicNumbers = {
89202
89305
  meta: {
89203
89306
  type: "suggestion",
89204
- dialects: ["typescript", "javascript"],
89205
- language: "javascript",
89206
89307
 
89207
89308
  docs: {
89208
89309
  description: "Disallow magic numbers",
89310
+ dialects: ["JavaScript", "TypeScript"],
89209
89311
  recommended: false,
89210
89312
  frozen: true,
89211
89313
  url: "https://eslint.org/docs/latest/rules/no-magic-numbers",
@@ -89217,11 +89319,9 @@ function requireNoMagicNumbers () {
89217
89319
  properties: {
89218
89320
  detectObjects: {
89219
89321
  type: "boolean",
89220
- default: false,
89221
89322
  },
89222
89323
  enforceConst: {
89223
89324
  type: "boolean",
89224
- default: false,
89225
89325
  },
89226
89326
  ignore: {
89227
89327
  type: "array",
@@ -89238,37 +89338,45 @@ function requireNoMagicNumbers () {
89238
89338
  },
89239
89339
  ignoreArrayIndexes: {
89240
89340
  type: "boolean",
89241
- default: false,
89242
89341
  },
89243
89342
  ignoreDefaultValues: {
89244
89343
  type: "boolean",
89245
- default: false,
89246
89344
  },
89247
89345
  ignoreClassFieldInitialValues: {
89248
89346
  type: "boolean",
89249
- default: false,
89250
89347
  },
89251
89348
  ignoreEnums: {
89252
89349
  type: "boolean",
89253
- default: false,
89254
89350
  },
89255
89351
  ignoreNumericLiteralTypes: {
89256
89352
  type: "boolean",
89257
- default: false,
89258
89353
  },
89259
89354
  ignoreReadonlyClassProperties: {
89260
89355
  type: "boolean",
89261
- default: false,
89262
89356
  },
89263
89357
  ignoreTypeIndexes: {
89264
89358
  type: "boolean",
89265
- default: false,
89266
89359
  },
89267
89360
  },
89268
89361
  additionalProperties: false,
89269
89362
  },
89270
89363
  ],
89271
89364
 
89365
+ defaultOptions: [
89366
+ {
89367
+ detectObjects: false,
89368
+ enforceConst: false,
89369
+ ignore: [],
89370
+ ignoreArrayIndexes: false,
89371
+ ignoreDefaultValues: false,
89372
+ ignoreClassFieldInitialValues: false,
89373
+ ignoreEnums: false,
89374
+ ignoreNumericLiteralTypes: false,
89375
+ ignoreReadonlyClassProperties: false,
89376
+ ignoreTypeIndexes: false,
89377
+ },
89378
+ ],
89379
+
89272
89380
  messages: {
89273
89381
  useConst: "Number constants declarations must use 'const'.",
89274
89382
  noMagic: "No magic number: {{raw}}.",
@@ -89276,19 +89384,19 @@ function requireNoMagicNumbers () {
89276
89384
  },
89277
89385
 
89278
89386
  create(context) {
89279
- const config = context.options[0] || {},
89280
- detectObjects = !!config.detectObjects,
89281
- enforceConst = !!config.enforceConst,
89282
- ignore = new Set((config.ignore || []).map(normalizeIgnoreValue)),
89283
- ignoreArrayIndexes = !!config.ignoreArrayIndexes,
89284
- ignoreDefaultValues = !!config.ignoreDefaultValues,
89285
- ignoreClassFieldInitialValues =
89286
- !!config.ignoreClassFieldInitialValues,
89287
- ignoreEnums = !!config.ignoreEnums,
89288
- ignoreNumericLiteralTypes = !!config.ignoreNumericLiteralTypes,
89289
- ignoreReadonlyClassProperties =
89290
- !!config.ignoreReadonlyClassProperties,
89291
- ignoreTypeIndexes = !!config.ignoreTypeIndexes;
89387
+ const {
89388
+ detectObjects,
89389
+ enforceConst,
89390
+ ignore: rawIgnore,
89391
+ ignoreArrayIndexes,
89392
+ ignoreDefaultValues,
89393
+ ignoreClassFieldInitialValues,
89394
+ ignoreEnums,
89395
+ ignoreNumericLiteralTypes,
89396
+ ignoreReadonlyClassProperties,
89397
+ ignoreTypeIndexes,
89398
+ } = context.options[0];
89399
+ const ignore = new Set(rawIgnore.map(normalizeIgnoreValue));
89292
89400
 
89293
89401
  const okTypes = detectObjects
89294
89402
  ? []
@@ -94829,6 +94937,8 @@ function requireNoRestrictedExports () {
94829
94937
  },
94830
94938
  ],
94831
94939
 
94940
+ defaultOptions: [{}],
94941
+
94832
94942
  messages: {
94833
94943
  restrictedNamed:
94834
94944
  "'{{name}}' is restricted from being used as an exported name.",
@@ -94837,14 +94947,12 @@ function requireNoRestrictedExports () {
94837
94947
  },
94838
94948
 
94839
94949
  create(context) {
94840
- const restrictedNames = new Set(
94841
- context.options[0] && context.options[0].restrictedNamedExports,
94842
- );
94843
- const restrictedNamePattern =
94844
- context.options[0] &&
94845
- context.options[0].restrictedNamedExportsPattern;
94846
- const restrictDefaultExports =
94847
- context.options[0] && context.options[0].restrictDefaultExports;
94950
+ const {
94951
+ restrictedNamedExports,
94952
+ restrictedNamedExportsPattern: restrictedNamePattern,
94953
+ restrictDefaultExports,
94954
+ } = context.options[0];
94955
+ const restrictedNames = new Set(restrictedNamedExports);
94848
94956
  const sourceCode = context.sourceCode;
94849
94957
 
94850
94958
  /**
@@ -95026,12 +95134,11 @@ function requireNoRestrictedGlobals () {
95026
95134
  /** @type {import('../types').Rule.RuleModule} */
95027
95135
  noRestrictedGlobals = {
95028
95136
  meta: {
95029
- dialects: ["javascript", "typescript"],
95030
- language: "javascript",
95031
95137
  type: "suggestion",
95032
95138
 
95033
95139
  docs: {
95034
95140
  description: "Disallow specified global variables",
95141
+ dialects: ["JavaScript", "TypeScript"],
95035
95142
  recommended: false,
95036
95143
  url: "https://eslint.org/docs/latest/rules/no-restricted-globals",
95037
95144
  },
@@ -96064,11 +96171,10 @@ function requireNoRestrictedImports () {
96064
96171
  noRestrictedImports = {
96065
96172
  meta: {
96066
96173
  type: "suggestion",
96067
- dialects: ["typescript", "javascript"],
96068
- language: "javascript",
96069
96174
 
96070
96175
  docs: {
96071
96176
  description: "Disallow specified modules when loaded by `import`",
96177
+ dialects: ["JavaScript", "TypeScript"],
96072
96178
  recommended: false,
96073
96179
  url: "https://eslint.org/docs/latest/rules/no-restricted-imports",
96074
96180
  },
@@ -97121,6 +97227,8 @@ function requireNoRestrictedProperties () {
97121
97227
  uniqueItems: true,
97122
97228
  },
97123
97229
 
97230
+ defaultOptions: [],
97231
+
97124
97232
  messages: {
97125
97233
  restrictedObjectProperty:
97126
97234
  // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
@@ -97334,6 +97442,8 @@ function requireNoRestrictedSyntax () {
97334
97442
  minItems: 0,
97335
97443
  },
97336
97444
 
97445
+ defaultOptions: [],
97446
+
97337
97447
  messages: {
97338
97448
  // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period
97339
97449
  restrictedSyntax: "{{message}}",
@@ -98447,8 +98557,6 @@ function requireNoShadow () {
98447
98557
  noShadow = {
98448
98558
  meta: {
98449
98559
  type: "suggestion",
98450
- dialects: ["typescript", "javascript"],
98451
- language: "javascript",
98452
98560
 
98453
98561
  defaultOptions: [
98454
98562
  {
@@ -98464,6 +98572,7 @@ function requireNoShadow () {
98464
98572
  docs: {
98465
98573
  description:
98466
98574
  "Disallow variable declarations from shadowing variables declared in the outer scope",
98575
+ dialects: ["JavaScript", "TypeScript"],
98467
98576
  recommended: false,
98468
98577
  url: "https://eslint.org/docs/latest/rules/no-shadow",
98469
98578
  },
@@ -100388,12 +100497,11 @@ function requireNoUnassignedVars () {
100388
100497
  noUnassignedVars = {
100389
100498
  meta: {
100390
100499
  type: "problem",
100391
- dialects: ["typescript", "javascript"],
100392
- language: "javascript",
100393
100500
 
100394
100501
  docs: {
100395
100502
  description:
100396
100503
  "Disallow `let` or `var` variables that are read but never assigned",
100504
+ dialects: ["JavaScript", "TypeScript"],
100397
100505
  recommended: true,
100398
100506
  url: "https://eslint.org/docs/latest/rules/no-unassigned-vars",
100399
100507
  },
@@ -102973,12 +103081,11 @@ function requireNoUnusedExpressions () {
102973
103081
  /** @type {import('../types').Rule.RuleModule} */
102974
103082
  noUnusedExpressions = {
102975
103083
  meta: {
102976
- dialects: ["javascript", "typescript"],
102977
- language: "javascript",
102978
103084
  type: "suggestion",
102979
103085
 
102980
103086
  docs: {
102981
103087
  description: "Disallow unused expressions",
103088
+ dialects: ["JavaScript", "TypeScript"],
102982
103089
  recommended: false,
102983
103090
  url: "https://eslint.org/docs/latest/rules/no-unused-expressions",
102984
103091
  },
@@ -103350,6 +103457,12 @@ function requireNoUnusedPrivateClassMembers () {
103350
103457
  if (hasRequiredNoUnusedPrivateClassMembers) return noUnusedPrivateClassMembers;
103351
103458
  hasRequiredNoUnusedPrivateClassMembers = 1;
103352
103459
 
103460
+ //------------------------------------------------------------------------------
103461
+ // Requirements
103462
+ //------------------------------------------------------------------------------
103463
+
103464
+ const astUtils = requireAstUtils();
103465
+
103353
103466
  //------------------------------------------------------------------------------
103354
103467
  // Rule Definition
103355
103468
  //------------------------------------------------------------------------------
@@ -103358,6 +103471,7 @@ function requireNoUnusedPrivateClassMembers () {
103358
103471
  noUnusedPrivateClassMembers = {
103359
103472
  meta: {
103360
103473
  type: "problem",
103474
+ hasSuggestions: true,
103361
103475
 
103362
103476
  docs: {
103363
103477
  description: "Disallow unused private class members",
@@ -103370,12 +103484,168 @@ function requireNoUnusedPrivateClassMembers () {
103370
103484
  messages: {
103371
103485
  unusedPrivateClassMember:
103372
103486
  "'{{classMemberName}}' is defined but never used.",
103487
+ removeUnusedPrivateClassMember:
103488
+ "Remove unused private class member '{{classMemberName}}'.",
103373
103489
  },
103374
103490
  },
103375
103491
 
103376
103492
  create(context) {
103493
+ const sourceCode = context.sourceCode;
103377
103494
  const trackedClasses = [];
103378
103495
 
103496
+ /**
103497
+ * Gets the start index of the line that contains a given token or node.
103498
+ * @param {ASTNode|Token|Comment} nodeOrToken The token or node to check
103499
+ * @returns {number} The line start index
103500
+ */
103501
+ function getLineStartIndex(nodeOrToken) {
103502
+ return nodeOrToken.range[0] - nodeOrToken.loc.start.column;
103503
+ }
103504
+
103505
+ /**
103506
+ * Checks whether a token or node starts on its own line, preceded only by whitespace.
103507
+ * @param {ASTNode|Token|Comment} nodeOrToken The token or node to check
103508
+ * @returns {boolean} Whether the token or node starts on its own line
103509
+ */
103510
+ function startsOnOwnLine(nodeOrToken) {
103511
+ return (
103512
+ sourceCode.getTokenBefore(nodeOrToken, {
103513
+ includeComments: true,
103514
+ }).loc.end.line !== nodeOrToken.loc.start.line
103515
+ );
103516
+ }
103517
+
103518
+ /**
103519
+ * Gets leading comments that are directly attached to a class member.
103520
+ * @param {ASTNode} classMemberNode The class member node
103521
+ * @returns {Comment[]} Leading comments to remove with the member
103522
+ */
103523
+ function getLeadingComments(classMemberNode) {
103524
+ const commentsBefore =
103525
+ sourceCode.getCommentsBefore(classMemberNode);
103526
+ const lastNonLeadingCommentIndex = commentsBefore.findLastIndex(
103527
+ (comment, index, self) => {
103528
+ const next =
103529
+ index < self.length - 1
103530
+ ? self[index + 1]
103531
+ : classMemberNode;
103532
+
103533
+ return (
103534
+ !startsOnOwnLine(comment) ||
103535
+ next.loc.start.line - comment.loc.end.line > 1
103536
+ );
103537
+ },
103538
+ );
103539
+
103540
+ return commentsBefore.slice(lastNonLeadingCommentIndex + 1);
103541
+ }
103542
+
103543
+ /**
103544
+ * Checks whether a class member shares its line with another token.
103545
+ * @param {ASTNode} classMemberNode The class member node
103546
+ * @returns {boolean} Whether the member shares its line with another token
103547
+ */
103548
+ function sharesLineWithAnotherToken(classMemberNode) {
103549
+ const previousToken = sourceCode.getTokenBefore(classMemberNode);
103550
+ const nextToken = sourceCode.getTokenAfter(classMemberNode);
103551
+
103552
+ return (
103553
+ previousToken.loc.end.line === classMemberNode.loc.start.line ||
103554
+ nextToken.loc.start.line === classMemberNode.loc.end.line
103555
+ );
103556
+ }
103557
+
103558
+ /**
103559
+ * Gets trailing comments that are directly attached to a class member.
103560
+ * Same-line trailing comments are preserved when another token shares
103561
+ * the line, because the comment might describe the remaining code rather
103562
+ * than the unused member alone.
103563
+ * @param {ASTNode} classMemberNode The class member node
103564
+ * @returns {Comment[]} Trailing comments to remove with the member
103565
+ */
103566
+ function getTrailingComments(classMemberNode) {
103567
+ if (sharesLineWithAnotherToken(classMemberNode)) {
103568
+ return [];
103569
+ }
103570
+
103571
+ return sourceCode
103572
+ .getCommentsAfter(classMemberNode)
103573
+ .filter(
103574
+ comment =>
103575
+ comment.loc.start.line === classMemberNode.loc.end.line,
103576
+ );
103577
+ }
103578
+
103579
+ /**
103580
+ * Gets the token after which a semicolon should be inserted when removing a class member.
103581
+ * @param {ASTNode} classMemberNode The member that would be removed
103582
+ * @returns {Token|null} The token after which a semicolon should be inserted, or null if no semicolon is needed
103583
+ */
103584
+ function getSemicolonInsertionToken(classMemberNode) {
103585
+ const nextToken = sourceCode.getTokenAfter(classMemberNode);
103586
+
103587
+ if (
103588
+ astUtils.canContinueExpressionInClassBody(nextToken) &&
103589
+ astUtils.needsPrecedingSemicolon(sourceCode, classMemberNode)
103590
+ ) {
103591
+ return sourceCode.getTokenBefore(classMemberNode);
103592
+ }
103593
+
103594
+ return null;
103595
+ }
103596
+
103597
+ /**
103598
+ * Gets the replacement range for removing an unused class member.
103599
+ * @param {ASTNode} classMemberNode The member that would be removed
103600
+ * @returns {number[]} The text range to remove
103601
+ */
103602
+ function getMemberRemovalRange(classMemberNode) {
103603
+ const leadingComments = getLeadingComments(classMemberNode);
103604
+ const trailingComments = getTrailingComments(classMemberNode);
103605
+ const shouldRemoveLeadingComments =
103606
+ leadingComments.length > 0 &&
103607
+ !sharesLineWithAnotherToken(classMemberNode);
103608
+ const lastItemToRemove =
103609
+ trailingComments.length > 0
103610
+ ? trailingComments.at(-1)
103611
+ : classMemberNode;
103612
+
103613
+ const previousToken = sourceCode.getTokenBefore(classMemberNode);
103614
+ const nextToken = sourceCode.getTokenAfter(lastItemToRemove, {
103615
+ includeComments: true,
103616
+ });
103617
+ const nextTokenStartsOnNewLine =
103618
+ nextToken.loc.start.line > lastItemToRemove.loc.end.line;
103619
+ const shouldRemoveOwnLine =
103620
+ !shouldRemoveLeadingComments &&
103621
+ startsOnOwnLine(classMemberNode) &&
103622
+ nextTokenStartsOnNewLine;
103623
+ let start = classMemberNode.range[0];
103624
+ let end = lastItemToRemove.range[1];
103625
+
103626
+ if (shouldRemoveLeadingComments) {
103627
+ start = nextTokenStartsOnNewLine
103628
+ ? getLineStartIndex(leadingComments[0])
103629
+ : leadingComments[0].range[0];
103630
+ end = nextTokenStartsOnNewLine
103631
+ ? getLineStartIndex(nextToken)
103632
+ : nextToken.range[0];
103633
+ } else if (shouldRemoveOwnLine) {
103634
+ start = getLineStartIndex(classMemberNode);
103635
+ end = getLineStartIndex(nextToken);
103636
+ } else if (
103637
+ previousToken.loc.end.line === classMemberNode.loc.start.line
103638
+ ) {
103639
+ start = previousToken.range[1];
103640
+ } else if (
103641
+ nextToken.loc.start.line === lastItemToRemove.loc.end.line
103642
+ ) {
103643
+ end = nextToken.range[0];
103644
+ }
103645
+
103646
+ return [start, end];
103647
+ }
103648
+
103379
103649
  /**
103380
103650
  * Check whether the current node is in a write only assignment.
103381
103651
  * @param {ASTNode} privateIdentifierNode Node referring to a private identifier
@@ -103431,6 +103701,7 @@ function requireNoUnusedPrivateClassMembers () {
103431
103701
  if (bodyMember.key.type === "PrivateIdentifier") {
103432
103702
  privateMembers.set(bodyMember.key.name, {
103433
103703
  declaredNode: bodyMember,
103704
+ hasReference: false,
103434
103705
  isAccessor:
103435
103706
  bodyMember.type === "MethodDefinition" &&
103436
103707
  (bodyMember.kind === "set" ||
@@ -103473,6 +103744,8 @@ function requireNoUnusedPrivateClassMembers () {
103473
103744
  return;
103474
103745
  }
103475
103746
 
103747
+ memberDefinition.hasReference = true;
103748
+
103476
103749
  /*
103477
103750
  * Any usage of an accessor is considered a read, as the getter/setter can have
103478
103751
  * side-effects in its definition.
@@ -103544,11 +103817,12 @@ function requireNoUnusedPrivateClassMembers () {
103544
103817
 
103545
103818
  for (const [
103546
103819
  classMemberName,
103547
- { declaredNode, isUsed },
103820
+ { declaredNode, hasReference, isUsed },
103548
103821
  ] of unusedPrivateMembers.entries()) {
103549
103822
  if (isUsed) {
103550
103823
  continue;
103551
103824
  }
103825
+
103552
103826
  context.report({
103553
103827
  node: declaredNode,
103554
103828
  loc: declaredNode.key.loc,
@@ -103556,6 +103830,39 @@ function requireNoUnusedPrivateClassMembers () {
103556
103830
  data: {
103557
103831
  classMemberName: `#${classMemberName}`,
103558
103832
  },
103833
+ suggest: [
103834
+ {
103835
+ messageId: "removeUnusedPrivateClassMember",
103836
+ data: {
103837
+ classMemberName: `#${classMemberName}`,
103838
+ },
103839
+ *fix(fixer) {
103840
+ if (hasReference) {
103841
+ return;
103842
+ }
103843
+
103844
+ const removalRange =
103845
+ getMemberRemovalRange(declaredNode);
103846
+ const semicolonInsertionToken =
103847
+ getSemicolonInsertionToken(
103848
+ declaredNode,
103849
+ );
103850
+ const removalFix = fixer.replaceTextRange(
103851
+ removalRange,
103852
+ "",
103853
+ );
103854
+
103855
+ yield removalFix;
103856
+
103857
+ if (semicolonInsertionToken) {
103858
+ yield fixer.insertTextAfter(
103859
+ semicolonInsertionToken,
103860
+ ";",
103861
+ );
103862
+ }
103863
+ },
103864
+ },
103865
+ ],
103559
103866
  });
103560
103867
  }
103561
103868
  },
@@ -103614,6 +103921,20 @@ function requireNoUnusedVars () {
103614
103921
  * @property {string} additional Any additional info to be appended at the end.
103615
103922
  */
103616
103923
 
103924
+ //------------------------------------------------------------------------------
103925
+ // Helpers
103926
+ //------------------------------------------------------------------------------
103927
+
103928
+ const DEFAULT_OPTIONS = {
103929
+ vars: "all",
103930
+ args: "after-used",
103931
+ ignoreRestSiblings: false,
103932
+ caughtErrors: "all",
103933
+ ignoreClassWithStaticInitBlock: false,
103934
+ ignoreUsingDeclarations: false,
103935
+ reportUsedIgnorePattern: false,
103936
+ };
103937
+
103617
103938
  //------------------------------------------------------------------------------
103618
103939
  // Rule Definition
103619
103940
  //------------------------------------------------------------------------------
@@ -103680,6 +104001,8 @@ function requireNoUnusedVars () {
103680
104001
  },
103681
104002
  ],
103682
104003
 
104004
+ defaultOptions: [DEFAULT_OPTIONS],
104005
+
103683
104006
  messages: {
103684
104007
  unusedVar:
103685
104008
  "'{{varName}}' is {{action}} but never used{{additional}}.",
@@ -103695,65 +104018,46 @@ function requireNoUnusedVars () {
103695
104018
  const REST_PROPERTY_TYPE =
103696
104019
  /^(?:RestElement|(?:Experimental)?RestProperty)$/u;
103697
104020
 
103698
- const config = {
103699
- vars: "all",
103700
- args: "after-used",
103701
- ignoreRestSiblings: false,
103702
- caughtErrors: "all",
103703
- ignoreClassWithStaticInitBlock: false,
103704
- ignoreUsingDeclarations: false,
103705
- reportUsedIgnorePattern: false,
103706
- };
104021
+ let config;
103707
104022
 
103708
104023
  const firstOption = context.options[0];
103709
104024
 
103710
- if (firstOption) {
103711
- if (typeof firstOption === "string") {
103712
- config.vars = firstOption;
103713
- } else {
103714
- config.vars = firstOption.vars || config.vars;
103715
- config.args = firstOption.args || config.args;
103716
- config.ignoreRestSiblings =
103717
- firstOption.ignoreRestSiblings || config.ignoreRestSiblings;
103718
- config.caughtErrors =
103719
- firstOption.caughtErrors || config.caughtErrors;
103720
- config.ignoreClassWithStaticInitBlock =
103721
- firstOption.ignoreClassWithStaticInitBlock ||
103722
- config.ignoreClassWithStaticInitBlock;
103723
- config.ignoreUsingDeclarations =
103724
- firstOption.ignoreUsingDeclarations ||
103725
- config.ignoreUsingDeclarations;
103726
- config.reportUsedIgnorePattern =
103727
- firstOption.reportUsedIgnorePattern ||
103728
- config.reportUsedIgnorePattern;
103729
-
103730
- if (firstOption.varsIgnorePattern) {
103731
- config.varsIgnorePattern = new RegExp(
103732
- firstOption.varsIgnorePattern,
103733
- "u",
103734
- );
103735
- }
104025
+ if (typeof firstOption === "string") {
104026
+ config = {
104027
+ ...DEFAULT_OPTIONS,
104028
+ vars: firstOption,
104029
+ };
104030
+ } else {
104031
+ config = {
104032
+ ...firstOption,
104033
+ };
103736
104034
 
103737
- if (firstOption.argsIgnorePattern) {
103738
- config.argsIgnorePattern = new RegExp(
103739
- firstOption.argsIgnorePattern,
103740
- "u",
103741
- );
103742
- }
104035
+ if (firstOption.varsIgnorePattern) {
104036
+ config.varsIgnorePattern = new RegExp(
104037
+ firstOption.varsIgnorePattern,
104038
+ "u",
104039
+ );
104040
+ }
103743
104041
 
103744
- if (firstOption.caughtErrorsIgnorePattern) {
103745
- config.caughtErrorsIgnorePattern = new RegExp(
103746
- firstOption.caughtErrorsIgnorePattern,
103747
- "u",
103748
- );
103749
- }
104042
+ if (firstOption.argsIgnorePattern) {
104043
+ config.argsIgnorePattern = new RegExp(
104044
+ firstOption.argsIgnorePattern,
104045
+ "u",
104046
+ );
104047
+ }
103750
104048
 
103751
- if (firstOption.destructuredArrayIgnorePattern) {
103752
- config.destructuredArrayIgnorePattern = new RegExp(
103753
- firstOption.destructuredArrayIgnorePattern,
103754
- "u",
103755
- );
103756
- }
104049
+ if (firstOption.caughtErrorsIgnorePattern) {
104050
+ config.caughtErrorsIgnorePattern = new RegExp(
104051
+ firstOption.caughtErrorsIgnorePattern,
104052
+ "u",
104053
+ );
104054
+ }
104055
+
104056
+ if (firstOption.destructuredArrayIgnorePattern) {
104057
+ config.destructuredArrayIgnorePattern = new RegExp(
104058
+ firstOption.destructuredArrayIgnorePattern,
104059
+ "u",
104060
+ );
103757
104061
  }
103758
104062
  }
103759
104063
 
@@ -105602,13 +105906,12 @@ function requireNoUseBeforeDefine () {
105602
105906
  /** @type {import('../types').Rule.RuleModule} */
105603
105907
  noUseBeforeDefine = {
105604
105908
  meta: {
105605
- dialects: ["javascript", "typescript"],
105606
- language: "javascript",
105607
105909
  type: "problem",
105608
105910
 
105609
105911
  docs: {
105610
105912
  description:
105611
105913
  "Disallow the use of variables before they are defined",
105914
+ dialects: ["JavaScript", "TypeScript"],
105612
105915
  recommended: false,
105613
105916
  url: "https://eslint.org/docs/latest/rules/no-use-before-define",
105614
105917
  },
@@ -107139,7 +107442,7 @@ function requireNoUselessConcat () {
107139
107442
  }
107140
107443
 
107141
107444
  /**
107142
- * Get's the right most node on the left side of a BinaryExpression with + operator.
107445
+ * Gets the right most node on the left side of a BinaryExpression with + operator.
107143
107446
  * @param {ASTNode} node A BinaryExpression node to check.
107144
107447
  * @returns {ASTNode} node
107145
107448
  */
@@ -107153,7 +107456,7 @@ function requireNoUselessConcat () {
107153
107456
  }
107154
107457
 
107155
107458
  /**
107156
- * Get's the left most node on the right side of a BinaryExpression with + operator.
107459
+ * Gets the left most node on the right side of a BinaryExpression with + operator.
107157
107460
  * @param {ASTNode} node A BinaryExpression node to check.
107158
107461
  * @returns {ASTNode} node
107159
107462
  */
@@ -107400,12 +107703,11 @@ function requireNoUselessConstructor () {
107400
107703
  /** @type {import('../types').Rule.RuleModule} */
107401
107704
  noUselessConstructor = {
107402
107705
  meta: {
107403
- dialects: ["javascript", "typescript"],
107404
- language: "javascript",
107405
107706
  type: "suggestion",
107406
107707
 
107407
107708
  docs: {
107408
107709
  description: "Disallow unnecessary constructors",
107710
+ dialects: ["JavaScript", "TypeScript"],
107409
107711
  recommended: false,
107410
107712
  url: "https://eslint.org/docs/latest/rules/no-useless-constructor",
107411
107713
  },
@@ -107473,8 +107775,9 @@ function requireNoUselessConstructor () {
107473
107775
  const nextToken =
107474
107776
  sourceCode.getTokenAfter(node);
107475
107777
  const addSemiColon =
107476
- nextToken.type === "Punctuator" &&
107477
- nextToken.value === "[" &&
107778
+ astUtils.canContinueExpressionInClassBody(
107779
+ nextToken,
107780
+ ) &&
107478
107781
  astUtils.needsPrecedingSemicolon(
107479
107782
  sourceCode,
107480
107783
  node,
@@ -108769,11 +109072,10 @@ function requireNoVar () {
108769
109072
  noVar = {
108770
109073
  meta: {
108771
109074
  type: "suggestion",
108772
- dialects: ["typescript", "javascript"],
108773
- language: "javascript",
108774
109075
 
108775
109076
  docs: {
108776
109077
  description: "Require `let` or `const` instead of `var`",
109078
+ dialects: ["JavaScript", "TypeScript"],
108777
109079
  recommended: false,
108778
109080
  url: "https://eslint.org/docs/latest/rules/no-var",
108779
109081
  },
@@ -110737,6 +111039,8 @@ function requireObjectShorthand () {
110737
111039
  ],
110738
111040
  },
110739
111041
 
111042
+ defaultOptions: ["always"],
111043
+
110740
111044
  messages: {
110741
111045
  expectedAllPropertiesShorthanded:
110742
111046
  "Expected shorthand for all properties.",
@@ -110752,7 +111056,7 @@ function requireObjectShorthand () {
110752
111056
  },
110753
111057
 
110754
111058
  create(context) {
110755
- const APPLY = context.options[0] || OPTIONS.always;
111059
+ const APPLY = context.options[0];
110756
111060
  const APPLY_TO_METHODS =
110757
111061
  APPLY === OPTIONS.methods || APPLY === OPTIONS.always;
110758
111062
  const APPLY_TO_PROPS =
@@ -111300,6 +111604,8 @@ function requireOneVar () {
111300
111604
  },
111301
111605
  ],
111302
111606
 
111607
+ defaultOptions: ["always"],
111608
+
111303
111609
  messages: {
111304
111610
  combineUninitialized:
111305
111611
  "Combine this with the previous '{{type}}' statement with uninitialized variables.",
@@ -111320,7 +111626,7 @@ function requireOneVar () {
111320
111626
  const MODE_ALWAYS = "always";
111321
111627
  const MODE_NEVER = "never";
111322
111628
  const MODE_CONSECUTIVE = "consecutive";
111323
- const mode = context.options[0] || MODE_ALWAYS;
111629
+ const mode = context.options[0];
111324
111630
 
111325
111631
  const options = {};
111326
111632
 
@@ -113814,8 +114120,6 @@ function requirePreferArrowCallback () {
113814
114120
  preferArrowCallback = {
113815
114121
  meta: {
113816
114122
  type: "suggestion",
113817
- dialects: ["javascript", "typescript"],
113818
- language: "javascript",
113819
114123
 
113820
114124
  defaultOptions: [
113821
114125
  { allowNamedFunctions: false, allowUnboundThis: true },
@@ -113823,6 +114127,7 @@ function requirePreferArrowCallback () {
113823
114127
 
113824
114128
  docs: {
113825
114129
  description: "Require using arrow functions for callbacks",
114130
+ dialects: ["JavaScript", "TypeScript"],
113826
114131
  recommended: false,
113827
114132
  frozen: true,
113828
114133
  url: "https://eslint.org/docs/latest/rules/prefer-arrow-callback",
@@ -119691,12 +119996,14 @@ function requireRequireAwait () {
119691
119996
  */
119692
119997
  const nextToken = sourceCode.getTokenAfter(asyncToken);
119693
119998
  const addSemiColon =
119694
- nextToken.type === "Punctuator" &&
119695
- (nextToken.value === "[" || nextToken.value === "(") &&
119696
- (nodeWithAsyncKeyword.type === "MethodDefinition" ||
119999
+ ((astUtils.isOpeningParenToken(nextToken) &&
119697
120000
  astUtils.isStartOfExpressionStatement(
119698
120001
  nodeWithAsyncKeyword,
119699
- )) &&
120002
+ )) ||
120003
+ (nodeWithAsyncKeyword.type === "MethodDefinition" &&
120004
+ astUtils.canContinueExpressionInClassBody(
120005
+ nextToken,
120006
+ ))) &&
119700
120007
  astUtils.needsPrecedingSemicolon(
119701
120008
  sourceCode,
119702
120009
  nodeWithAsyncKeyword,