immosquare-cleaner 0.1.40 → 0.1.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/node_modules/@eslint/config-array/README.md +9 -3
  4. data/node_modules/@eslint/config-array/dist/cjs/index.cjs +1 -0
  5. data/node_modules/@eslint/config-array/dist/esm/index.js +1 -0
  6. data/node_modules/@eslint/config-array/package.json +2 -2
  7. data/node_modules/@eslint/eslintrc/node_modules/espree/LICENSE +25 -0
  8. data/node_modules/@eslint/eslintrc/node_modules/espree/README.md +244 -0
  9. data/node_modules/@eslint/eslintrc/node_modules/espree/dist/espree.cjs +883 -0
  10. data/node_modules/@eslint/eslintrc/node_modules/espree/espree.js +177 -0
  11. data/node_modules/@eslint/eslintrc/node_modules/espree/lib/espree.js +349 -0
  12. data/node_modules/@eslint/eslintrc/node_modules/espree/lib/features.js +27 -0
  13. data/node_modules/@eslint/eslintrc/node_modules/espree/lib/options.js +123 -0
  14. data/node_modules/@eslint/eslintrc/node_modules/espree/lib/token-translator.js +263 -0
  15. data/node_modules/@eslint/eslintrc/node_modules/espree/lib/version.js +3 -0
  16. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/CHANGELOG.md +880 -0
  17. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/LICENSE +21 -0
  18. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/README.md +283 -0
  19. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/bin/acorn +4 -0
  20. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.d.mts +857 -0
  21. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.d.ts +857 -0
  22. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.js +6002 -0
  23. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/acorn.mjs +5973 -0
  24. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/dist/bin.js +90 -0
  25. data/node_modules/@eslint/eslintrc/node_modules/espree/node_modules/acorn/package.json +50 -0
  26. data/node_modules/@eslint/eslintrc/node_modules/espree/package.json +86 -0
  27. data/node_modules/@eslint/js/package.json +1 -1
  28. data/node_modules/@eslint-community/regexpp/index.d.ts +19 -5
  29. data/node_modules/@eslint-community/regexpp/index.js +138 -17
  30. data/node_modules/@eslint-community/regexpp/index.js.map +1 -1
  31. data/node_modules/@eslint-community/regexpp/index.mjs +138 -17
  32. data/node_modules/@eslint-community/regexpp/index.mjs.map +1 -1
  33. data/node_modules/@eslint-community/regexpp/package.json +1 -3
  34. data/node_modules/acorn/CHANGELOG.md +24 -0
  35. data/node_modules/acorn/README.md +5 -6
  36. data/node_modules/acorn/dist/acorn.d.mts +8 -9
  37. data/node_modules/acorn/dist/acorn.d.ts +8 -9
  38. data/node_modules/acorn/dist/acorn.js +92 -29
  39. data/node_modules/acorn/dist/acorn.mjs +92 -29
  40. data/node_modules/acorn/package.json +3 -3
  41. data/node_modules/eslint/README.md +7 -8
  42. data/node_modules/eslint/conf/ecma-version.js +1 -1
  43. data/node_modules/eslint/conf/globals.js +6 -1
  44. data/node_modules/eslint/lib/cli.js +23 -2
  45. data/node_modules/eslint/lib/eslint/eslint-helpers.js +5 -0
  46. data/node_modules/eslint/lib/eslint/eslint.js +16 -2
  47. data/node_modules/eslint/lib/eslint/legacy-eslint.js +14 -0
  48. data/node_modules/eslint/lib/languages/js/index.js +10 -5
  49. data/node_modules/eslint/lib/languages/js/source-code/source-code.js +16 -6
  50. data/node_modules/eslint/lib/linter/apply-disable-directives.js +6 -3
  51. data/node_modules/eslint/lib/linter/config-comment-parser.js +3 -16
  52. data/node_modules/eslint/lib/linter/linter.js +194 -149
  53. data/node_modules/eslint/lib/linter/node-event-generator.js +2 -4
  54. data/node_modules/eslint/lib/linter/vfile.js +7 -0
  55. data/node_modules/eslint/lib/options.js +13 -1
  56. data/node_modules/eslint/lib/rules/no-restricted-imports.js +12 -5
  57. data/node_modules/eslint/lib/rules/no-unused-vars.js +34 -32
  58. data/node_modules/eslint/lib/rules/no-useless-backreference.js +81 -31
  59. data/node_modules/eslint/lib/rules/utils/regular-expressions.js +1 -1
  60. data/node_modules/eslint/lib/shared/flags.js +26 -0
  61. data/node_modules/eslint/lib/shared/logging.js +10 -1
  62. data/node_modules/eslint/lib/shared/types.js +1 -1
  63. data/node_modules/eslint/package.json +9 -13
  64. data/node_modules/eslint-scope/dist/eslint-scope.cjs +2 -2
  65. data/node_modules/eslint-scope/lib/referencer.js +1 -1
  66. data/node_modules/eslint-scope/lib/version.js +1 -1
  67. data/node_modules/eslint-scope/package.json +2 -2
  68. data/node_modules/espree/README.md +5 -5
  69. data/node_modules/espree/dist/espree.cjs +62 -6
  70. data/node_modules/espree/espree.js +1 -4
  71. data/node_modules/espree/lib/options.js +3 -2
  72. data/node_modules/espree/lib/token-translator.js +1 -1
  73. data/node_modules/espree/lib/version.js +1 -1
  74. data/node_modules/espree/package.json +7 -7
  75. data/node_modules/js-tokens/CHANGELOG.md +17 -0
  76. data/node_modules/js-tokens/LICENSE +1 -1
  77. data/node_modules/js-tokens/README.md +25 -7
  78. data/node_modules/js-tokens/index.js +3 -3
  79. data/node_modules/js-tokens/package.json +5 -5
  80. data/node_modules/jscodeshift/CHANGELOG.md +5 -0
  81. data/node_modules/jscodeshift/bin/jscodeshift.js +1 -1
  82. data/node_modules/jscodeshift/package.json +1 -2
  83. data/node_modules/jscodeshift/website/index.htm +9 -0
  84. data/node_modules/prettier/LICENSE +35 -34
  85. data/node_modules/prettier/doc.js +2 -2
  86. data/node_modules/prettier/doc.mjs +2 -2
  87. data/node_modules/prettier/index.cjs +8 -8
  88. data/node_modules/prettier/index.d.ts +1 -2
  89. data/node_modules/prettier/index.mjs +636 -704
  90. data/node_modules/prettier/internal/cli.mjs +4 -4
  91. data/node_modules/prettier/package.json +1 -1
  92. data/node_modules/prettier/plugins/acorn.js +14 -12
  93. data/node_modules/prettier/plugins/acorn.mjs +14 -12
  94. data/node_modules/prettier/plugins/angular.js +1 -1
  95. data/node_modules/prettier/plugins/angular.mjs +1 -1
  96. data/node_modules/prettier/plugins/babel.js +10 -11
  97. data/node_modules/prettier/plugins/babel.mjs +10 -11
  98. data/node_modules/prettier/plugins/estree.js +27 -27
  99. data/node_modules/prettier/plugins/estree.mjs +27 -27
  100. data/node_modules/prettier/plugins/flow.js +15 -16
  101. data/node_modules/prettier/plugins/flow.mjs +15 -16
  102. data/node_modules/prettier/plugins/glimmer.js +5 -5
  103. data/node_modules/prettier/plugins/glimmer.mjs +5 -5
  104. data/node_modules/prettier/plugins/graphql.js +8 -8
  105. data/node_modules/prettier/plugins/graphql.mjs +8 -8
  106. data/node_modules/prettier/plugins/html.js +17 -17
  107. data/node_modules/prettier/plugins/html.mjs +17 -17
  108. data/node_modules/prettier/plugins/markdown.js +44 -44
  109. data/node_modules/prettier/plugins/markdown.mjs +44 -44
  110. data/node_modules/prettier/plugins/meriyah.js +4 -5
  111. data/node_modules/prettier/plugins/meriyah.mjs +4 -5
  112. data/node_modules/prettier/plugins/postcss.js +26 -26
  113. data/node_modules/prettier/plugins/postcss.mjs +26 -26
  114. data/node_modules/prettier/plugins/typescript.js +15 -20
  115. data/node_modules/prettier/plugins/typescript.mjs +15 -20
  116. data/node_modules/prettier/plugins/yaml.js +6 -6
  117. data/node_modules/prettier/plugins/yaml.mjs +6 -6
  118. data/node_modules/prettier/standalone.js +31 -30
  119. data/node_modules/prettier/standalone.mjs +28 -27
  120. data/package.json +4 -4
  121. metadata +24 -2
