oxlint-plugin-eslint 1.62.0 → 1.63.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 (298) hide show
  1. package/common/ast-utils.cjs +545 -155
  2. package/common/fix-tracker.cjs +1 -1
  3. package/common/keywords.cjs +1 -1
  4. package/common/regular-expressions.cjs +1 -1
  5. package/common/string-utils.cjs +1 -1
  6. package/index.js +27 -16
  7. package/package.json +1 -1
  8. package/rules/accessor-pairs.cjs +1 -1
  9. package/rules/array-bracket-newline.cjs +1 -1
  10. package/rules/array-bracket-spacing.cjs +2 -2
  11. package/rules/array-callback-return.cjs +11 -3
  12. package/rules/array-element-newline.cjs +1 -1
  13. package/rules/arrow-body-style.cjs +1 -1
  14. package/rules/arrow-parens.cjs +1 -1
  15. package/rules/arrow-spacing.cjs +1 -1
  16. package/rules/block-scoped-var.cjs +5 -3
  17. package/rules/block-spacing.cjs +2 -2
  18. package/rules/brace-style.cjs +1 -1
  19. package/rules/callback-return.cjs +1 -1
  20. package/rules/camelcase.cjs +1 -1
  21. package/rules/capitalized-comments.cjs +1 -1
  22. package/rules/class-methods-use-this.cjs +1 -1
  23. package/rules/comma-dangle.cjs +1 -1
  24. package/rules/comma-spacing.cjs +2 -2
  25. package/rules/comma-style.cjs +1 -1
  26. package/rules/complexity.cjs +1 -1
  27. package/rules/computed-property-spacing.cjs +2 -2
  28. package/rules/consistent-return.cjs +1 -1
  29. package/rules/consistent-this.cjs +1 -1
  30. package/rules/constructor-super.cjs +1 -1
  31. package/rules/curly.cjs +1 -1
  32. package/rules/default-case-last.cjs +1 -1
  33. package/rules/default-case.cjs +1 -1
  34. package/rules/default-param-last.cjs +1 -1
  35. package/rules/dot-location.cjs +1 -1
  36. package/rules/dot-notation.cjs +3 -3
  37. package/rules/eol-last.cjs +1 -1
  38. package/rules/eqeqeq.cjs +1 -1
  39. package/rules/for-direction.cjs +1 -1
  40. package/rules/func-call-spacing.cjs +1 -1
  41. package/rules/func-name-matching.cjs +1 -1
  42. package/rules/func-names.cjs +6 -3
  43. package/rules/func-style.cjs +1 -1
  44. package/rules/function-call-argument-newline.cjs +1 -1
  45. package/rules/function-paren-newline.cjs +1 -1
  46. package/rules/generator-star-spacing.cjs +1 -1
  47. package/rules/getter-return.cjs +1 -1
  48. package/rules/global-require.cjs +1 -1
  49. package/rules/grouped-accessor-pairs.cjs +1 -1
  50. package/rules/guard-for-in.cjs +1 -1
  51. package/rules/handle-callback-err.cjs +1 -1
  52. package/rules/id-blacklist.cjs +1 -1
  53. package/rules/id-denylist.cjs +1 -1
  54. package/rules/id-length.cjs +1 -1
  55. package/rules/id-match.cjs +1 -1
  56. package/rules/implicit-arrow-linebreak.cjs +1 -1
  57. package/rules/indent-legacy.cjs +1 -1
  58. package/rules/indent.cjs +1 -1
  59. package/rules/init-declarations.cjs +1 -1
  60. package/rules/jsx-quotes.cjs +1 -1
  61. package/rules/key-spacing.cjs +1 -1
  62. package/rules/keyword-spacing.cjs +5 -5
  63. package/rules/line-comment-position.cjs +1 -1
  64. package/rules/linebreak-style.cjs +1 -1
  65. package/rules/lines-around-comment.cjs +1 -1
  66. package/rules/lines-around-directive.cjs +1 -1
  67. package/rules/lines-between-class-members.cjs +1 -1
  68. package/rules/logical-assignment-operators.cjs +1 -1
  69. package/rules/max-classes-per-file.cjs +1 -1
  70. package/rules/max-depth.cjs +1 -1
  71. package/rules/max-len.cjs +1 -1
  72. package/rules/max-lines-per-function.cjs +1 -1
  73. package/rules/max-lines.cjs +1 -1
  74. package/rules/max-nested-callbacks.cjs +1 -1
  75. package/rules/max-params.cjs +15 -6
  76. package/rules/max-statements-per-line.cjs +1 -1
  77. package/rules/max-statements.cjs +1 -1
  78. package/rules/multiline-comment-style.cjs +1 -1
  79. package/rules/multiline-ternary.cjs +1 -1
  80. package/rules/new-cap.cjs +1 -1
  81. package/rules/new-parens.cjs +1 -1
  82. package/rules/newline-after-var.cjs +1 -1
  83. package/rules/newline-before-return.cjs +1 -1
  84. package/rules/newline-per-chained-call.cjs +1 -1
  85. package/rules/no-alert.cjs +1 -1
  86. package/rules/no-array-constructor.cjs +1 -1
  87. package/rules/no-async-promise-executor.cjs +4 -3
  88. package/rules/no-await-in-loop.cjs +1 -1
  89. package/rules/no-bitwise.cjs +1 -1
  90. package/rules/no-buffer-constructor.cjs +1 -1
  91. package/rules/no-caller.cjs +1 -1
  92. package/rules/no-case-declarations.cjs +1 -1
  93. package/rules/no-catch-shadow.cjs +1 -1
  94. package/rules/no-class-assign.cjs +1 -1
  95. package/rules/no-compare-neg-zero.cjs +1 -1
  96. package/rules/no-cond-assign.cjs +1 -1
  97. package/rules/no-confusing-arrow.cjs +1 -1
  98. package/rules/no-console.cjs +5 -4
  99. package/rules/no-const-assign.cjs +1 -1
  100. package/rules/no-constant-binary-expression.cjs +1 -1
  101. package/rules/no-constant-condition.cjs +1 -1
  102. package/rules/no-constructor-return.cjs +1 -1
  103. package/rules/no-continue.cjs +1 -1
  104. package/rules/no-control-regex.cjs +1 -1
  105. package/rules/no-debugger.cjs +1 -1
  106. package/rules/no-delete-var.cjs +1 -1
  107. package/rules/no-div-regex.cjs +1 -1
  108. package/rules/no-dupe-args.cjs +3 -2
  109. package/rules/no-dupe-class-members.cjs +1 -1
  110. package/rules/no-dupe-else-if.cjs +1 -1
  111. package/rules/no-dupe-keys.cjs +1 -1
  112. package/rules/no-duplicate-case.cjs +1 -1
  113. package/rules/no-duplicate-imports.cjs +1 -1
  114. package/rules/no-else-return.cjs +4 -3
  115. package/rules/no-empty-character-class.cjs +1 -1
  116. package/rules/no-empty-function.cjs +1 -1
  117. package/rules/no-empty-pattern.cjs +1 -1
  118. package/rules/no-empty-static-block.cjs +1 -1
  119. package/rules/no-empty.cjs +1 -1
  120. package/rules/no-eq-null.cjs +1 -1
  121. package/rules/no-eval.cjs +4 -4
  122. package/rules/no-ex-assign.cjs +1 -1
  123. package/rules/no-extend-native.cjs +1 -1
  124. package/rules/no-extra-bind.cjs +1 -1
  125. package/rules/no-extra-boolean-cast.cjs +1 -1
  126. package/rules/no-extra-label.cjs +1 -1
  127. package/rules/no-extra-parens.cjs +2 -2
  128. package/rules/no-extra-semi.cjs +1 -1
  129. package/rules/no-fallthrough.cjs +1 -1
  130. package/rules/no-floating-decimal.cjs +1 -1
  131. package/rules/no-func-assign.cjs +1 -1
  132. package/rules/no-global-assign.cjs +1 -1
  133. package/rules/no-implicit-coercion.cjs +1 -1
  134. package/rules/no-implicit-globals.cjs +1 -1
  135. package/rules/no-implied-eval.cjs +3 -2
  136. package/rules/no-import-assign.cjs +1 -1
  137. package/rules/no-inline-comments.cjs +1 -1
  138. package/rules/no-inner-declarations.cjs +1 -1
  139. package/rules/no-invalid-regexp.cjs +3 -2
  140. package/rules/no-invalid-this.cjs +1 -1
  141. package/rules/no-irregular-whitespace.cjs +1 -1
  142. package/rules/no-iterator.cjs +1 -1
  143. package/rules/no-label-var.cjs +1 -1
  144. package/rules/no-labels.cjs +1 -1
  145. package/rules/no-lone-blocks.cjs +1 -1
  146. package/rules/no-lonely-if.cjs +1 -1
  147. package/rules/no-loop-func.cjs +4 -3
  148. package/rules/no-loss-of-precision.cjs +1 -1
  149. package/rules/no-magic-numbers.cjs +1 -1
  150. package/rules/no-misleading-character-class.cjs +3 -3
  151. package/rules/no-mixed-operators.cjs +1 -1
  152. package/rules/no-mixed-requires.cjs +1 -1
  153. package/rules/no-mixed-spaces-and-tabs.cjs +1 -1
  154. package/rules/no-multi-assign.cjs +1 -1
  155. package/rules/no-multi-spaces.cjs +1 -1
  156. package/rules/no-multi-str.cjs +1 -1
  157. package/rules/no-multiple-empty-lines.cjs +1 -1
  158. package/rules/no-native-reassign.cjs +1 -1
  159. package/rules/no-negated-condition.cjs +1 -1
  160. package/rules/no-negated-in-lhs.cjs +1 -1
  161. package/rules/no-nested-ternary.cjs +1 -1
  162. package/rules/no-new-func.cjs +1 -1
  163. package/rules/no-new-native-nonconstructor.cjs +1 -1
  164. package/rules/no-new-object.cjs +1 -1
  165. package/rules/no-new-require.cjs +1 -1
  166. package/rules/no-new-symbol.cjs +1 -1
  167. package/rules/no-new-wrappers.cjs +1 -1
  168. package/rules/no-new.cjs +1 -1
  169. package/rules/no-nonoctal-decimal-escape.cjs +1 -1
  170. package/rules/no-obj-calls.cjs +3 -2
  171. package/rules/no-object-constructor.cjs +1 -1
  172. package/rules/no-octal-escape.cjs +1 -1
  173. package/rules/no-octal.cjs +1 -1
  174. package/rules/no-param-reassign.cjs +1 -1
  175. package/rules/no-path-concat.cjs +1 -1
  176. package/rules/no-plusplus.cjs +1 -1
  177. package/rules/no-process-env.cjs +1 -1
  178. package/rules/no-process-exit.cjs +1 -1
  179. package/rules/no-promise-executor-return.cjs +1 -1
  180. package/rules/no-proto.cjs +1 -1
  181. package/rules/no-prototype-builtins.cjs +1 -1
  182. package/rules/no-redeclare.cjs +1 -1
  183. package/rules/no-regex-spaces.cjs +1 -1
  184. package/rules/no-restricted-exports.cjs +1 -1
  185. package/rules/no-restricted-globals.cjs +1 -1
  186. package/rules/no-restricted-imports.cjs +39 -16
  187. package/rules/no-restricted-modules.cjs +1 -1
  188. package/rules/no-restricted-properties.cjs +1 -1
  189. package/rules/no-restricted-syntax.cjs +1 -1
  190. package/rules/no-return-assign.cjs +1 -1
  191. package/rules/no-return-await.cjs +1 -1
  192. package/rules/no-script-url.cjs +1 -1
  193. package/rules/no-self-assign.cjs +1 -1
  194. package/rules/no-self-compare.cjs +1 -1
  195. package/rules/no-sequences.cjs +1 -1
  196. package/rules/no-setter-return.cjs +1 -1
  197. package/rules/no-shadow-restricted-names.cjs +2 -2
  198. package/rules/no-shadow.cjs +45 -13
  199. package/rules/no-spaced-func.cjs +2 -2
  200. package/rules/no-sparse-arrays.cjs +1 -1
  201. package/rules/no-sync.cjs +1 -1
  202. package/rules/no-tabs.cjs +1 -1
  203. package/rules/no-template-curly-in-string.cjs +1 -1
  204. package/rules/no-ternary.cjs +1 -1
  205. package/rules/no-this-before-super.cjs +1 -1
  206. package/rules/no-throw-literal.cjs +1 -1
  207. package/rules/no-trailing-spaces.cjs +1 -1
  208. package/rules/no-unassigned-vars.cjs +2 -2
  209. package/rules/no-undef-init.cjs +1 -1
  210. package/rules/no-undef.cjs +1 -1
  211. package/rules/no-undefined.cjs +3 -2
  212. package/rules/no-underscore-dangle.cjs +1 -1
  213. package/rules/no-unexpected-multiline.cjs +1 -1
  214. package/rules/no-unmodified-loop-condition.cjs +28 -65
  215. package/rules/no-unneeded-ternary.cjs +1 -1
  216. package/rules/no-unreachable-loop.cjs +1 -1
  217. package/rules/no-unreachable.cjs +1 -1
  218. package/rules/no-unsafe-finally.cjs +1 -1
  219. package/rules/no-unsafe-negation.cjs +1 -1
  220. package/rules/no-unsafe-optional-chaining.cjs +1 -1
  221. package/rules/no-unused-expressions.cjs +1 -1
  222. package/rules/no-unused-labels.cjs +1 -1
  223. package/rules/no-unused-private-class-members.cjs +1 -1
  224. package/rules/no-unused-vars.cjs +6 -4
  225. package/rules/no-use-before-define.cjs +7 -5
  226. package/rules/no-useless-assignment.cjs +11 -7
  227. package/rules/no-useless-backreference.cjs +1 -1
  228. package/rules/no-useless-call.cjs +1 -1
  229. package/rules/no-useless-catch.cjs +1 -1
  230. package/rules/no-useless-computed-key.cjs +1 -1
  231. package/rules/no-useless-concat.cjs +1 -1
  232. package/rules/no-useless-constructor.cjs +9 -5
  233. package/rules/no-useless-escape.cjs +1 -1
  234. package/rules/no-useless-rename.cjs +1 -1
  235. package/rules/no-useless-return.cjs +1 -1
  236. package/rules/no-var.cjs +27 -10
  237. package/rules/no-void.cjs +1 -1
  238. package/rules/no-warning-comments.cjs +1 -1
  239. package/rules/no-whitespace-before-property.cjs +2 -2
  240. package/rules/no-with.cjs +1 -1
  241. package/rules/nonblock-statement-body-position.cjs +1 -1
  242. package/rules/object-curly-newline.cjs +1 -1
  243. package/rules/object-curly-spacing.cjs +3 -3
  244. package/rules/object-property-newline.cjs +1 -1
  245. package/rules/object-shorthand.cjs +1 -1
  246. package/rules/one-var-declaration-per-line.cjs +1 -1
  247. package/rules/one-var.cjs +1 -1
  248. package/rules/operator-assignment.cjs +1 -1
  249. package/rules/operator-linebreak.cjs +1 -1
  250. package/rules/padded-blocks.cjs +1 -1
  251. package/rules/padding-line-between-statements.cjs +1 -1
  252. package/rules/prefer-arrow-callback.cjs +6 -4
  253. package/rules/prefer-const.cjs +6 -6
  254. package/rules/prefer-destructuring.cjs +1 -1
  255. package/rules/prefer-exponentiation-operator.cjs +1 -1
  256. package/rules/prefer-named-capture-group.cjs +1 -1
  257. package/rules/prefer-numeric-literals.cjs +1 -1
  258. package/rules/prefer-object-has-own.cjs +1 -1
  259. package/rules/prefer-object-spread.cjs +1 -1
  260. package/rules/prefer-promise-reject-errors.cjs +1 -1
  261. package/rules/prefer-reflect.cjs +1 -1
  262. package/rules/prefer-regex-literals.cjs +1 -1
  263. package/rules/prefer-rest-params.cjs +8 -5
  264. package/rules/prefer-spread.cjs +1 -1
  265. package/rules/prefer-template.cjs +1 -1
  266. package/rules/preserve-caught-error.cjs +2 -2
  267. package/rules/quote-props.cjs +1 -1
  268. package/rules/quotes.cjs +1 -1
  269. package/rules/radix.cjs +7 -20
  270. package/rules/require-atomic-updates.cjs +1 -1
  271. package/rules/require-await.cjs +1 -1
  272. package/rules/require-unicode-regexp.cjs +1 -1
  273. package/rules/require-yield.cjs +6 -4
  274. package/rules/rest-spread-spacing.cjs +2 -2
  275. package/rules/semi-spacing.cjs +3 -3
  276. package/rules/semi-style.cjs +1 -1
  277. package/rules/semi.cjs +1 -1
  278. package/rules/sort-imports.cjs +1 -1
  279. package/rules/sort-vars.cjs +1 -1
  280. package/rules/space-before-blocks.cjs +2 -2
  281. package/rules/space-before-function-paren.cjs +2 -2
  282. package/rules/space-in-parens.cjs +5 -5
  283. package/rules/space-infix-ops.cjs +3 -3
  284. package/rules/space-unary-ops.cjs +1 -1
  285. package/rules/spaced-comment.cjs +1 -1
  286. package/rules/strict.cjs +6 -2
  287. package/rules/switch-colon-spacing.cjs +2 -2
  288. package/rules/symbol-description.cjs +1 -1
  289. package/rules/template-curly-spacing.cjs +1 -1
  290. package/rules/template-tag-spacing.cjs +2 -2
  291. package/rules/unicode-bom.cjs +1 -1
  292. package/rules/use-isnan.cjs +1 -1
  293. package/rules/valid-typeof.cjs +1 -1
  294. package/rules/vars-on-top.cjs +1 -1
  295. package/rules/wrap-iife.cjs +1 -1
  296. package/rules/wrap-regex.cjs +1 -1
  297. package/rules/yield-star-spacing.cjs +2 -2
  298. package/rules/yoda.cjs +1 -1
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk.cjs");
2
- //#region ../../node_modules/.pnpm/eslint-visitor-keys@4.2.1/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
2
+ //#region ../../node_modules/.pnpm/eslint-visitor-keys@5.0.1/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
3
3
  var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) => {
4
4
  /**
5
5
  * @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
@@ -494,8 +494,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
494
494
  4,
495
495
  318,
496
496
  1,
497
- 80,
498
- 3,
497
+ 78,
498
+ 5,
499
499
  71,
500
500
  10,
501
501
  50,
@@ -640,7 +640,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
640
640
  10,
641
641
  47,
642
642
  15,
643
- 343,
643
+ 199,
644
+ 7,
645
+ 137,
644
646
  9,
645
647
  54,
646
648
  7,
@@ -672,7 +674,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
672
674
  4,
673
675
  9,
674
676
  9,
675
- 330,
677
+ 55,
678
+ 9,
679
+ 266,
676
680
  3,
677
681
  10,
678
682
  1,
@@ -772,7 +776,15 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
772
776
  1,
773
777
  2,
774
778
  9,
775
- 726,
779
+ 233,
780
+ 0,
781
+ 3,
782
+ 0,
783
+ 8,
784
+ 1,
785
+ 6,
786
+ 0,
787
+ 475,
776
788
  6,
777
789
  110,
778
790
  6,
@@ -881,7 +893,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
881
893
  21,
882
894
  11,
883
895
  25,
884
- 71,
896
+ 7,
897
+ 25,
898
+ 39,
885
899
  55,
886
900
  7,
887
901
  1,
@@ -926,8 +940,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
926
940
  7,
927
941
  1,
928
942
  17,
929
- 2,
930
- 60,
943
+ 5,
944
+ 57,
931
945
  28,
932
946
  11,
933
947
  0,
@@ -1111,7 +1125,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1111
1125
  31,
1112
1126
  15,
1113
1127
  0,
1114
- 328,
1128
+ 24,
1129
+ 43,
1130
+ 261,
1115
1131
  18,
1116
1132
  16,
1117
1133
  0,
@@ -1159,7 +1175,11 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1159
1175
  44,
1160
1176
  212,
1161
1177
  63,
1162
- 129,
1178
+ 33,
1179
+ 24,
1180
+ 3,
1181
+ 24,
1182
+ 45,
1163
1183
  74,
1164
1184
  6,
1165
1185
  0,
@@ -1169,13 +1189,15 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1169
1189
  1,
1170
1190
  2,
1171
1191
  0,
1172
- 29,
1173
- 6135,
1174
- 9,
1175
- 1237,
1192
+ 15,
1193
+ 4,
1194
+ 10,
1195
+ 7381,
1176
1196
  42,
1177
- 9,
1178
- 8936,
1197
+ 31,
1198
+ 98,
1199
+ 114,
1200
+ 8702,
1179
1201
  3,
1180
1202
  2,
1181
1203
  6,
@@ -1283,7 +1305,19 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1283
1305
  29,
1284
1306
  3,
1285
1307
  0,
1286
- 496,
1308
+ 208,
1309
+ 30,
1310
+ 2,
1311
+ 2,
1312
+ 2,
1313
+ 1,
1314
+ 2,
1315
+ 6,
1316
+ 3,
1317
+ 4,
1318
+ 10,
1319
+ 1,
1320
+ 225,
1287
1321
  6,
1288
1322
  2,
1289
1323
  3,
@@ -1366,12 +1400,10 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1366
1400
  4421,
1367
1401
  42719,
1368
1402
  33,
1369
- 4153,
1370
- 7,
1371
- 221,
1403
+ 4381,
1404
+ 3,
1405
+ 5773,
1372
1406
  3,
1373
- 5761,
1374
- 15,
1375
1407
  7472,
1376
1408
  16,
1377
1409
  621,
@@ -1380,8 +1412,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1380
1412
  1507,
1381
1413
  4938,
1382
1414
  6,
1383
- 4191
1384
- ], nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", reservedWords = {
1415
+ 8489
1416
+ ], nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・", nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", reservedWords = {
1385
1417
  3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
1386
1418
  5: "class enum extends super const export import",
1387
1419
  6: "enum",
@@ -1620,7 +1652,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1620
1652
  return tokens.push(token);
1621
1653
  };
1622
1654
  }
1623
- return isArray(options.onComment) && (options.onComment = pushComment(options, options.onComment)), options;
1655
+ if (isArray(options.onComment) && (options.onComment = pushComment(options, options.onComment)), options.sourceType === "commonjs" && options.allowAwaitOutsideFunction) throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
1656
+ return options;
1624
1657
  }
1625
1658
  function pushComment(options, array) {
1626
1659
  return function(block, text, start, end, startLoc, endLoc) {
@@ -1633,7 +1666,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1633
1666
  options.locations && (comment.loc = new SourceLocation(this, startLoc, endLoc)), options.ranges && (comment.range = [start, end]), array.push(comment);
1634
1667
  };
1635
1668
  }
1636
- var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
1669
+ var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_SWITCH = 1024, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
1637
1670
  function functionFlags(async, generator) {
1638
1671
  return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
1639
1672
  }
@@ -1642,16 +1675,18 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1642
1675
  var reserved = "";
1643
1676
  options.allowReserved !== !0 && (reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3], options.sourceType === "module" && (reserved += " await")), this.reservedWords = wordsRegexp(reserved);
1644
1677
  var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
1645
- this.reservedWordsStrict = wordsRegexp(reservedStrict), this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind), this.input = String(input), this.containsEsc = !1, startPos ? (this.pos = startPos, this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = types$1.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = options.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(SCOPE_TOP), this.regexpState = null, this.privateNameStack = [];
1678
+ this.reservedWordsStrict = wordsRegexp(reservedStrict), this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind), this.input = String(input), this.containsEsc = !1, startPos ? (this.pos = startPos, this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = types$1.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = options.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = Object.create(null), this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(this.options.sourceType === "commonjs" ? SCOPE_FUNCTION : SCOPE_TOP), this.regexpState = null, this.privateNameStack = [];
1646
1679
  }, prototypeAccessors = {
1647
1680
  inFunction: { configurable: !0 },
1648
1681
  inGenerator: { configurable: !0 },
1649
1682
  inAsync: { configurable: !0 },
1650
1683
  canAwait: { configurable: !0 },
1684
+ allowReturn: { configurable: !0 },
1651
1685
  allowSuper: { configurable: !0 },
1652
1686
  allowDirectSuper: { configurable: !0 },
1653
1687
  treatFunctionsAsVar: { configurable: !0 },
1654
1688
  allowNewDotTarget: { configurable: !0 },
1689
+ allowUsing: { configurable: !0 },
1655
1690
  inClassStaticBlock: { configurable: !0 }
1656
1691
  };
1657
1692
  Parser.prototype.parse = function parse() {
@@ -1670,6 +1705,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1670
1705
  if (flags & SCOPE_FUNCTION) return (flags & SCOPE_ASYNC) > 0;
1671
1706
  }
1672
1707
  return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
1708
+ }, prototypeAccessors.allowReturn.get = function() {
1709
+ return !!(this.inFunction || this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP);
1673
1710
  }, prototypeAccessors.allowSuper.get = function() {
1674
1711
  return (this.currentThisScope().flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
1675
1712
  }, prototypeAccessors.allowDirectSuper.get = function() {
@@ -1682,6 +1719,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1682
1719
  if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) || flags & SCOPE_FUNCTION && !(flags & SCOPE_ARROW)) return !0;
1683
1720
  }
1684
1721
  return !1;
1722
+ }, prototypeAccessors.allowUsing.get = function() {
1723
+ var flags = this.currentScope().flags;
1724
+ return !(flags & SCOPE_SWITCH || !this.inModule && flags & SCOPE_TOP);
1685
1725
  }, prototypeAccessors.inClassStaticBlock.get = function() {
1686
1726
  return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
1687
1727
  }, Parser.extend = function extend() {
@@ -1761,20 +1801,23 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1761
1801
  var name = list[i];
1762
1802
  this.raiseRecoverable(this.undefinedExports[name].start, "Export '" + name + "' is not defined");
1763
1803
  }
1764
- return this.adaptDirectivePrologue(node.body), this.next(), node.sourceType = this.options.sourceType, this.finishNode(node, "Program");
1804
+ return this.adaptDirectivePrologue(node.body), this.next(), node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType, this.finishNode(node, "Program");
1765
1805
  };
1766
1806
  var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" };
1767
1807
  pp$8.isLet = function(context) {
1768
1808
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return !1;
1769
1809
  skipWhiteSpace.lastIndex = this.pos;
1770
- var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
1810
+ var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
1771
1811
  if (nextCh === 91 || nextCh === 92) return !0;
1772
1812
  if (context) return !1;
1773
- if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) return !0;
1774
- if (isIdentifierStart(nextCh, !0)) {
1775
- for (var pos = next + 1; isIdentifierChar(nextCh = this.input.charCodeAt(pos), !0);) ++pos;
1776
- if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) return !0;
1777
- var ident = this.input.slice(next, pos);
1813
+ if (nextCh === 123) return !0;
1814
+ if (isIdentifierStart(nextCh)) {
1815
+ var start = next;
1816
+ do
1817
+ next += nextCh <= 65535 ? 1 : 2;
1818
+ while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
1819
+ if (nextCh === 92) return !0;
1820
+ var ident = this.input.slice(start, next);
1778
1821
  if (!keywordRelationalOperator.test(ident)) return !0;
1779
1822
  }
1780
1823
  return !1;
@@ -1782,25 +1825,28 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1782
1825
  if (this.options.ecmaVersion < 8 || !this.isContextual("async")) return !1;
1783
1826
  skipWhiteSpace.lastIndex = this.pos;
1784
1827
  var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length, after;
1785
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
1828
+ return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92));
1786
1829
  }, pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
1787
1830
  if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) return !1;
1788
1831
  skipWhiteSpace.lastIndex = this.pos;
1789
1832
  var skip = skipWhiteSpace.exec(this.input), next = this.pos + skip[0].length;
1790
1833
  if (lineBreak.test(this.input.slice(this.pos, next))) return !1;
1791
1834
  if (isAwaitUsing) {
1792
- var awaitEndPos = next + 5, after;
1793
- if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) return !1;
1794
- skipWhiteSpace.lastIndex = awaitEndPos;
1835
+ var usingEndPos = next + 5, after;
1836
+ if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || after === 92) return !1;
1837
+ skipWhiteSpace.lastIndex = usingEndPos;
1795
1838
  var skipAfterUsing = skipWhiteSpace.exec(this.input);
1796
- if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) return !1;
1797
- }
1798
- if (isFor) {
1799
- var ofEndPos = next + 2, after$1;
1800
- if (this.input.slice(next, ofEndPos) === "of" && (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320))) return !1;
1801
- }
1802
- var ch = this.input.charCodeAt(next);
1803
- return isIdentifierStart(ch, !0) || ch === 92;
1839
+ if (next = usingEndPos + skipAfterUsing[0].length, skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) return !1;
1840
+ }
1841
+ var ch = this.fullCharCodeAt(next);
1842
+ if (!isIdentifierStart(ch) && ch !== 92) return !1;
1843
+ var idStart = next;
1844
+ do
1845
+ next += ch <= 65535 ? 1 : 2;
1846
+ while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
1847
+ if (ch === 92) return !0;
1848
+ var id = this.input.slice(idStart, next);
1849
+ return !(keywordRelationalOperator.test(id) || isFor && id === "of");
1804
1850
  }, pp$8.isAwaitUsing = function(isFor) {
1805
1851
  return this.isUsingKeyword(!0, isFor);
1806
1852
  }, pp$8.isUsing = function(isFor) {
@@ -1837,7 +1883,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1837
1883
  default:
1838
1884
  if (this.isAsyncFunction()) return context && this.unexpected(), this.next(), this.parseFunctionStatement(node, !0, !context);
1839
1885
  var usingKind = this.isAwaitUsing(!1) ? "await using" : this.isUsing(!1) ? "using" : null;
1840
- if (usingKind) return topLevel && this.options.sourceType === "script" && this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`"), usingKind === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(node, !1, usingKind), this.semicolon(), this.finishNode(node, "VariableDeclaration");
1886
+ if (usingKind) return this.allowUsing || this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"), usingKind === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.next(), this.parseVar(node, !1, usingKind), this.semicolon(), this.finishNode(node, "VariableDeclaration");
1841
1887
  var maybeName = this.value, expr = this.parseExpression();
1842
1888
  return starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon) ? this.parseLabeledStatement(node, maybeName, expr, context) : this.parseExpressionStatement(node, expr);
1843
1889
  }
@@ -1865,7 +1911,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1865
1911
  var startsWithLet = this.isContextual("let"), isForOf = !1, usingKind = this.isUsing(!0) ? "using" : this.isAwaitUsing(!0) ? "await using" : null;
1866
1912
  if (usingKind) {
1867
1913
  var init$2 = this.startNode();
1868
- return this.next(), usingKind === "await using" && this.next(), this.parseVar(init$2, !0, usingKind), this.finishNode(init$2, "VariableDeclaration"), this.parseForAfterInit(node, init$2, awaitAt);
1914
+ return this.next(), usingKind === "await using" && (this.canAwait || this.raise(this.start, "Await using cannot appear outside of async function"), this.next()), this.parseVar(init$2, !0, usingKind), this.finishNode(init$2, "VariableDeclaration"), this.parseForAfterInit(node, init$2, awaitAt);
1869
1915
  }
1870
1916
  var containsEsc = this.containsEsc, refDestructuringErrors = new DestructuringErrors(), initPos = this.start, init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(!0, refDestructuringErrors);
1871
1917
  return this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (awaitAt > -1 ? (this.type === types$1._in && this.unexpected(awaitAt), node.await = !0) : isForOf && this.options.ecmaVersion >= 8 && (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (node.await = !1)), startsWithLet && isForOf && this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(init, !1, refDestructuringErrors), this.checkLValPattern(init), this.parseForIn(node, init)) : (this.checkExpressionErrors(refDestructuringErrors, !0), awaitAt > -1 && this.unexpected(awaitAt), this.parseFor(node, init));
@@ -1876,9 +1922,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
1876
1922
  }, pp$8.parseIfStatement = function(node) {
1877
1923
  return this.next(), node.test = this.parseParenExpression(), node.consequent = this.parseStatement("if"), node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null, this.finishNode(node, "IfStatement");
1878
1924
  }, pp$8.parseReturnStatement = function(node) {
1879
- return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(types$1.semi) || this.insertSemicolon() ? node.argument = null : (node.argument = this.parseExpression(), this.semicolon()), this.finishNode(node, "ReturnStatement");
1925
+ return this.allowReturn || this.raise(this.start, "'return' outside of function"), this.next(), this.eat(types$1.semi) || this.insertSemicolon() ? node.argument = null : (node.argument = this.parseExpression(), this.semicolon()), this.finishNode(node, "ReturnStatement");
1880
1926
  }, pp$8.parseSwitchStatement = function(node) {
1881
- this.next(), node.discriminant = this.parseParenExpression(), node.cases = [], this.expect(types$1.braceL), this.labels.push(switchLabel), this.enterScope(0);
1927
+ this.next(), node.discriminant = this.parseParenExpression(), node.cases = [], this.expect(types$1.braceL), this.labels.push(switchLabel), this.enterScope(SCOPE_SWITCH);
1882
1928
  for (var cur, sawDefault = !1; this.type !== types$1.braceR;) if (this.type === types$1._case || this.type === types$1._default) {
1883
1929
  var isCase = this.type === types$1._case;
1884
1930
  cur && this.finishNode(cur, "SwitchCase"), node.cases.push(cur = this.startNode()), cur.consequent = [], this.next(), isCase ? cur.test = this.parseExpression() : (sawDefault && this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"), sawDefault = !0, cur.test = null), this.expect(types$1.colon);
@@ -2739,7 +2785,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
2739
2785
  for (var prop in node) newNode[prop] = node[prop];
2740
2786
  return newNode;
2741
2787
  };
2742
- var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic", ecma11BinaryProperties = ecma10BinaryProperties, ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict", ecma13BinaryProperties = ecma12BinaryProperties, unicodeBinaryProperties = {
2788
+ var scriptValuesAddedInUnicode = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz", ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic", ecma11BinaryProperties = ecma10BinaryProperties, ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict", ecma13BinaryProperties = ecma12BinaryProperties, unicodeBinaryProperties = {
2743
2789
  9: ecma9BinaryProperties,
2744
2790
  10: ecma10BinaryProperties,
2745
2791
  11: ecma11BinaryProperties,
@@ -3316,11 +3362,13 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
3316
3362
  this.readToken(this.fullCharCodeAtPos());
3317
3363
  }, pp.readToken = function(code) {
3318
3364
  return isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 ? this.readWord() : this.getTokenFromCode(code);
3319
- }, pp.fullCharCodeAtPos = function() {
3320
- var code = this.input.charCodeAt(this.pos);
3365
+ }, pp.fullCharCodeAt = function(pos) {
3366
+ var code = this.input.charCodeAt(pos);
3321
3367
  if (code <= 55295 || code >= 56320) return code;
3322
- var next = this.input.charCodeAt(this.pos + 1);
3368
+ var next = this.input.charCodeAt(pos + 1);
3323
3369
  return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
3370
+ }, pp.fullCharCodeAtPos = function() {
3371
+ return this.fullCharCodeAt(this.pos);
3324
3372
  }, pp.skipBlockComment = function() {
3325
3373
  var startLoc = this.options.onComment && this.curPosition(), start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
3326
3374
  if (end === -1 && this.raise(this.pos - 2, "Unterminated comment"), this.pos = end + 2, this.options.locations) for (var nextBreak = void 0, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) ++this.curLine, pos = this.lineStart = nextBreak;
@@ -3629,7 +3677,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
3629
3677
  var word = this.readWord1(), type = types$1.name;
3630
3678
  return this.keywords.test(word) && (type = keywords[word]), this.finishToken(type, word);
3631
3679
  };
3632
- var version = "8.15.0";
3680
+ var version = "8.16.0";
3633
3681
  Parser.acorn = {
3634
3682
  Parser,
3635
3683
  version,
@@ -4130,13 +4178,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4130
4178
  };
4131
4179
  }
4132
4180
  })), require_espree = /* @__PURE__ */ require_chunk.t(((exports) => {
4133
- Object.defineProperty(exports, "__esModule", { value: !0 });
4134
- var acorn = require_acorn(), jsx = require_acorn_jsx(), visitorKeys = require_eslint_visitor_keys();
4135
- function _interopDefaultLegacy(e) {
4136
- return e && typeof e == "object" && "default" in e ? e : { default: e };
4137
- }
4138
- function _interopNamespace(e) {
4139
- if (e && e.__esModule) return e;
4181
+ var acorn = require_acorn(), jsx = require_acorn_jsx(), eslintVisitorKeys = require_eslint_visitor_keys();
4182
+ function _interopNamespaceDefault(e) {
4140
4183
  var n = Object.create(null);
4141
4184
  return e && Object.keys(e).forEach(function(k) {
4142
4185
  if (k !== "default") {
@@ -4150,11 +4193,40 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4150
4193
  }
4151
4194
  }), n.default = e, Object.freeze(n);
4152
4195
  }
4153
- var acorn__namespace = /* @__PURE__ */ _interopNamespace(acorn), jsx__default = /* @__PURE__ */ _interopDefaultLegacy(jsx), visitorKeys__namespace = /* @__PURE__ */ _interopNamespace(visitorKeys);
4196
+ var acorn__namespace = /* @__PURE__ */ _interopNamespaceDefault(acorn);
4154
4197
  /**
4155
4198
  * @fileoverview Translates tokens between Acorn format and Esprima format.
4156
4199
  * @author Nicholas C. Zakas
4157
4200
  */
4201
+ /**
4202
+ * @import * as acorn from "acorn";
4203
+ * @import { EnhancedTokTypes } from "./espree.js"
4204
+ * @import { NormalizedEcmaVersion } from "./options.js";
4205
+ * @import { EspreeToken as EsprimaToken } from "../espree.js";
4206
+ */
4207
+ /**
4208
+ * Based on the `acorn.Token` class, but without a fixed `type` (since we need
4209
+ * it to be a string). Avoiding `type` lets us make one extending interface
4210
+ * more strict and another more lax.
4211
+ *
4212
+ * We could make `value` more strict to `string` even though the original is
4213
+ * `any`.
4214
+ *
4215
+ * `start` and `end` are required in `acorn.Token`
4216
+ *
4217
+ * `loc` and `range` are from `acorn.Token`
4218
+ *
4219
+ * Adds `regex`.
4220
+ */
4221
+ /**
4222
+ * @typedef {{
4223
+ * jsxAttrValueToken: boolean;
4224
+ * ecmaVersion: NormalizedEcmaVersion;
4225
+ * }} ExtraNoTokens
4226
+ * @typedef {{
4227
+ * tokens: EsprimaToken[]
4228
+ * } & ExtraNoTokens} Extra
4229
+ */
4158
4230
  let Token = {
4159
4231
  Boolean: "Boolean",
4160
4232
  EOF: "<end>",
@@ -4172,7 +4244,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4172
4244
  };
4173
4245
  /**
4174
4246
  * Converts part of a template into an Esprima token.
4175
- * @param {AcornToken[]} tokens The Acorn tokens representing the template.
4247
+ * @param {acorn.Token[]} tokens The Acorn tokens representing the template.
4176
4248
  * @param {string} code The source code.
4177
4249
  * @returns {EsprimaToken} The Esprima equivalent of the template token.
4178
4250
  * @private
@@ -4189,48 +4261,49 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4189
4261
  }
4190
4262
  /**
4191
4263
  * Contains logic to translate Acorn tokens into Esprima tokens.
4192
- * @param {Object} acornTokTypes The Acorn token types.
4193
- * @param {string} code The source code Acorn is parsing. This is necessary
4194
- * to correct the "value" property of some tokens.
4195
- * @constructor
4196
4264
  */
4197
- function TokenTranslator(acornTokTypes, code) {
4198
- this._acornTokTypes = acornTokTypes, this._tokens = [], this._curlyBrace = null, this._code = code;
4199
- }
4200
- TokenTranslator.prototype = {
4201
- constructor: TokenTranslator,
4265
+ var TokenTranslator = class {
4266
+ /**
4267
+ * Contains logic to translate Acorn tokens into Esprima tokens.
4268
+ * @param {EnhancedTokTypes} acornTokTypes The Acorn token types.
4269
+ * @param {string|String} code The source code Acorn is parsing. This is necessary
4270
+ * to correct the "value" property of some tokens.
4271
+ */
4272
+ constructor(acornTokTypes, code) {
4273
+ this._acornTokTypes = acornTokTypes, this._tokens = [], this._curlyBrace = null, this._code = code;
4274
+ }
4202
4275
  /**
4203
4276
  * Translates a single Esprima token to a single Acorn token. This may be
4204
4277
  * inaccurate due to how templates are handled differently in Esprima and
4205
4278
  * Acorn, but should be accurate for all other tokens.
4206
- * @param {AcornToken} token The Acorn token to translate.
4207
- * @param {Object} extra Espree extra object.
4279
+ * @param {acorn.Token} token The Acorn token to translate.
4280
+ * @param {ExtraNoTokens} extra Espree extra object.
4208
4281
  * @returns {EsprimaToken} The Esprima version of the token.
4209
4282
  */
4210
4283
  translate(token, extra) {
4211
- let type = token.type, tt = this._acornTokTypes;
4212
- if (type === tt.name) token.type = Token.Identifier, token.value === "static" && (token.type = Token.Keyword), extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let") && (token.type = Token.Keyword);
4213
- else if (type === tt.privateId) token.type = Token.PrivateIdentifier;
4214
- else if (type === tt.semi || type === tt.comma || type === tt.parenL || type === tt.parenR || type === tt.braceL || type === tt.braceR || type === tt.dot || type === tt.bracketL || type === tt.colon || type === tt.question || type === tt.bracketR || type === tt.ellipsis || type === tt.arrow || type === tt.jsxTagStart || type === tt.incDec || type === tt.starstar || type === tt.jsxTagEnd || type === tt.prefix || type === tt.questionDot || type.binop && !type.keyword || type.isAssign) token.type = Token.Punctuator, token.value = this._code.slice(token.start, token.end);
4215
- else if (type === tt.jsxName) token.type = Token.JSXIdentifier;
4216
- else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) token.type = Token.JSXText;
4217
- else if (type.keyword) type.keyword === "true" || type.keyword === "false" ? token.type = Token.Boolean : type.keyword === "null" ? token.type = Token.Null : token.type = Token.Keyword;
4218
- else if (type === tt.num) token.type = Token.Numeric, token.value = this._code.slice(token.start, token.end);
4219
- else if (type === tt.string) extra.jsxAttrValueToken ? (extra.jsxAttrValueToken = !1, token.type = Token.JSXText) : token.type = Token.String, token.value = this._code.slice(token.start, token.end);
4284
+ let type = token.type, tt = this._acornTokTypes, newToken = token;
4285
+ if (type === tt.name) newToken.type = Token.Identifier, "value" in token && token.value === "static" && (newToken.type = Token.Keyword), extra.ecmaVersion > 5 && "value" in token && (token.value === "yield" || token.value === "let") && (newToken.type = Token.Keyword);
4286
+ else if (type === tt.privateId) newToken.type = Token.PrivateIdentifier;
4287
+ else if (type === tt.semi || type === tt.comma || type === tt.parenL || type === tt.parenR || type === tt.braceL || type === tt.braceR || type === tt.dot || type === tt.bracketL || type === tt.colon || type === tt.question || type === tt.bracketR || type === tt.ellipsis || type === tt.arrow || type === tt.jsxTagStart || type === tt.incDec || type === tt.starstar || type === tt.jsxTagEnd || type === tt.prefix || type === tt.questionDot || "binop" in type && type.binop && !type.keyword || "isAssign" in type && type.isAssign) newToken.type = Token.Punctuator, newToken.value = this._code.slice(token.start, token.end);
4288
+ else if (type === tt.jsxName) newToken.type = Token.JSXIdentifier;
4289
+ else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) newToken.type = Token.JSXText;
4290
+ else if (type.keyword) type.keyword === "true" || type.keyword === "false" ? newToken.type = Token.Boolean : type.keyword === "null" ? newToken.type = Token.Null : newToken.type = Token.Keyword;
4291
+ else if (type === tt.num) newToken.type = Token.Numeric, newToken.value = this._code.slice(token.start, token.end);
4292
+ else if (type === tt.string) extra.jsxAttrValueToken ? (extra.jsxAttrValueToken = !1, newToken.type = Token.JSXText) : newToken.type = Token.String, newToken.value = this._code.slice(token.start, token.end);
4220
4293
  else if (type === tt.regexp) {
4221
- token.type = Token.RegularExpression;
4222
- let value = token.value;
4223
- token.regex = {
4294
+ newToken.type = Token.RegularExpression;
4295
+ let value = "value" in token && token.value;
4296
+ newToken.regex = {
4224
4297
  flags: value.flags,
4225
4298
  pattern: value.pattern
4226
- }, token.value = `/${value.pattern}/${value.flags}`;
4299
+ }, newToken.value = `/${value.pattern}/${value.flags}`;
4227
4300
  }
4228
- return token;
4229
- },
4301
+ return newToken;
4302
+ }
4230
4303
  /**
4231
4304
  * Function to call during Acorn's onToken handler.
4232
- * @param {AcornToken} token The Acorn token.
4233
- * @param {Object} extra The Espree extra object.
4305
+ * @param {acorn.Token} token The Acorn token.
4306
+ * @param {Extra} extra The Espree extra object.
4234
4307
  * @returns {void}
4235
4308
  */
4236
4309
  onToken(token, extra) {
@@ -4264,6 +4337,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4264
4337
  * @fileoverview A collection of methods for processing Espree's options.
4265
4338
  * @author Kai Cataldo
4266
4339
  */
4340
+ /**
4341
+ * @import { EcmaVersion, Options } from "../espree.js";
4342
+ */
4267
4343
  let SUPPORTED_VERSIONS = [
4268
4344
  3,
4269
4345
  5,
@@ -4279,26 +4355,26 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4279
4355
  15,
4280
4356
  16,
4281
4357
  17
4282
- ];
4358
+ ], LATEST_ECMA_VERSION = SUPPORTED_VERSIONS.at(-1);
4283
4359
  /**
4284
4360
  * Get the latest ECMAScript version supported by Espree.
4285
- * @returns {number} The latest ECMAScript version.
4361
+ * @returns {typeof LATEST_ECMA_VERSION} The latest ECMAScript version.
4286
4362
  */
4287
4363
  function getLatestEcmaVersion() {
4288
- return SUPPORTED_VERSIONS.at(-1);
4364
+ return LATEST_ECMA_VERSION;
4289
4365
  }
4290
4366
  /**
4291
4367
  * Get the list of ECMAScript versions supported by Espree.
4292
- * @returns {number[]} An array containing the supported ECMAScript versions.
4368
+ * @returns {[...typeof SUPPORTED_VERSIONS]} An array containing the supported ECMAScript versions.
4293
4369
  */
4294
4370
  function getSupportedEcmaVersions() {
4295
4371
  return [...SUPPORTED_VERSIONS];
4296
4372
  }
4297
4373
  /**
4298
4374
  * Normalize ECMAScript version from the initial config
4299
- * @param {(number|"latest")} ecmaVersion ECMAScript version from the initial config
4375
+ * @param {EcmaVersion} ecmaVersion ECMAScript version from the initial config
4300
4376
  * @throws {Error} throws an error if the ecmaVersion is invalid.
4301
- * @returns {number} normalized ECMAScript version
4377
+ * @returns {NormalizedEcmaVersion} normalized ECMAScript version
4302
4378
  */
4303
4379
  function normalizeEcmaVersion(ecmaVersion = 5) {
4304
4380
  let version = ecmaVersion === "latest" ? getLatestEcmaVersion() : ecmaVersion;
@@ -4310,18 +4386,36 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4310
4386
  * Normalize sourceType from the initial config
4311
4387
  * @param {string} sourceType to normalize
4312
4388
  * @throws {Error} throw an error if sourceType is invalid
4313
- * @returns {string} normalized sourceType
4389
+ * @returns {"script"|"module"|"commonjs"} normalized sourceType
4314
4390
  */
4315
4391
  function normalizeSourceType(sourceType = "script") {
4316
- if (sourceType === "script" || sourceType === "module") return sourceType;
4317
- if (sourceType === "commonjs") return "script";
4392
+ if (sourceType === "script" || sourceType === "module" || sourceType === "commonjs") return sourceType;
4318
4393
  throw Error("Invalid sourceType.");
4319
4394
  }
4320
4395
  /**
4396
+ * @typedef {{
4397
+ * ecmaVersion: NormalizedEcmaVersion,
4398
+ * sourceType: "script"|"module"|"commonjs",
4399
+ * range?: boolean,
4400
+ * loc?: boolean,
4401
+ * allowReserved: boolean | "never",
4402
+ * ecmaFeatures?: {
4403
+ * jsx?: boolean,
4404
+ * globalReturn?: boolean,
4405
+ * impliedStrict?: boolean
4406
+ * },
4407
+ * ranges: boolean,
4408
+ * locations: boolean,
4409
+ * allowReturnOutsideFunction: boolean,
4410
+ * tokens?: boolean,
4411
+ * comment?: boolean
4412
+ * }} NormalizedParserOptions
4413
+ */
4414
+ /**
4321
4415
  * Normalize parserOptions
4322
- * @param {Object} options the parser options to normalize
4416
+ * @param {Options} options the parser options to normalize
4323
4417
  * @throws {Error} throw an error if found invalid option.
4324
- * @returns {Object} normalized options
4418
+ * @returns {NormalizedParserOptions} normalized options
4325
4419
  */
4326
4420
  function normalizeOptions(options) {
4327
4421
  let ecmaVersion = normalizeEcmaVersion(options.ecmaVersion), sourceType = normalizeSourceType(options.sourceType), ranges = options.range === !0, locations = options.loc === !0;
@@ -4338,22 +4432,85 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4338
4432
  allowReturnOutsideFunction
4339
4433
  });
4340
4434
  }
4435
+ /**
4436
+ * @import {
4437
+ * CommentType,
4438
+ * EspreeParserCtor,
4439
+ * EsprimaNode,
4440
+ * AcornJsxParserCtorEnhanced,
4441
+ * TokTypes
4442
+ * } from "./types.js";
4443
+ * @import {
4444
+ * Options,
4445
+ * EspreeToken as EsprimaToken,
4446
+ * EspreeTokens as EsprimaTokens,
4447
+ * EspreeComment as EsprimaComment
4448
+ * } from "../espree.js";
4449
+ * @import { NormalizedEcmaVersion } from "./options.js";
4450
+ * @import * as acorn from "acorn";
4451
+ */
4452
+ /**
4453
+ * @typedef {{
4454
+ * originalSourceType: "script" | "module" | "commonjs" | undefined
4455
+ * tokens: EsprimaToken[] | null,
4456
+ * comments: EsprimaComment[] | null,
4457
+ * impliedStrict: boolean,
4458
+ * ecmaVersion: NormalizedEcmaVersion,
4459
+ * jsxAttrValueToken: boolean,
4460
+ * lastToken: acorn.Token | null,
4461
+ * templateElements: acorn.TemplateElement[]
4462
+ * }} State
4463
+ */
4464
+ /**
4465
+ * @typedef {{
4466
+ * sourceType?: "script"|"module"|"commonjs";
4467
+ * comments?: EsprimaComment[];
4468
+ * tokens?: EsprimaToken[];
4469
+ * body: acorn.Node[];
4470
+ * } & acorn.Program} EsprimaProgramNode
4471
+ */
4472
+ /**
4473
+ * @typedef {{
4474
+ * index?: number;
4475
+ * lineNumber?: number;
4476
+ * column?: number;
4477
+ * } & SyntaxError} EnhancedSyntaxError
4478
+ */
4479
+ /**
4480
+ * @typedef {{
4481
+ * jsxAttrValueToken?: acorn.TokenType;
4482
+ * } & TokTypes} EnhancedTokTypes
4483
+ */
4341
4484
  let STATE = Symbol("espree's internal state"), ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode");
4342
4485
  /**
4343
4486
  * Converts an Acorn comment to a Esprima comment.
4344
4487
  * @param {boolean} block True if it's a block comment, false if not.
4345
4488
  * @param {string} text The text of the comment.
4346
- * @param {int} start The index at which the comment starts.
4347
- * @param {int} end The index at which the comment ends.
4348
- * @param {Location} startLoc The location at which the comment starts.
4349
- * @param {Location} endLoc The location at which the comment ends.
4489
+ * @param {number} start The index at which the comment starts.
4490
+ * @param {number} end The index at which the comment ends.
4491
+ * @param {acorn.Position | undefined} startLoc The location at which the comment starts.
4492
+ * @param {acorn.Position | undefined} endLoc The location at which the comment ends.
4350
4493
  * @param {string} code The source code being parsed.
4351
- * @returns {Object} The comment object.
4494
+ * @returns {EsprimaComment} The comment object.
4352
4495
  * @private
4353
4496
  */
4354
4497
  function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code) {
4498
+ /** @type {CommentType} */
4355
4499
  let type;
4356
4500
  type = block ? "Block" : code.slice(start, start + 2) === "#!" ? "Hashbang" : "Line";
4501
+ /**
4502
+ * @type {{
4503
+ * type: CommentType,
4504
+ * value: string,
4505
+ * start?: number,
4506
+ * end?: number,
4507
+ * range?: [number, number],
4508
+ * loc?: {
4509
+ * start: acorn.Position | undefined,
4510
+ * end: acorn.Position | undefined
4511
+ * }
4512
+ * }}
4513
+ */
4357
4514
  let comment = {
4358
4515
  type,
4359
4516
  value: text
@@ -4366,6 +4523,10 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4366
4523
  var espree = () => (Parser) => {
4367
4524
  let tokTypes = Object.assign({}, Parser.acorn.tokTypes);
4368
4525
  return Parser.acornJsx && Object.assign(tokTypes, Parser.acornJsx.tokTypes), class Espree extends Parser {
4526
+ /**
4527
+ * @param {Options | null | undefined} opts The parser options
4528
+ * @param {string | object} code The code which will be converted to a string.
4529
+ */
4369
4530
  constructor(opts, code) {
4370
4531
  (typeof opts != "object" || !opts) && (opts = {}), typeof code != "string" && !(code instanceof String) && (code = String(code));
4371
4532
  let originalSourceType = opts.sourceType, options = normalizeOptions(opts), ecmaFeatures = options.ecmaFeatures || {}, tokenTranslator = options.tokens === !0 ? new TokenTranslator(tokTypes, code) : null, state = {
@@ -4396,6 +4557,10 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4396
4557
  }
4397
4558
  }, code), this[STATE] = state;
4398
4559
  }
4560
+ /**
4561
+ * Returns Espree tokens.
4562
+ * @returns {EsprimaTokens} The Esprima-compatible tokens
4563
+ */
4399
4564
  tokenize() {
4400
4565
  do
4401
4566
  this.next();
@@ -4404,33 +4569,52 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4404
4569
  let extra = this[STATE], tokens = extra.tokens;
4405
4570
  return extra.comments && (tokens.comments = extra.comments), tokens;
4406
4571
  }
4407
- finishNode(...args) {
4408
- let result = super.finishNode(...args);
4572
+ /**
4573
+ * Calls parent.
4574
+ * @param {acorn.Node} node The node
4575
+ * @param {string} type The type
4576
+ * @returns {acorn.Node} The altered Node
4577
+ */
4578
+ finishNode(node, type) {
4579
+ let result = super.finishNode(node, type);
4409
4580
  return this[ESPRIMA_FINISH_NODE](result);
4410
4581
  }
4411
- finishNodeAt(...args) {
4412
- let result = super.finishNodeAt(...args);
4582
+ /**
4583
+ * Calls parent.
4584
+ * @param {acorn.Node} node The node
4585
+ * @param {string} type The type
4586
+ * @param {number} pos The position
4587
+ * @param {acorn.Position} loc The location
4588
+ * @returns {acorn.Node} The altered Node
4589
+ */
4590
+ finishNodeAt(node, type, pos, loc) {
4591
+ let result = super.finishNodeAt(node, type, pos, loc);
4413
4592
  return this[ESPRIMA_FINISH_NODE](result);
4414
4593
  }
4594
+ /**
4595
+ * Parses.
4596
+ * @returns {EsprimaProgramNode} The program Node
4597
+ */
4415
4598
  parse() {
4416
4599
  let extra = this[STATE], program = super.parse();
4417
- if (program.sourceType = extra.originalSourceType, extra.comments && (program.comments = extra.comments), extra.tokens && (program.tokens = extra.tokens), program.body.length) {
4418
- let [firstNode] = program.body;
4419
- program.range && (program.range[0] = firstNode.range[0]), program.loc && (program.loc.start = firstNode.loc.start), program.start = firstNode.start;
4420
- }
4421
- return extra.lastToken && (program.range && (program.range[1] = extra.lastToken.range[1]), program.loc && (program.loc.end = extra.lastToken.loc.end), program.end = extra.lastToken.end), this[STATE].templateElements.forEach((templateElement) => {
4600
+ return program.sourceType = extra.originalSourceType, extra.comments && (program.comments = extra.comments), extra.tokens && (program.tokens = extra.tokens), this[STATE].templateElements.forEach((templateElement) => {
4422
4601
  let endOffset = templateElement.tail ? 1 : 2;
4423
4602
  templateElement.start += -1, templateElement.end += endOffset, templateElement.range && (templateElement.range[0] += -1, templateElement.range[1] += endOffset), templateElement.loc && (templateElement.loc.start.column += -1, templateElement.loc.end.column += endOffset);
4424
4603
  }), program;
4425
4604
  }
4605
+ /**
4606
+ * Parses top level.
4607
+ * @param {acorn.Node} node AST Node
4608
+ * @returns {acorn.Node} The changed node
4609
+ */
4426
4610
  parseTopLevel(node) {
4427
4611
  return this[STATE].impliedStrict && (this.strict = !0), super.parseTopLevel(node);
4428
4612
  }
4429
4613
  /**
4430
4614
  * Overwrites the default raise method to throw Esprima-style errors.
4431
- * @param {int} pos The position of the error.
4615
+ * @param {number} pos The position of the error.
4432
4616
  * @param {string} message The error message.
4433
- * @throws {SyntaxError} A syntax error.
4617
+ * @throws {EnhancedSyntaxError} A syntax error.
4434
4618
  * @returns {void}
4435
4619
  */
4436
4620
  raise(pos, message) {
@@ -4439,7 +4623,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4439
4623
  }
4440
4624
  /**
4441
4625
  * Overwrites the default raise method to throw Esprima-style errors.
4442
- * @param {int} pos The position of the error.
4626
+ * @param {number} pos The position of the error.
4443
4627
  * @param {string} message The error message.
4444
4628
  * @throws {SyntaxError} A syntax error.
4445
4629
  * @returns {void}
@@ -4449,7 +4633,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4449
4633
  }
4450
4634
  /**
4451
4635
  * Overwrites the default unexpected method to throw Esprima-style errors.
4452
- * @param {int} pos The position of the error.
4636
+ * @param {number} pos The position of the error.
4453
4637
  * @throws {SyntaxError} A syntax error.
4454
4638
  * @returns {void}
4455
4639
  */
@@ -4461,29 +4645,178 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4461
4645
  }
4462
4646
  this.end > this.start && (message += ` ${this.input.slice(this.start, this.end)}`), this.raise(this.start, message);
4463
4647
  }
4464
- jsx_readString(quote) {
4648
+ /**
4649
+ * Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX
4650
+ * uses regular tt.string without any distinction between this and regular JS
4651
+ * strings. As such, we intercept an attempt to read a JSX string and set a flag
4652
+ * on extra so that when tokens are converted, the next token will be switched
4653
+ * to JSXText via onToken.
4654
+ * @param {number} quote A character code
4655
+ * @returns {void}
4656
+ */ jsx_readString(quote) {
4465
4657
  let result = super.jsx_readString(quote);
4466
4658
  return this.type === tokTypes.string && (this[STATE].jsxAttrValueToken = !0), result;
4467
4659
  }
4468
4660
  /**
4469
4661
  * Performs last-minute Esprima-specific compatibility checks and fixes.
4470
- * @param {ASTNode} result The node to check.
4471
- * @returns {ASTNode} The finished node.
4662
+ * @param {acorn.Node} result The node to check.
4663
+ * @returns {EsprimaNode} The finished node.
4472
4664
  */
4473
4665
  [ESPRIMA_FINISH_NODE](result) {
4474
- return result.type === "TemplateElement" && this[STATE].templateElements.push(result), result.type.includes("Function") && !result.generator && (result.generator = !1), result;
4666
+ return result.type === "TemplateElement" && this[STATE].templateElements.push(result), result.type.includes("Function") && !("generator" in result) && (result.generator = !1), result;
4475
4667
  }
4476
4668
  };
4477
4669
  };
4670
+ /**
4671
+ * @fileoverview Main Espree file that converts Acorn into Esprima output.
4672
+ *
4673
+ * This file contains code from the following MIT-licensed projects:
4674
+ * 1. Acorn
4675
+ * 2. Babylon
4676
+ * 3. Babel-ESLint
4677
+ *
4678
+ * This file also contains code from Esprima, which is BSD licensed.
4679
+ *
4680
+ * Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)
4681
+ * Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)
4682
+ * Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie <sebmck@gmail.com>
4683
+ *
4684
+ * Redistribution and use in source and binary forms, with or without
4685
+ * modification, are permitted provided that the following conditions are met:
4686
+ *
4687
+ * * Redistributions of source code must retain the above copyright
4688
+ * notice, this list of conditions and the following disclaimer.
4689
+ * * Redistributions in binary form must reproduce the above copyright
4690
+ * notice, this list of conditions and the following disclaimer in the
4691
+ * documentation and/or other materials provided with the distribution.
4692
+ *
4693
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4694
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4695
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4696
+ * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
4697
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4698
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4699
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4700
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4701
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4702
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4703
+ *
4704
+ * Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
4705
+ *
4706
+ * Redistribution and use in source and binary forms, with or without
4707
+ * modification, are permitted provided that the following conditions are met:
4708
+ *
4709
+ * * Redistributions of source code must retain the above copyright
4710
+ * notice, this list of conditions and the following disclaimer.
4711
+ * * Redistributions in binary form must reproduce the above copyright
4712
+ * notice, this list of conditions and the following disclaimer in the
4713
+ * documentation and/or other materials provided with the distribution.
4714
+ *
4715
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4716
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4717
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4718
+ * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
4719
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
4720
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4721
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
4722
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4723
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4724
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4725
+ */
4726
+ /**
4727
+ * @import { EspreeParserCtor, EspreeParserJsxCtor } from "./lib/types.js";
4728
+ */
4729
+ /**
4730
+ * @typedef {3|5|6|7|8|9|10|11|12|13|14|15|16|17|2015|2016|2017|2018|2019|2020|2021|2022|2023|2024|2025|2026|'latest'} EcmaVersion
4731
+ */
4732
+ /**
4733
+ * @typedef {{
4734
+ * type: string;
4735
+ * value: any;
4736
+ * start?: number;
4737
+ * end?: number;
4738
+ * loc?: acorn.SourceLocation;
4739
+ * range?: [number, number];
4740
+ * regex?: {flags: string, pattern: string};
4741
+ * }} EspreeToken
4742
+ */
4743
+ /**
4744
+ * @typedef {{
4745
+ * type: "Block" | "Hashbang" | "Line",
4746
+ * value: string,
4747
+ * range?: [number, number],
4748
+ * start?: number,
4749
+ * end?: number,
4750
+ * loc?: {
4751
+ * start: acorn.Position | undefined,
4752
+ * end: acorn.Position | undefined
4753
+ * }
4754
+ * }} EspreeComment
4755
+ */
4756
+ /**
4757
+ * @typedef {{
4758
+ * comments?: EspreeComment[]
4759
+ * } & EspreeToken[]} EspreeTokens
4760
+ */
4761
+ /**
4762
+ * `allowReserved` is as in `acorn.Options`
4763
+ *
4764
+ * `ecmaVersion` currently as in `acorn.Options` though optional
4765
+ *
4766
+ * `sourceType` as in `acorn.Options` but also allows `commonjs`
4767
+ *
4768
+ * `ecmaFeatures`, `range`, `loc`, `tokens` are not in `acorn.Options`
4769
+ *
4770
+ * `comment` is not in `acorn.Options` and doesn't err without it, but is used
4771
+ */
4772
+ /**
4773
+ * @typedef {{
4774
+ * allowReserved?: boolean,
4775
+ * ecmaVersion?: EcmaVersion,
4776
+ * sourceType?: "script"|"module"|"commonjs",
4777
+ * ecmaFeatures?: {
4778
+ * jsx?: boolean,
4779
+ * globalReturn?: boolean,
4780
+ * impliedStrict?: boolean
4781
+ * },
4782
+ * range?: boolean,
4783
+ * loc?: boolean,
4784
+ * tokens?: boolean,
4785
+ * comment?: boolean,
4786
+ * }} Options
4787
+ */
4478
4788
  let parsers = {
4789
+ /** @type {EspreeParserCtor|null} */
4479
4790
  _regular: null,
4791
+ /** @type {EspreeParserJsxCtor|null} */
4480
4792
  _jsx: null,
4793
+ /**
4794
+ * Returns regular Parser
4795
+ * @returns {EspreeParserCtor} Regular Acorn parser
4796
+ */
4481
4797
  get regular() {
4482
- return this._regular === null && (this._regular = acorn__namespace.Parser.extend(espree())), this._regular;
4798
+ if (this._regular === null) {
4799
+ let espreeParserFactory = espree();
4800
+ this._regular = acorn__namespace.Parser.extend(espreeParserFactory);
4801
+ }
4802
+ return this._regular;
4483
4803
  },
4804
+ /**
4805
+ * Returns JSX Parser
4806
+ * @returns {EspreeParserJsxCtor} JSX Acorn parser
4807
+ */
4484
4808
  get jsx() {
4485
- return this._jsx === null && (this._jsx = acorn__namespace.Parser.extend(jsx__default.default(), espree())), this._jsx;
4809
+ if (this._jsx === null) {
4810
+ let espreeParserFactory = espree(), jsxFactory = jsx();
4811
+ this._jsx = acorn__namespace.Parser.extend(jsxFactory, espreeParserFactory);
4812
+ }
4813
+ return this._jsx;
4486
4814
  },
4815
+ /**
4816
+ * Gets the parser object based on the supplied options.
4817
+ * @param {Options} [options] The parser options.
4818
+ * @returns {EspreeParserJsxCtor|EspreeParserCtor} Regular or JSX Acorn parser
4819
+ */
4487
4820
  get(options) {
4488
4821
  return options && options.ecmaFeatures && options.ecmaFeatures.jsx ? this.jsx : this.regular;
4489
4822
  }
@@ -4491,9 +4824,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4491
4824
  /**
4492
4825
  * Tokenizes the given code.
4493
4826
  * @param {string} code The code to tokenize.
4494
- * @param {Object} options Options defining how to tokenize.
4495
- * @returns {Token[]} An array of tokens.
4496
- * @throws {SyntaxError} If the input code is invalid.
4827
+ * @param {Options} [options] Options defining how to tokenize.
4828
+ * @returns {EspreeTokens} An array of tokens.
4829
+ * @throws {EnhancedSyntaxError} If the input code is invalid.
4497
4830
  * @private
4498
4831
  */
4499
4832
  function tokenize(code, options) {
@@ -4503,21 +4836,25 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4503
4836
  /**
4504
4837
  * Parses the given code.
4505
4838
  * @param {string} code The code to tokenize.
4506
- * @param {Object} options Options defining how to tokenize.
4507
- * @returns {ASTNode} The "Program" AST node.
4508
- * @throws {SyntaxError} If the input code is invalid.
4839
+ * @param {Options} [options] Options defining how to tokenize.
4840
+ * @returns {acorn.Program} The "Program" AST node.
4841
+ * @throws {EnhancedSyntaxError} If the input code is invalid.
4509
4842
  */
4510
4843
  function parse(code, options) {
4511
4844
  return new (parsers.get(options))(options, code).parse();
4512
4845
  }
4513
- let VisitorKeys = function() {
4514
- return visitorKeys__namespace.KEYS;
4515
- }(), Syntax = function() {
4846
+ /** @type {string} */
4847
+ let Syntax = /* @__PURE__ */ (function() {
4516
4848
  let key, types = {};
4517
- for (key in typeof Object.create == "function" && (types = Object.create(null)), VisitorKeys) Object.hasOwn(VisitorKeys, key) && (types[key] = key);
4849
+ for (key in typeof Object.create == "function" && (types = Object.create(null)), eslintVisitorKeys.KEYS) Object.hasOwn(eslintVisitorKeys.KEYS, key) && (types[key] = key);
4518
4850
  return typeof Object.freeze == "function" && Object.freeze(types), types;
4519
- }(), latestEcmaVersion = getLatestEcmaVersion(), supportedEcmaVersions = getSupportedEcmaVersions();
4520
- exports.Syntax = Syntax, exports.VisitorKeys = VisitorKeys, exports.latestEcmaVersion = latestEcmaVersion, exports.name = "espree", exports.parse = parse, exports.supportedEcmaVersions = supportedEcmaVersions, exports.tokenize = tokenize, exports.version = "10.4.0";
4851
+ })(), latestEcmaVersion = /* @__PURE__ */ getLatestEcmaVersion(), supportedEcmaVersions = /* @__PURE__ */ getSupportedEcmaVersions();
4852
+ Object.defineProperty(exports, "VisitorKeys", {
4853
+ enumerable: !0,
4854
+ get: function() {
4855
+ return eslintVisitorKeys.KEYS;
4856
+ }
4857
+ }), exports.Syntax = Syntax, exports.latestEcmaVersion = latestEcmaVersion, exports.name = "espree", exports.parse = parse, exports.supportedEcmaVersions = supportedEcmaVersions, exports.tokenize = tokenize, exports.version = "11.2.0";
4521
4858
  })), require_escape_string_regexp = /* @__PURE__ */ require_chunk.t(((exports, module) => {
4522
4859
  module.exports = (string) => {
4523
4860
  if (typeof string != "string") throw TypeError("Expected a string");
@@ -4647,7 +4984,8 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4647
4984
  ...es2025,
4648
4985
  AsyncDisposableStack: !1,
4649
4986
  DisposableStack: !1,
4650
- SuppressedError: !1
4987
+ SuppressedError: !1,
4988
+ Temporal: !1
4651
4989
  }
4652
4990
  };
4653
4991
  })), require_ecma_version = /* @__PURE__ */ require_chunk.t(((exports, module) => {
@@ -4943,6 +5281,14 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4943
5281
  return isSpecificMemberAccess(node, arrayOrTypedArrayPattern, "from");
4944
5282
  }
4945
5283
  /**
5284
+ * Checks whether or not a node is `Array.fromAsync`.
5285
+ * @param {ASTNode} node A node to check.
5286
+ * @returns {boolean} Whether or not the node is a `Array.fromAsync`.
5287
+ */
5288
+ function isArrayFromAsyncMethod(node) {
5289
+ return isSpecificMemberAccess(node, "Array", "fromAsync");
5290
+ }
5291
+ /**
4946
5292
  * Checks whether or not a node is a method which expects a function as a first argument, and `thisArg` as a second argument.
4947
5293
  * @param {ASTNode} node A node to check.
4948
5294
  * @returns {boolean} Whether or not the node is a method which expects a function as a first argument, and `thisArg` as a second argument.
@@ -4959,16 +5305,6 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
4959
5305
  return (token) => !f(token);
4960
5306
  }
4961
5307
  /**
4962
- * Checks whether or not a node has a `@this` tag in its comments.
4963
- * @param {ASTNode} node A node to check.
4964
- * @param {SourceCode} sourceCode A SourceCode instance to get comments.
4965
- * @returns {boolean} Whether or not the node has a `@this` tag in its comments.
4966
- */
4967
- function hasJSDocThisTag(node, sourceCode) {
4968
- let jsdocComment = sourceCode.getJSDocComment(node);
4969
- return jsdocComment && thisTagPattern.test(jsdocComment.value) ? !0 : sourceCode.getCommentsBefore(node).some((comment) => thisTagPattern.test(comment.value));
4970
- }
4971
- /**
4972
5308
  * Determines if a node is surrounded by parentheses.
4973
5309
  * @param {SourceCode} sourceCode The ESLint source code object
4974
5310
  * @param {ASTNode} node The node to be checked.
@@ -5100,6 +5436,59 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
5100
5436
  return token.type === "Keyword";
5101
5437
  }
5102
5438
  /**
5439
+ * Checks whether the given node represents an ES6 export declaration.
5440
+ * @param {ASTNode} node A node to check.
5441
+ * @returns {boolean} `true` if the node is an export declaration.
5442
+ * @private
5443
+ */
5444
+ function isExportDeclaration(node) {
5445
+ return node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExportAllDeclaration";
5446
+ }
5447
+ /**
5448
+ * Checks for the presence of a JSDoc comment for the given node and returns it.
5449
+ * @param {ASTNode} node The node to get the comment for.
5450
+ * @param {SourceCode} sourceCode A SourceCode instance to get comments.
5451
+ * @returns {Token|null} The Block comment token containing the JSDoc comment for the given node or null if not found.
5452
+ * @private
5453
+ */
5454
+ function findJSDocComment(node, sourceCode) {
5455
+ let tokenBefore = sourceCode.getTokenBefore(node, { includeComments: !0 });
5456
+ return tokenBefore && tokenBefore.type === "Block" && tokenBefore.value.charAt(0) === "*" && node.loc.start.line - tokenBefore.loc.end.line <= 1 ? tokenBefore : null;
5457
+ }
5458
+ /**
5459
+ * Retrieves the JSDoc comment for a given node.
5460
+ * @param {ASTNode} node The node to get the comment for.
5461
+ * @param {SourceCode} sourceCode A SourceCode instance to get comments.
5462
+ * @returns {Token|null} The Block comment token containing the JSDoc comment for the given node or null if not found.
5463
+ * @private
5464
+ */
5465
+ function getJSDocComment(node, sourceCode) {
5466
+ let parent = node.parent;
5467
+ switch (node.type) {
5468
+ case "ClassDeclaration":
5469
+ case "FunctionDeclaration": return findJSDocComment(isExportDeclaration(parent) ? parent : node, sourceCode);
5470
+ case "ClassExpression": return findJSDocComment(parent.parent, sourceCode);
5471
+ case "ArrowFunctionExpression":
5472
+ case "FunctionExpression":
5473
+ if (parent.type !== "CallExpression" && parent.type !== "NewExpression") {
5474
+ for (; !sourceCode.getCommentsBefore(parent).length && !/Function/u.test(parent.type) && parent.type !== "MethodDefinition" && parent.type !== "Property" && (parent = parent.parent, parent););
5475
+ if (parent && parent.type !== "FunctionDeclaration" && parent.type !== "Program") return findJSDocComment(parent, sourceCode);
5476
+ }
5477
+ return findJSDocComment(node, sourceCode);
5478
+ default: return null;
5479
+ }
5480
+ }
5481
+ /**
5482
+ * Checks whether or not a node has a `@this` tag in its comments.
5483
+ * @param {ASTNode} node A node to check.
5484
+ * @param {SourceCode} sourceCode A SourceCode instance to get comments.
5485
+ * @returns {boolean} Whether or not the node has a `@this` tag in its comments.
5486
+ */
5487
+ function hasJSDocThisTag(node, sourceCode) {
5488
+ let jsdocComment = getJSDocComment(node, sourceCode);
5489
+ return jsdocComment && thisTagPattern.test(jsdocComment.value) ? !0 : sourceCode.getCommentsBefore(node).some((comment) => thisTagPattern.test(comment.value));
5490
+ }
5491
+ /**
5103
5492
  * Gets the `(` token of the given function node.
5104
5493
  * @param {ASTNode} node The function node to get.
5105
5494
  * @param {SourceCode} sourceCode The source code object to get tokens.
@@ -5424,6 +5813,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
5424
5813
  isLoop,
5425
5814
  isInLoop,
5426
5815
  isArrayFromMethod,
5816
+ isArrayFromAsyncMethod,
5427
5817
  isParenthesised,
5428
5818
  createGlobalLinebreakMatcher,
5429
5819
  equalTokens,
@@ -5518,9 +5908,9 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
5518
5908
  getTrailingStatement: esutils.ast.trailingStatement,
5519
5909
  /**
5520
5910
  * Finds the variable by a given name in a given scope and its upper scopes.
5521
- * @param {eslint-scope.Scope} initScope A scope to start find.
5911
+ * @param {Scope} initScope A scope to start find.
5522
5912
  * @param {string} name A variable name to find.
5523
- * @returns {eslint-scope.Variable|null} A found variable or `null`.
5913
+ * @returns {Variable|null} A found variable or `null`.
5524
5914
  */
5525
5915
  getVariableByName(initScope, name) {
5526
5916
  let scope = initScope;
@@ -5540,7 +5930,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
5540
5930
  * - The given node is not `StaticBlock`.
5541
5931
  * - The function name does not start with uppercase. It's a convention to capitalize the names
5542
5932
  * of constructor functions. This check is not performed if `capIsConstructor` is set to `false`.
5543
- * - The function does not have a JSDoc comment that has a @this tag.
5933
+ * - The function does not have a JSDoc comment that has a `@this` tag.
5544
5934
  *
5545
5935
  * Next, this checks the location of the node.
5546
5936
  * If the location is below, this judges `this` is valid.
@@ -5592,7 +5982,7 @@ var require_eslint_visitor_keys = /* @__PURE__ */ require_chunk.t(((exports) =>
5592
5982
  return !(isCallee(maybeCalleeNode) && maybeCalleeNode.parent.arguments.length >= 1 && !isNullOrUndefined(maybeCalleeNode.parent.arguments[0]));
5593
5983
  }
5594
5984
  return !0;
5595
- case "CallExpression": return isReflectApply(parent.callee) ? parent.arguments.length !== 3 || parent.arguments[0] !== currentNode || isNullOrUndefined(parent.arguments[1]) : isArrayFromMethod(parent.callee) ? parent.arguments.length !== 3 || parent.arguments[1] !== currentNode || isNullOrUndefined(parent.arguments[2]) : isMethodWhichHasThisArg(parent.callee) ? parent.arguments.length !== 2 || parent.arguments[0] !== currentNode || isNullOrUndefined(parent.arguments[1]) : !0;
5985
+ case "CallExpression": return isReflectApply(parent.callee) ? parent.arguments.length !== 3 || parent.arguments[0] !== currentNode || isNullOrUndefined(parent.arguments[1]) : isArrayFromMethod(parent.callee) || isArrayFromAsyncMethod(parent.callee) ? parent.arguments.length !== 3 || parent.arguments[1] !== currentNode || isNullOrUndefined(parent.arguments[2]) : isMethodWhichHasThisArg(parent.callee) ? parent.arguments.length !== 2 || parent.arguments[0] !== currentNode || isNullOrUndefined(parent.arguments[1]) : !0;
5596
5986
  default: return !0;
5597
5987
  }
5598
5988
  }