@@ -667,7 +667,7 @@
667
667
 
668
668
  // ## Parser utilities
669
669
 
670
- var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
670
+ var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/s;
671
671
  pp$9.strictDirective = function(start) {
672
672
  if (this.options.ecmaVersion < 5) { return false }
673
673
  for (;;) {
@@ -853,7 +853,7 @@
853
853
  // Statement) is allowed here. If context is not empty then only a Statement
854
854
  // is allowed. However, `let [` is an explicit negative lookahead for
855
855
  // ExpressionStatement, so special-case it first.
856
- if (nextCh === 91 || nextCh === 92) { return true } // '[', '/'
856
+ if (nextCh === 91 || nextCh === 92) { return true } // '[', '\'
857
857
  if (context) { return false }
858
858
 
859
859
  if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
@@ -1046,13 +1046,19 @@
1046
1046
  return this.parseFor(node, init$1)
1047
1047
  }
1048
1048
  var startsWithLet = this.isContextual("let"), isForOf = false;
1049
+ var containsEsc = this.containsEsc;
1049
1050
  var refDestructuringErrors = new DestructuringErrors;
1050
- var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
1051
+ var initPos = this.start;
1052
+ var init = awaitAt > -1
1053
+ ? this.parseExprSubscripts(refDestructuringErrors, "await")
1054
+ : this.parseExpression(true, refDestructuringErrors);
1051
1055
  if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
1052
- if (this.options.ecmaVersion >= 9) {
1053
- if (this.type === types$1._in) {
1054
- if (awaitAt > -1) { this.unexpected(awaitAt); }
1055
- } else { node.await = awaitAt > -1; }
1056
+ if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)
1057
+ if (this.type === types$1._in) { this.unexpected(awaitAt); }
1058
+ node.await = true;
1059
+ } else if (isForOf && this.options.ecmaVersion >= 8) {
1060
+ if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); }
1061
+ else if (this.options.ecmaVersion >= 9) { node.await = false; }
1056
1062
  }
1057
1063
  if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
1058
1064
  this.toAssignable(init, false, refDestructuringErrors);
@@ -2665,8 +2671,7 @@
2665
2671
  node.argument = this.parseMaybeUnary(null, true, update, forInit);
2666
2672
  this.checkExpressionErrors(refDestructuringErrors, true);
2667
2673
  if (update) { this.checkLValSimple(node.argument); }
2668
- else if (this.strict && node.operator === "delete" &&
2669
- node.argument.type === "Identifier")
2674
+ else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
2670
2675
  { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
2671
2676
  else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
2672
2677
  { this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
@@ -2701,10 +2706,18 @@
2701
2706
  }
2702
2707
  };
2703
2708
 
2709
+ function isLocalVariableAccess(node) {
2710
+ return (
2711
+ node.type === "Identifier" ||
2712
+ node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
2713
+ )
2714
+ }
2715
+
2704
2716
  function isPrivateFieldAccess(node) {
2705
2717
  return (
2706
2718
  node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
2707
- node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)
2719
+ node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
2720
+ node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
2708
2721
  )
2709
2722
  }
2710
2723
 
@@ -3131,7 +3144,7 @@
3131
3144
  this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
3132
3145
  }
3133
3146
  elem.value = {
3134
- raw: this.value,
3147
+ raw: this.value.replace(/\r\n?/g, "\n"),
3135
3148
  cooked: null
3136
3149
  };
3137
3150
  } else {
@@ -3806,6 +3819,30 @@
3806
3819
 
3807
3820
  var pp$1 = Parser.prototype;
3808
3821
 
3822
+ // Track disjunction structure to determine whether a duplicate
3823
+ // capture group name is allowed because it is in a separate branch.
3824
+ var BranchID = function BranchID(parent, base) {
3825
+ // Parent disjunction branch
3826
+ this.parent = parent;
3827
+ // Identifies this set of sibling branches
3828
+ this.base = base || this;
3829
+ };
3830
+
3831
+ BranchID.prototype.separatedFrom = function separatedFrom (alt) {
3832
+ // A branch is separate from another branch if they or any of
3833
+ // their parents are siblings in a given disjunction
3834
+ for (var self = this; self; self = self.parent) {
3835
+ for (var other = alt; other; other = other.parent) {
3836
+ if (self.base === other.base && self !== other) { return true }
3837
+ }
3838
+ }
3839
+ return false
3840
+ };
3841
+
3842
+ BranchID.prototype.sibling = function sibling () {
3843
+ return new BranchID(this.parent, this.base)
3844
+ };
3845
+
3809
3846
  var RegExpValidationState = function RegExpValidationState(parser) {
3810
3847
  this.parser = parser;
3811
3848
  this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
@@ -3822,8 +3859,9 @@
3822
3859
  this.lastAssertionIsQuantifiable = false;
3823
3860
  this.numCapturingParens = 0;
3824
3861
  this.maxBackReference = 0;
3825
- this.groupNames = [];
3862
+ this.groupNames = Object.create(null);
3826
3863
  this.backReferenceNames = [];
3864
+ this.branchID = null;
3827
3865
  };
3828
3866
 
3829
3867
  RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
@@ -3955,6 +3993,11 @@
3955
3993
  }
3956
3994
  };
3957
3995
 
3996
+ function hasProp(obj) {
3997
+ for (var _ in obj) { return true }
3998
+ return false
3999
+ }
4000
+
3958
4001
  /**
3959
4002
  * Validate the pattern part of a given RegExpLiteral.
3960
4003
  *
@@ -3969,7 +4012,7 @@
3969
4012
  // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
3970
4013
  // exception if _P_ did not conform to the grammar, if any elements of _P_
3971
4014
  // were not matched by the parse, or if any Early Error conditions exist.
3972
- if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
4015
+ if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
3973
4016
  state.switchN = true;
3974
4017
  this.regexp_pattern(state);
3975
4018
  }
@@ -3983,8 +4026,9 @@
3983
4026
  state.lastAssertionIsQuantifiable = false;
3984
4027
  state.numCapturingParens = 0;
3985
4028
  state.maxBackReference = 0;
3986
- state.groupNames.length = 0;
4029
+ state.groupNames = Object.create(null);
3987
4030
  state.backReferenceNames.length = 0;
4031
+ state.branchID = null;
3988
4032
 
3989
4033
  this.regexp_disjunction(state);
3990
4034
 
@@ -4003,7 +4047,7 @@
4003
4047
  for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
4004
4048
  var name = list[i];
4005
4049
 
4006
- if (state.groupNames.indexOf(name) === -1) {
4050
+ if (!state.groupNames[name]) {
4007
4051
  state.raise("Invalid named capture referenced");
4008
4052
  }
4009
4053
  }
@@ -4011,10 +4055,14 @@
4011
4055
 
4012
4056
  // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
4013
4057
  pp$1.regexp_disjunction = function(state) {
4058
+ var trackDisjunction = this.options.ecmaVersion >= 16;
4059
+ if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }
4014
4060
  this.regexp_alternative(state);
4015
4061
  while (state.eat(0x7C /* | */)) {
4062
+ if (trackDisjunction) { state.branchID = state.branchID.sibling(); }
4016
4063
  this.regexp_alternative(state);
4017
4064
  }
4065
+ if (trackDisjunction) { state.branchID = state.branchID.parent; }
4018
4066
 
4019
4067
  // Make the same message as V8.
4020
4068
  if (this.regexp_eatQuantifier(state, true)) {
@@ -4027,8 +4075,7 @@
4027
4075
 
4028
4076
  // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
4029
4077
  pp$1.regexp_alternative = function(state) {
4030
- while (state.pos < state.source.length && this.regexp_eatTerm(state))
4031
- { }
4078
+ while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
4032
4079
  };
4033
4080
 
4034
4081
  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
@@ -4266,14 +4313,26 @@
4266
4313
  // `?` GroupName
4267
4314
  pp$1.regexp_groupSpecifier = function(state) {
4268
4315
  if (state.eat(0x3F /* ? */)) {
4269
- if (this.regexp_eatGroupName(state)) {
4270
- if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
4316
+ if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); }
4317
+ var trackDisjunction = this.options.ecmaVersion >= 16;
4318
+ var known = state.groupNames[state.lastStringValue];
4319
+ if (known) {
4320
+ if (trackDisjunction) {
4321
+ for (var i = 0, list = known; i < list.length; i += 1) {
4322
+ var altID = list[i];
4323
+
4324
+ if (!altID.separatedFrom(state.branchID))
4325
+ { state.raise("Duplicate capture group name"); }
4326
+ }
4327
+ } else {
4271
4328
  state.raise("Duplicate capture group name");
4272
4329
  }
4273
- state.groupNames.push(state.lastStringValue);
4274
- return
4275
4330
  }
4276
- state.raise("Invalid group");
4331
+ if (trackDisjunction) {
4332
+ (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
4333
+ } else {
4334
+ state.groupNames[state.lastStringValue] = true;
4335
+ }
4277
4336
  }
4278
4337
  };
4279
4338
 
@@ -5778,15 +5837,18 @@
5778
5837
  break
5779
5838
 
5780
5839
  case "$":
5781
- if (this.input[this.pos + 1] !== "{") {
5782
- break
5783
- }
5784
-
5785
- // falls through
5840
+ if (this.input[this.pos + 1] !== "{") { break }
5841
+ // fall through
5786
5842
  case "`":
5787
5843
  return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))
5788
5844
 
5789
- // no default
5845
+ case "\r":
5846
+ if (this.input[this.pos + 1] === "\n") { ++this.pos; }
5847
+ // fall through
5848
+ case "\n": case "\u2028": case "\u2029":
5849
+ ++this.curLine;
5850
+ this.lineStart = this.pos + 1;
5851
+ break
5790
5852
  }
5791
5853
  }
5792
5854
  this.raise(this.start, "Unterminated template");
@@ -5849,6 +5911,7 @@
5849
5911
  if (isNewLine(ch)) {
5850
5912
  // Unicode new line characters after \ get removed from output in both
5851
5913
  // template literals and strings
5914
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
5852
5915
  return ""
5853
5916
  }
5854
5917
  return String.fromCharCode(ch)
@@ -5927,7 +5990,7 @@
5927
5990
  // [walk]: util/walk.js
5928
5991
 
5929
5992
 
5930
- var version = "8.11.3";
5993
+ var version = "8.12.0";
5931
5994
 
5932
5995
  Parser.acorn = {
5933
5996
  Parser: Parser,
@@ -661,7 +661,7 @@ var pp$9 = Parser.prototype;
661
661
 
662
662
  // ## Parser utilities
663
663
 
664
- var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
664
+ var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/s;
665
665
  pp$9.strictDirective = function(start) {
666
666
  if (this.options.ecmaVersion < 5) { return false }
667
667
  for (;;) {
@@ -847,7 +847,7 @@ pp$8.isLet = function(context) {
847
847
  // Statement) is allowed here. If context is not empty then only a Statement
848
848
  // is allowed. However, `let [` is an explicit negative lookahead for
849
849
  // ExpressionStatement, so special-case it first.
850
- if (nextCh === 91 || nextCh === 92) { return true } // '[', '/'
850
+ if (nextCh === 91 || nextCh === 92) { return true } // '[', '\'
851
851
  if (context) { return false }
852
852
 
853
853
  if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral
@@ -1040,13 +1040,19 @@ pp$8.parseForStatement = function(node) {
1040
1040
  return this.parseFor(node, init$1)
1041
1041
  }
1042
1042
  var startsWithLet = this.isContextual("let"), isForOf = false;
1043
+ var containsEsc = this.containsEsc;
1043
1044
  var refDestructuringErrors = new DestructuringErrors;
1044
- var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors);
1045
+ var initPos = this.start;
1046
+ var init = awaitAt > -1
1047
+ ? this.parseExprSubscripts(refDestructuringErrors, "await")
1048
+ : this.parseExpression(true, refDestructuringErrors);
1045
1049
  if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
1046
- if (this.options.ecmaVersion >= 9) {
1047
- if (this.type === types$1._in) {
1048
- if (awaitAt > -1) { this.unexpected(awaitAt); }
1049
- } else { node.await = awaitAt > -1; }
1050
+ if (awaitAt > -1) { // implies `ecmaVersion >= 9` (see declaration of awaitAt)
1051
+ if (this.type === types$1._in) { this.unexpected(awaitAt); }
1052
+ node.await = true;
1053
+ } else if (isForOf && this.options.ecmaVersion >= 8) {
1054
+ if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); }
1055
+ else if (this.options.ecmaVersion >= 9) { node.await = false; }
1050
1056
  }
1051
1057
  if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); }
1052
1058
  this.toAssignable(init, false, refDestructuringErrors);
@@ -2659,8 +2665,7 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
2659
2665
  node.argument = this.parseMaybeUnary(null, true, update, forInit);
2660
2666
  this.checkExpressionErrors(refDestructuringErrors, true);
2661
2667
  if (update) { this.checkLValSimple(node.argument); }
2662
- else if (this.strict && node.operator === "delete" &&
2663
- node.argument.type === "Identifier")
2668
+ else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
2664
2669
  { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); }
2665
2670
  else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
2666
2671
  { this.raiseRecoverable(node.start, "Private fields can not be deleted"); }
@@ -2695,10 +2700,18 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
2695
2700
  }
2696
2701
  };
2697
2702
 
2703
+ function isLocalVariableAccess(node) {
2704
+ return (
2705
+ node.type === "Identifier" ||
2706
+ node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
2707
+ )
2708
+ }
2709
+
2698
2710
  function isPrivateFieldAccess(node) {
2699
2711
  return (
2700
2712
  node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
2701
- node.type === "ChainExpression" && isPrivateFieldAccess(node.expression)
2713
+ node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
2714
+ node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
2702
2715
  )
2703
2716
  }
2704
2717
 
@@ -3125,7 +3138,7 @@ pp$5.parseTemplateElement = function(ref) {
3125
3138
  this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
3126
3139
  }
3127
3140
  elem.value = {
3128
- raw: this.value,
3141
+ raw: this.value.replace(/\r\n?/g, "\n"),
3129
3142
  cooked: null
3130
3143
  };
3131
3144
  } else {
@@ -3800,6 +3813,30 @@ for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) {
3800
3813
 
3801
3814
  var pp$1 = Parser.prototype;
3802
3815
 
3816
+ // Track disjunction structure to determine whether a duplicate
3817
+ // capture group name is allowed because it is in a separate branch.
3818
+ var BranchID = function BranchID(parent, base) {
3819
+ // Parent disjunction branch
3820
+ this.parent = parent;
3821
+ // Identifies this set of sibling branches
3822
+ this.base = base || this;
3823
+ };
3824
+
3825
+ BranchID.prototype.separatedFrom = function separatedFrom (alt) {
3826
+ // A branch is separate from another branch if they or any of
3827
+ // their parents are siblings in a given disjunction
3828
+ for (var self = this; self; self = self.parent) {
3829
+ for (var other = alt; other; other = other.parent) {
3830
+ if (self.base === other.base && self !== other) { return true }
3831
+ }
3832
+ }
3833
+ return false
3834
+ };
3835
+
3836
+ BranchID.prototype.sibling = function sibling () {
3837
+ return new BranchID(this.parent, this.base)
3838
+ };
3839
+
3803
3840
  var RegExpValidationState = function RegExpValidationState(parser) {
3804
3841
  this.parser = parser;
3805
3842
  this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
@@ -3816,8 +3853,9 @@ var RegExpValidationState = function RegExpValidationState(parser) {
3816
3853
  this.lastAssertionIsQuantifiable = false;
3817
3854
  this.numCapturingParens = 0;
3818
3855
  this.maxBackReference = 0;
3819
- this.groupNames = [];
3856
+ this.groupNames = Object.create(null);
3820
3857
  this.backReferenceNames = [];
3858
+ this.branchID = null;
3821
3859
  };
3822
3860
 
3823
3861
  RegExpValidationState.prototype.reset = function reset (start, pattern, flags) {
@@ -3949,6 +3987,11 @@ pp$1.validateRegExpFlags = function(state) {
3949
3987
  }
3950
3988
  };
3951
3989
 
3990
+ function hasProp(obj) {
3991
+ for (var _ in obj) { return true }
3992
+ return false
3993
+ }
3994
+
3952
3995
  /**
3953
3996
  * Validate the pattern part of a given RegExpLiteral.
3954
3997
  *
@@ -3963,7 +4006,7 @@ pp$1.validateRegExpPattern = function(state) {
3963
4006
  // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
3964
4007
  // exception if _P_ did not conform to the grammar, if any elements of _P_
3965
4008
  // were not matched by the parse, or if any Early Error conditions exist.
3966
- if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
4009
+ if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
3967
4010
  state.switchN = true;
3968
4011
  this.regexp_pattern(state);
3969
4012
  }
@@ -3977,8 +4020,9 @@ pp$1.regexp_pattern = function(state) {
3977
4020
  state.lastAssertionIsQuantifiable = false;
3978
4021
  state.numCapturingParens = 0;
3979
4022
  state.maxBackReference = 0;
3980
- state.groupNames.length = 0;
4023
+ state.groupNames = Object.create(null);
3981
4024
  state.backReferenceNames.length = 0;
4025
+ state.branchID = null;
3982
4026
 
3983
4027
  this.regexp_disjunction(state);
3984
4028
 
@@ -3997,7 +4041,7 @@ pp$1.regexp_pattern = function(state) {
3997
4041
  for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
3998
4042
  var name = list[i];
3999
4043
 
4000
- if (state.groupNames.indexOf(name) === -1) {
4044
+ if (!state.groupNames[name]) {
4001
4045
  state.raise("Invalid named capture referenced");
4002
4046
  }
4003
4047
  }
@@ -4005,10 +4049,14 @@ pp$1.regexp_pattern = function(state) {
4005
4049
 
4006
4050
  // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
4007
4051
  pp$1.regexp_disjunction = function(state) {
4052
+ var trackDisjunction = this.options.ecmaVersion >= 16;
4053
+ if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); }
4008
4054
  this.regexp_alternative(state);
4009
4055
  while (state.eat(0x7C /* | */)) {
4056
+ if (trackDisjunction) { state.branchID = state.branchID.sibling(); }
4010
4057
  this.regexp_alternative(state);
4011
4058
  }
4059
+ if (trackDisjunction) { state.branchID = state.branchID.parent; }
4012
4060
 
4013
4061
  // Make the same message as V8.
4014
4062
  if (this.regexp_eatQuantifier(state, true)) {
@@ -4021,8 +4069,7 @@ pp$1.regexp_disjunction = function(state) {
4021
4069
 
4022
4070
  // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
4023
4071
  pp$1.regexp_alternative = function(state) {
4024
- while (state.pos < state.source.length && this.regexp_eatTerm(state))
4025
- { }
4072
+ while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
4026
4073
  };
4027
4074
 
4028
4075
  // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
@@ -4260,14 +4307,26 @@ pp$1.regexp_eatExtendedPatternCharacter = function(state) {
4260
4307
  // `?` GroupName
4261
4308
  pp$1.regexp_groupSpecifier = function(state) {
4262
4309
  if (state.eat(0x3F /* ? */)) {
4263
- if (this.regexp_eatGroupName(state)) {
4264
- if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
4310
+ if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); }
4311
+ var trackDisjunction = this.options.ecmaVersion >= 16;
4312
+ var known = state.groupNames[state.lastStringValue];
4313
+ if (known) {
4314
+ if (trackDisjunction) {
4315
+ for (var i = 0, list = known; i < list.length; i += 1) {
4316
+ var altID = list[i];
4317
+
4318
+ if (!altID.separatedFrom(state.branchID))
4319
+ { state.raise("Duplicate capture group name"); }
4320
+ }
4321
+ } else {
4265
4322
  state.raise("Duplicate capture group name");
4266
4323
  }
4267
- state.groupNames.push(state.lastStringValue);
4268
- return
4269
4324
  }
4270
- state.raise("Invalid group");
4325
+ if (trackDisjunction) {
4326
+ (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
4327
+ } else {
4328
+ state.groupNames[state.lastStringValue] = true;
4329
+ }
4271
4330
  }
4272
4331
  };
4273
4332
 
@@ -5772,15 +5831,18 @@ pp.readInvalidTemplateToken = function() {
5772
5831
  break
5773
5832
 
5774
5833
  case "$":
5775
- if (this.input[this.pos + 1] !== "{") {
5776
- break
5777
- }
5778
-
5779
- // falls through
5834
+ if (this.input[this.pos + 1] !== "{") { break }
5835
+ // fall through
5780
5836
  case "`":
5781
5837
  return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos))
5782
5838
 
5783
- // no default
5839
+ case "\r":
5840
+ if (this.input[this.pos + 1] === "\n") { ++this.pos; }
5841
+ // fall through
5842
+ case "\n": case "\u2028": case "\u2029":
5843
+ ++this.curLine;
5844
+ this.lineStart = this.pos + 1;
5845
+ break
5784
5846
  }
5785
5847
  }
5786
5848
  this.raise(this.start, "Unterminated template");
@@ -5843,6 +5905,7 @@ pp.readEscapedChar = function(inTemplate) {
5843
5905
  if (isNewLine(ch)) {
5844
5906
  // Unicode new line characters after \ get removed from output in both
5845
5907
  // template literals and strings
5908
+ if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; }
5846
5909
  return ""
5847
5910
  }
5848
5911
  return String.fromCharCode(ch)
@@ -5921,7 +5984,7 @@ pp.readWord = function() {
5921
5984
  // [walk]: util/walk.js
5922
5985
 
5923
5986
 
5924
- var version = "8.11.3";
5987
+ var version = "8.12.0";
5925
5988
 
5926
5989
  Parser.acorn = {
5927
5990
  Parser: Parser,
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "./package.json": "./package.json"
18
18
  },
19
- "version": "8.11.3",
19
+ "version": "8.12.0",
20
20
  "engines": {
21
21
  "node": ">=0.4.0"
22
22
  },
@@ -38,13 +38,13 @@
38
38
  ],
39
39
  "repository": {
40
40
  "type": "git",
41
- "url": "https://github.com/acornjs/acorn.git"
41
+ "url": "git+https://github.com/acornjs/acorn.git"
42
42
  },
43
43
  "license": "MIT",
44
44
  "scripts": {
45
45
  "prepare": "cd ..; npm run build:main"
46
46
  },
47
47
  "bin": {
48
- "acorn": "./bin/acorn"
48
+ "acorn": "bin/acorn"
49
49
  }
50
50
  }
@@ -39,7 +39,7 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J
39
39
  10. [License](#license)
40
40
  11. [Team](#team)
41
41
  12. [Sponsors](#sponsors)
42
- 13. [Technology Sponsors](#technology-sponsors)
42
+ 13. [Technology Sponsors](#technology-sponsors) <!-- markdownlint-disable-line MD051 -->
43
43
 
44
44
  ## Installation and Usage
45
45
 
@@ -294,14 +294,13 @@ The following companies, organizations, and individuals support ESLint's ongoing
294
294
  <!-- NOTE: This section is autogenerated. Do not manually edit.-->
295
295
  <!--sponsorsstart-->
296
296
  <h3>Platinum Sponsors</h3>
297
- <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="undefined"></a></p><h3>Gold Sponsors</h3>
298
- <p><a href="#"><img src="https://images.opencollective.com/guest-bf377e88/avatar.png" alt="Eli Schleifer" height="96"></a> <a href="https://engineering.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="96"></a></p><h3>Silver Sponsors</h3>
297
+ <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
298
+ <p><a href="#"><img src="https://images.opencollective.com/guest-bf377e88/avatar.png" alt="Eli Schleifer" height="96"></a> <a href="https://engineering.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a></p><h3>Silver Sponsors</h3>
299
299
  <p><a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a> <a href="https://www.workleap.com"><img src="https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4" alt="Workleap" height="64"></a></p><h3>Bronze Sponsors</h3>
300
300
  <p><a href="https://www.notion.so"><img src="https://images.opencollective.com/notion/bf3b117/logo.png" alt="notion" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.ignitionapp.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Ignition" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a> <a href="https://usenextbase.com"><img src="https://avatars.githubusercontent.com/u/145838380?v=4" alt="Nextbase Starter Kit" height="32"></a></p>
301
301
  <!--sponsorsend-->
302
302
 
303
- ## Technology Sponsors
304
-
305
- * Site search ([eslint.org](https://eslint.org)) is sponsored by [Algolia](https://www.algolia.com)
306
- * Hosting for ([eslint.org](https://eslint.org)) is sponsored by [Netlify](https://www.netlify.com)
307
- * Password management is sponsored by [1Password](https://www.1password.com)
303
+ <!--techsponsorsstart-->
304
+ <h2>Technology Sponsors</h2>
305
+ <p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
306
+ <!--techsponsorsend-->
@@ -9,7 +9,7 @@
9
9
  * The latest ECMAScript version supported by ESLint.
10
10
  * @type {number} year-based ECMAScript version
11
11
  */
12
- const LATEST_ECMA_VERSION = 2024;
12
+ const LATEST_ECMA_VERSION = 2025;
13
13
 
14
14
  module.exports = {
15
15
  LATEST_ECMA_VERSION
@@ -133,6 +133,10 @@ const es2024 = {
133
133
  ...es2023
134
134
  };
135
135
 
136
+ const es2025 = {
137
+ ...es2024
138
+ };
139
+
136
140
 
137
141
  //-----------------------------------------------------------------------------
138
142
  // Exports
@@ -151,5 +155,6 @@ module.exports = {
151
155
  es2021,
152
156
  es2022,
153
157
  es2023,
154
- es2024
158
+ es2024,
159
+ es2025
155
160
  };
@@ -26,7 +26,7 @@ const fs = require("node:fs"),
26
26
  { normalizeSeverityToString } = require("./shared/severity");
27
27
  const { Legacy: { naming } } = require("@eslint/eslintrc");
28
28
  const { ModuleImporter } = require("@humanwhocodes/module-importer");
29
-
29
+ const { inactiveFlags, activeFlags } = require("./shared/flags");
30
30
  const debug = require("debug")("eslint:cli");
31
31
 
32
32
  //------------------------------------------------------------------------------
@@ -117,6 +117,7 @@ async function translateOptions({
117
117
  fix,
118
118
  fixDryRun,
119
119
  fixType,
120
+ flag,
120
121
  global,
121
122
  ignore,
122
123
  ignorePath,
@@ -225,6 +226,7 @@ async function translateOptions({
225
226
  options.ignorePatterns = ignorePattern;
226
227
  options.stats = stats;
227
228
  options.warnIgnored = warnIgnored;
229
+ options.flags = flag;
228
230
 
229
231
  /*
230
232
  * For performance reasons rules not marked as 'error' are filtered out in quiet mode. As maxWarnings
@@ -485,8 +487,27 @@ const cli = {
485
487
  }
486
488
 
487
489
  const ActiveESLint = usingFlatConfig ? ESLint : LegacyESLint;
490
+ const eslintOptions = await translateOptions(options, usingFlatConfig ? "flat" : "eslintrc");
491
+
492
+ if (eslintOptions.flags) {
493
+ debug("Checking for inactive flags");
494
+
495
+ for (const flag of eslintOptions.flags) {
496
+ if (inactiveFlags.has(flag)) {
497
+ log.warn(`InactiveFlag: The '${flag}' flag is no longer active: ${inactiveFlags.get(flag)}`);
498
+ continue;
499
+ }
500
+
501
+ if (activeFlags.has(flag)) {
502
+ continue;
503
+ }
504
+
505
+ log.error(`InvalidFlag: The '${flag}' flag is invalid.`);
506
+ return 2;
507
+ }
508
+ }
488
509
 
489
- const engine = new ActiveESLint(await translateOptions(options, usingFlatConfig ? "flat" : "eslintrc"));
510
+ const engine = new ActiveESLint(eslintOptions);
490
511
  let results;
491
512
 
492
513
  if (useStdin) {