@askviraj/linter 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (650) hide show
  1. package/node_modules/{synckit → @astrojs/compiler-binding}/LICENSE +1 -1
  2. package/node_modules/@astrojs/compiler-binding/browser.js +1 -0
  3. package/node_modules/@astrojs/compiler-binding/index.d.ts +337 -0
  4. package/node_modules/@astrojs/compiler-binding/index.js +599 -0
  5. package/node_modules/@astrojs/compiler-binding/package.json +83 -0
  6. package/node_modules/@astrojs/compiler-binding/webcontainer-fallback.cjs +23 -0
  7. package/node_modules/@astrojs/compiler-binding-linux-x64-gnu/README.md +3 -0
  8. package/node_modules/@astrojs/compiler-binding-linux-x64-gnu/astro.linux-x64-gnu.node +0 -0
  9. package/node_modules/@astrojs/compiler-binding-linux-x64-gnu/package.json +40 -0
  10. package/node_modules/{parse5 → @astrojs/compiler-rs}/LICENSE +7 -5
  11. package/node_modules/@astrojs/compiler-rs/README.md +62 -0
  12. package/node_modules/@astrojs/compiler-rs/async.d.ts +1 -0
  13. package/node_modules/@astrojs/compiler-rs/dist/async.d.mts +9 -0
  14. package/node_modules/@astrojs/compiler-rs/dist/async.mjs +1 -0
  15. package/node_modules/@astrojs/compiler-rs/dist/index.d.mts +9 -0
  16. package/node_modules/@astrojs/compiler-rs/dist/index.mjs +1 -0
  17. package/node_modules/@astrojs/compiler-rs/dist/shared.d.mts +45 -0
  18. package/node_modules/@astrojs/compiler-rs/dist/shared.mjs +1 -0
  19. package/node_modules/@astrojs/compiler-rs/dist/types.d.mts +94 -0
  20. package/node_modules/@astrojs/compiler-rs/dist/types.mjs +1 -0
  21. package/node_modules/@astrojs/compiler-rs/dist/utils.d.mts +4 -0
  22. package/node_modules/@astrojs/compiler-rs/dist/utils.mjs +1 -0
  23. package/node_modules/@astrojs/compiler-rs/package.json +55 -0
  24. package/node_modules/@astrojs/compiler-rs/types.d.ts +1 -0
  25. package/node_modules/@eslint/config-helpers/README.md +2 -2
  26. package/node_modules/@eslint/config-helpers/dist/cjs/index.cjs +27 -26
  27. package/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts +13 -12
  28. package/node_modules/@eslint/config-helpers/dist/cjs/types.cts +4 -2
  29. package/node_modules/@eslint/config-helpers/dist/esm/index.d.ts +13 -12
  30. package/node_modules/@eslint/config-helpers/dist/esm/index.js +27 -26
  31. package/node_modules/@eslint/config-helpers/dist/esm/types.d.ts +2 -0
  32. package/node_modules/@eslint/config-helpers/dist/esm/types.ts +4 -2
  33. package/node_modules/@eslint/config-helpers/package.json +1 -1
  34. package/node_modules/@eslint/css/README.md +2 -2
  35. package/node_modules/@eslint/css/dist/build/rules.d.ts +75 -21
  36. package/node_modules/@eslint/css/dist/build/rules.js +15 -15
  37. package/node_modules/@eslint/css/dist/data/baseline-data.js +256 -32
  38. package/node_modules/@eslint/css/dist/index.js +1 -1
  39. package/node_modules/@eslint/css/dist/rules/font-family-fallbacks.d.ts +15 -15
  40. package/node_modules/@eslint/css/dist/rules/font-family-fallbacks.js +2 -5
  41. package/node_modules/@eslint/css/dist/rules/no-duplicate-imports.d.ts +18 -18
  42. package/node_modules/@eslint/css/dist/rules/no-duplicate-imports.js +9 -12
  43. package/node_modules/@eslint/css/dist/rules/no-duplicate-keyframe-selectors.d.ts +14 -14
  44. package/node_modules/@eslint/css/dist/rules/no-duplicate-keyframe-selectors.js +2 -3
  45. package/node_modules/@eslint/css/dist/rules/no-empty-blocks.d.ts +14 -14
  46. package/node_modules/@eslint/css/dist/rules/no-empty-blocks.js +2 -3
  47. package/node_modules/@eslint/css/dist/rules/no-important.d.ts +16 -16
  48. package/node_modules/@eslint/css/dist/rules/no-important.js +2 -3
  49. package/node_modules/@eslint/css/dist/rules/no-invalid-at-rule-placement.d.ts +16 -16
  50. package/node_modules/@eslint/css/dist/rules/no-invalid-at-rule-placement.js +2 -3
  51. package/node_modules/@eslint/css/dist/rules/no-invalid-at-rules.d.ts +21 -21
  52. package/node_modules/@eslint/css/dist/rules/no-invalid-at-rules.js +2 -3
  53. package/node_modules/@eslint/css/dist/rules/no-invalid-named-grid-areas.d.ts +16 -16
  54. package/node_modules/@eslint/css/dist/rules/no-invalid-named-grid-areas.js +2 -3
  55. package/node_modules/@eslint/css/dist/rules/no-invalid-properties.d.ts +18 -18
  56. package/node_modules/@eslint/css/dist/rules/no-invalid-properties.js +2 -3
  57. package/node_modules/@eslint/css/dist/rules/no-unmatchable-selectors.d.ts +14 -14
  58. package/node_modules/@eslint/css/dist/rules/no-unmatchable-selectors.js +2 -3
  59. package/node_modules/@eslint/css/dist/rules/prefer-logical-properties.d.ts +22 -19
  60. package/node_modules/@eslint/css/dist/rules/prefer-logical-properties.js +66 -23
  61. package/node_modules/@eslint/css/dist/rules/relative-font-units.d.ts +16 -16
  62. package/node_modules/@eslint/css/dist/rules/relative-font-units.js +13 -7
  63. package/node_modules/@eslint/css/dist/rules/selector-complexity.d.ts +17 -17
  64. package/node_modules/@eslint/css/dist/rules/selector-complexity.js +2 -3
  65. package/node_modules/@eslint/css/dist/rules/use-baseline.d.ts +22 -22
  66. package/node_modules/@eslint/css/dist/rules/use-baseline.js +2 -3
  67. package/node_modules/@eslint/css/dist/rules/use-layers.d.ts +18 -18
  68. package/node_modules/@eslint/css/dist/rules/use-layers.js +3 -4
  69. package/node_modules/@eslint/css/package.json +7 -12
  70. package/node_modules/@eslint/css-tree/README.md +2 -2
  71. package/node_modules/@eslint/css-tree/dist/csstree.esm.js +1 -1
  72. package/node_modules/@eslint/css-tree/dist/csstree.js +1 -1
  73. package/node_modules/@eslint/css-tree/dist/data.cjs +4 -1
  74. package/node_modules/@eslint/css-tree/dist/data.js +4 -1
  75. package/node_modules/@eslint/css-tree/dist/version.cjs +1 -1
  76. package/node_modules/@eslint/css-tree/dist/version.js +1 -1
  77. package/node_modules/@eslint/css-tree/package.json +3 -3
  78. package/node_modules/@eslint/json/README.md +2 -2
  79. package/node_modules/@eslint/json/dist/index.js +1 -1
  80. package/node_modules/@eslint/json/package.json +4 -9
  81. package/node_modules/@eslint/markdown/README.md +3 -3
  82. package/node_modules/@eslint/markdown/dist/build/rules.d.ts +105 -27
  83. package/node_modules/@eslint/markdown/dist/build/rules.js +21 -21
  84. package/node_modules/@eslint/markdown/dist/index.d.ts +2 -2
  85. package/node_modules/@eslint/markdown/dist/index.js +4 -4
  86. package/node_modules/@eslint/markdown/dist/processor.d.ts +4 -9
  87. package/node_modules/@eslint/markdown/dist/processor.js +12 -15
  88. package/node_modules/@eslint/markdown/dist/rules/fenced-code-language.d.ts +17 -17
  89. package/node_modules/@eslint/markdown/dist/rules/fenced-code-language.js +2 -3
  90. package/node_modules/@eslint/markdown/dist/rules/fenced-code-meta.d.ts +17 -17
  91. package/node_modules/@eslint/markdown/dist/rules/fenced-code-meta.js +2 -3
  92. package/node_modules/@eslint/markdown/dist/rules/heading-increment.d.ts +16 -16
  93. package/node_modules/@eslint/markdown/dist/rules/heading-increment.js +2 -3
  94. package/node_modules/@eslint/markdown/dist/rules/no-bare-urls.d.ts +14 -14
  95. package/node_modules/@eslint/markdown/dist/rules/no-bare-urls.js +2 -3
  96. package/node_modules/@eslint/markdown/dist/rules/no-duplicate-definitions.d.ts +17 -17
  97. package/node_modules/@eslint/markdown/dist/rules/no-duplicate-definitions.js +2 -3
  98. package/node_modules/@eslint/markdown/dist/rules/no-duplicate-headings.d.ts +15 -15
  99. package/node_modules/@eslint/markdown/dist/rules/no-duplicate-headings.js +2 -3
  100. package/node_modules/@eslint/markdown/dist/rules/no-empty-definitions.d.ts +17 -17
  101. package/node_modules/@eslint/markdown/dist/rules/no-empty-definitions.js +2 -3
  102. package/node_modules/@eslint/markdown/dist/rules/no-empty-images.d.ts +14 -14
  103. package/node_modules/@eslint/markdown/dist/rules/no-empty-images.js +2 -3
  104. package/node_modules/@eslint/markdown/dist/rules/no-empty-links.d.ts +14 -14
  105. package/node_modules/@eslint/markdown/dist/rules/no-empty-links.js +2 -3
  106. package/node_modules/@eslint/markdown/dist/rules/no-html.d.ts +15 -15
  107. package/node_modules/@eslint/markdown/dist/rules/no-html.js +2 -3
  108. package/node_modules/@eslint/markdown/dist/rules/no-invalid-label-refs.d.ts +14 -14
  109. package/node_modules/@eslint/markdown/dist/rules/no-invalid-label-refs.js +2 -3
  110. package/node_modules/@eslint/markdown/dist/rules/no-missing-atx-heading-space.d.ts +17 -17
  111. package/node_modules/@eslint/markdown/dist/rules/no-missing-atx-heading-space.js +2 -3
  112. package/node_modules/@eslint/markdown/dist/rules/no-missing-label-refs.d.ts +16 -16
  113. package/node_modules/@eslint/markdown/dist/rules/no-missing-label-refs.js +2 -3
  114. package/node_modules/@eslint/markdown/dist/rules/no-missing-link-fragments.d.ts +16 -16
  115. package/node_modules/@eslint/markdown/dist/rules/no-missing-link-fragments.js +2 -3
  116. package/node_modules/@eslint/markdown/dist/rules/no-multiple-h1.d.ts +16 -16
  117. package/node_modules/@eslint/markdown/dist/rules/no-multiple-h1.js +2 -3
  118. package/node_modules/@eslint/markdown/dist/rules/no-reference-like-urls.d.ts +15 -15
  119. package/node_modules/@eslint/markdown/dist/rules/no-reference-like-urls.js +2 -3
  120. package/node_modules/@eslint/markdown/dist/rules/no-reversed-media-syntax.d.ts +15 -15
  121. package/node_modules/@eslint/markdown/dist/rules/no-reversed-media-syntax.js +2 -3
  122. package/node_modules/@eslint/markdown/dist/rules/no-space-in-emphasis.d.ts +17 -17
  123. package/node_modules/@eslint/markdown/dist/rules/no-space-in-emphasis.js +2 -3
  124. package/node_modules/@eslint/markdown/dist/rules/no-unused-definitions.d.ts +17 -17
  125. package/node_modules/@eslint/markdown/dist/rules/no-unused-definitions.js +2 -3
  126. package/node_modules/@eslint/markdown/dist/rules/require-alt-text.d.ts +14 -14
  127. package/node_modules/@eslint/markdown/dist/rules/require-alt-text.js +2 -3
  128. package/node_modules/@eslint/markdown/dist/rules/table-column-count.d.ts +17 -17
  129. package/node_modules/@eslint/markdown/dist/rules/table-column-count.js +2 -3
  130. package/node_modules/@eslint/markdown/package.json +5 -10
  131. package/node_modules/@eslint-community/eslint-utils/index.js +1 -1
  132. package/node_modules/@eslint-community/eslint-utils/index.js.map +1 -1
  133. package/node_modules/@eslint-community/eslint-utils/index.mjs +1 -1
  134. package/node_modules/@eslint-community/eslint-utils/index.mjs.map +1 -1
  135. package/node_modules/@eslint-community/eslint-utils/package.json +12 -7
  136. package/node_modules/@html-eslint/core/dist/index.js +1 -0
  137. package/node_modules/@html-eslint/core/dist/index.js.map +1 -1
  138. package/node_modules/@html-eslint/core/dist/index.mjs +1 -0
  139. package/node_modules/@html-eslint/core/dist/index.mjs.map +1 -1
  140. package/node_modules/@html-eslint/core/package.json +3 -3
  141. package/node_modules/@html-eslint/eslint-plugin/lib/rules/require-content.js +20 -1
  142. package/node_modules/@html-eslint/eslint-plugin/lib/rules/require-input-label.js +110 -8
  143. package/node_modules/@html-eslint/eslint-plugin/lib/rules/utils/node.js +13 -0
  144. package/node_modules/@html-eslint/eslint-plugin/package.json +7 -7
  145. package/node_modules/@html-eslint/eslint-plugin/types/rules/require-content.d.ts.map +1 -1
  146. package/node_modules/@html-eslint/eslint-plugin/types/rules/require-input-label.d.ts.map +1 -1
  147. package/node_modules/@html-eslint/eslint-plugin/types/rules/utils/node.d.ts +7 -0
  148. package/node_modules/@html-eslint/eslint-plugin/types/rules/utils/node.d.ts.map +1 -1
  149. package/node_modules/@html-eslint/parser/lib/parser.js +0 -1
  150. package/node_modules/@html-eslint/parser/package.json +4 -4
  151. package/node_modules/@html-eslint/parser/types/parser.d.ts.map +1 -1
  152. package/node_modules/@html-eslint/template-parser/package.json +3 -3
  153. package/node_modules/@html-eslint/template-syntax-parser/package.json +3 -3
  154. package/node_modules/@html-eslint/types/package.json +2 -2
  155. package/node_modules/@rviscomi/capo.js/README.md +4 -4
  156. package/node_modules/@rviscomi/capo.js/dist/adapters/adapter.cjs +7 -2
  157. package/node_modules/@rviscomi/capo.js/dist/adapters/browser.cjs +31 -3
  158. package/node_modules/@rviscomi/capo.js/dist/adapters/index.cjs +36 -4
  159. package/node_modules/@rviscomi/capo.js/dist/adapters/test-suite.cjs +6 -1
  160. package/node_modules/@rviscomi/capo.js/dist/analyzer.cjs +53 -24
  161. package/node_modules/@rviscomi/capo.js/dist/chrome/README.md +53 -0
  162. package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/capo.html +1 -1
  163. package/node_modules/@rviscomi/capo.js/dist/chrome/capo.js +3 -0
  164. package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/chrome.js +56 -18
  165. package/node_modules/@rviscomi/capo.js/dist/chrome/manifest.json +26 -0
  166. package/node_modules/@rviscomi/capo.js/dist/chrome/options/options.js +1 -0
  167. package/node_modules/@rviscomi/capo.js/dist/chrome.zip +0 -0
  168. package/node_modules/@rviscomi/capo.js/dist/firefox/README.md +53 -0
  169. package/node_modules/@rviscomi/capo.js/dist/firefox/background.js +7 -0
  170. package/node_modules/@rviscomi/capo.js/dist/firefox/capo.css +59 -0
  171. package/node_modules/@rviscomi/capo.js/dist/firefox/capo.html +12 -0
  172. package/node_modules/@rviscomi/capo.js/dist/firefox/capo.js +3 -0
  173. package/node_modules/@rviscomi/capo.js/dist/firefox/chrome.js +120 -0
  174. package/node_modules/@rviscomi/capo.js/dist/firefox/images/icon128.png +0 -0
  175. package/node_modules/@rviscomi/capo.js/dist/firefox/manifest.json +39 -0
  176. package/node_modules/@rviscomi/capo.js/dist/firefox/options/options.css +81 -0
  177. package/node_modules/@rviscomi/capo.js/dist/firefox/options/options.html +43 -0
  178. package/node_modules/@rviscomi/capo.js/dist/firefox/options/options.js +1 -0
  179. package/node_modules/@rviscomi/capo.js/dist/firefox/styles/open-props.css +291 -0
  180. package/node_modules/@rviscomi/capo.js/dist/firefox.zip +0 -0
  181. package/node_modules/@rviscomi/capo.js/dist/index.cjs +93 -33
  182. package/node_modules/@rviscomi/capo.js/dist/lib/colors.cjs +1 -0
  183. package/node_modules/@rviscomi/capo.js/dist/lib/io.cjs +137 -28
  184. package/node_modules/@rviscomi/capo.js/dist/lib/options.cjs +61 -0
  185. package/node_modules/@rviscomi/capo.js/dist/lib/rules.cjs +28 -13
  186. package/node_modules/@rviscomi/capo.js/dist/lib/validation.cjs +31 -16
  187. package/node_modules/@rviscomi/capo.js/dist/source.zip +0 -0
  188. package/node_modules/@rviscomi/capo.js/dist/types/adapters/adapter.d.ts +105 -0
  189. package/node_modules/@rviscomi/capo.js/dist/types/adapters/browser.d.ts +107 -0
  190. package/node_modules/@rviscomi/capo.js/dist/types/adapters/index.d.ts +7 -0
  191. package/node_modules/@rviscomi/capo.js/dist/types/adapters/test-suite.d.ts +52 -0
  192. package/node_modules/@rviscomi/capo.js/dist/types/analyzer.d.ts +195 -0
  193. package/node_modules/@rviscomi/capo.js/dist/types/index.d.ts +29 -0
  194. package/node_modules/@rviscomi/capo.js/dist/types/lib/colors.d.ts +20 -0
  195. package/node_modules/@rviscomi/capo.js/dist/types/lib/io.d.ts +166 -0
  196. package/node_modules/@rviscomi/capo.js/dist/types/lib/options.d.ts +114 -0
  197. package/node_modules/@rviscomi/capo.js/dist/types/lib/rules.d.ts +111 -0
  198. package/node_modules/@rviscomi/capo.js/dist/types/lib/validation.d.ts +61 -0
  199. package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/adapter.d.ts +105 -0
  200. package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/browser.d.ts +107 -0
  201. package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/index.d.ts +7 -0
  202. package/node_modules/@rviscomi/capo.js/dist/types/src/adapters/test-suite.d.ts +52 -0
  203. package/node_modules/@rviscomi/capo.js/dist/types/src/analyzer.d.ts +195 -0
  204. package/node_modules/@rviscomi/capo.js/dist/types/src/index.d.ts +13 -0
  205. package/node_modules/@rviscomi/capo.js/dist/types/src/lib/colors.d.ts +20 -0
  206. package/node_modules/@rviscomi/capo.js/dist/types/src/lib/io.d.ts +166 -0
  207. package/node_modules/@rviscomi/capo.js/dist/types/src/lib/options.d.ts +114 -0
  208. package/node_modules/@rviscomi/capo.js/dist/types/src/lib/rules.d.ts +111 -0
  209. package/node_modules/@rviscomi/capo.js/dist/types/src/lib/validation.d.ts +61 -0
  210. package/node_modules/@rviscomi/capo.js/package.json +34 -16
  211. package/node_modules/@rviscomi/capo.js/src/adapters/adapter.js +16 -5
  212. package/node_modules/@rviscomi/capo.js/src/adapters/browser.js +30 -4
  213. package/node_modules/@rviscomi/capo.js/src/adapters/test-suite.js +11 -10
  214. package/node_modules/@rviscomi/capo.js/src/analyzer.js +47 -25
  215. package/node_modules/@rviscomi/capo.js/src/extension/README.md +53 -0
  216. package/node_modules/@rviscomi/capo.js/src/extension/background.js +7 -0
  217. package/node_modules/@rviscomi/capo.js/src/extension/capo.css +59 -0
  218. package/node_modules/@rviscomi/capo.js/src/extension/capo.html +12 -0
  219. package/node_modules/@rviscomi/capo.js/src/extension/capo.js +93 -0
  220. package/node_modules/@rviscomi/capo.js/src/extension/chrome.js +120 -0
  221. package/node_modules/@rviscomi/capo.js/src/extension/images/icon128.png +0 -0
  222. package/node_modules/@rviscomi/capo.js/src/extension/images/icon256.png +0 -0
  223. package/node_modules/@rviscomi/capo.js/{crx → src/extension}/manifest.json +1 -1
  224. package/node_modules/@rviscomi/capo.js/src/extension/options/options.css +81 -0
  225. package/node_modules/@rviscomi/capo.js/src/extension/options/options.html +43 -0
  226. package/node_modules/@rviscomi/capo.js/src/extension/options.js +87 -0
  227. package/node_modules/@rviscomi/capo.js/src/extension/styles/open-props.css +291 -0
  228. package/node_modules/@rviscomi/capo.js/src/index.js +10 -0
  229. package/node_modules/@rviscomi/capo.js/src/lib/colors.js +14 -0
  230. package/node_modules/@rviscomi/capo.js/src/lib/io.js +171 -32
  231. package/node_modules/@rviscomi/capo.js/src/lib/options.js +82 -1
  232. package/node_modules/@rviscomi/capo.js/src/lib/rules.js +120 -43
  233. package/node_modules/@rviscomi/capo.js/src/lib/validation.js +211 -86
  234. package/node_modules/@rviscomi/capo.js/src/web/capo.js +5 -8
  235. package/node_modules/@types/hast/README.md +2 -2
  236. package/node_modules/@types/hast/index.d.ts +642 -0
  237. package/node_modules/@types/hast/package.json +9 -3
  238. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.d.ts +0 -4
  239. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslintrc/all.js +0 -4
  240. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/flat/all.js +0 -4
  241. package/node_modules/@typescript-eslint/eslint-plugin/dist/index.d.ts +0 -4
  242. package/node_modules/@typescript-eslint/eslint-plugin/dist/index.js +47 -0
  243. package/node_modules/@typescript-eslint/eslint-plugin/dist/raw-plugin.d.ts +0 -4
  244. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +4 -4
  245. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.d.ts +1 -1
  246. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +23 -10
  247. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +1 -1
  248. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js +16 -2
  249. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +41 -3
  250. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js +12 -0
  251. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.d.ts +1 -1
  252. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +5 -4
  253. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +1 -1
  254. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-parameter-property-assignment.js +1 -1
  255. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-template-expression.js +2 -2
  256. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +5 -1
  257. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +1 -1
  258. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -1
  259. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -1
  260. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +36 -9
  261. package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/index.js +11 -2
  262. package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/legacy.js +11 -2
  263. package/node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore/package.json +1 -1
  264. package/node_modules/@typescript-eslint/eslint-plugin/package.json +22 -11
  265. package/node_modules/@typescript-eslint/parser/dist/index.js +47 -0
  266. package/node_modules/@typescript-eslint/parser/dist/parser.js +11 -6
  267. package/node_modules/@typescript-eslint/parser/package.json +9 -7
  268. package/node_modules/@typescript-eslint/project-service/package.json +7 -5
  269. package/node_modules/@typescript-eslint/scope-manager/dist/scope/FunctionScope.js +2 -2
  270. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.d.ts +1 -0
  271. package/node_modules/@typescript-eslint/scope-manager/dist/scope/index.js +1 -0
  272. package/node_modules/@typescript-eslint/scope-manager/package.json +8 -6
  273. package/node_modules/@typescript-eslint/tsconfig-utils/package.json +5 -3
  274. package/node_modules/@typescript-eslint/type-utils/package.json +9 -7
  275. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +10 -0
  276. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +13 -0
  277. package/node_modules/@typescript-eslint/types/package.json +5 -3
  278. package/node_modules/@typescript-eslint/typescript-estree/dist/check-syntax-errors.js +22 -6
  279. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +5 -4
  280. package/node_modules/@typescript-eslint/typescript-estree/dist/getImportClausePhaseModifier.d.ts +4 -0
  281. package/node_modules/@typescript-eslint/typescript-estree/dist/getImportClausePhaseModifier.js +56 -0
  282. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +1 -1
  283. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.d.ts +1 -1
  284. package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +27 -18
  285. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +8 -0
  286. package/node_modules/@typescript-eslint/typescript-estree/package.json +9 -7
  287. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +1 -1
  288. package/node_modules/@typescript-eslint/utils/package.json +8 -6
  289. package/node_modules/@typescript-eslint/visitor-keys/package.json +6 -4
  290. package/node_modules/acorn/CHANGELOG.md +12 -0
  291. package/node_modules/acorn/README.md +5 -0
  292. package/node_modules/acorn/dist/acorn.d.mts +8 -0
  293. package/node_modules/acorn/dist/acorn.d.ts +8 -0
  294. package/node_modules/acorn/dist/acorn.js +16 -7
  295. package/node_modules/acorn/dist/acorn.mjs +16 -7
  296. package/node_modules/acorn/package.json +1 -1
  297. package/node_modules/astro-eslint-parser/lib/index.d.mts +113 -18
  298. package/node_modules/astro-eslint-parser/lib/index.mjs +871 -1172
  299. package/node_modules/astro-eslint-parser/package.json +7 -9
  300. package/node_modules/brace-expansion/README.md +11 -0
  301. package/node_modules/brace-expansion/dist/commonjs/index.d.ts +2 -0
  302. package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -1
  303. package/node_modules/brace-expansion/dist/commonjs/index.js +162 -84
  304. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
  305. package/node_modules/brace-expansion/dist/esm/index.d.ts +2 -0
  306. package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -1
  307. package/node_modules/brace-expansion/dist/esm/index.js +161 -83
  308. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
  309. package/node_modules/brace-expansion/package.json +2 -2
  310. package/node_modules/eslint/README.md +2 -2
  311. package/node_modules/eslint/lib/cli-engine/formatters/html.js +1 -1
  312. package/node_modules/eslint/lib/languages/js/index.js +1 -1
  313. package/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +1 -1
  314. package/node_modules/eslint/lib/linter/vfile.js +1 -1
  315. package/node_modules/eslint/lib/rules/class-methods-use-this.js +6 -5
  316. package/node_modules/eslint/lib/rules/complexity.js +1 -1
  317. package/node_modules/eslint/lib/rules/eqeqeq.js +26 -6
  318. package/node_modules/eslint/lib/rules/func-name-matching.js +3 -3
  319. package/node_modules/eslint/lib/rules/generator-star-spacing.js +4 -6
  320. package/node_modules/eslint/lib/rules/indent.js +4 -6
  321. package/node_modules/eslint/lib/rules/key-spacing.js +5 -7
  322. package/node_modules/eslint/lib/rules/max-len.js +1 -1
  323. package/node_modules/eslint/lib/rules/max-nested-callbacks.js +11 -1
  324. package/node_modules/eslint/lib/rules/no-compare-neg-zero.js +91 -8
  325. package/node_modules/eslint/lib/rules/no-control-regex.js +3 -0
  326. package/node_modules/eslint/lib/rules/no-implicit-coercion.js +22 -8
  327. package/node_modules/eslint/lib/rules/no-invalid-regexp.js +3 -1
  328. package/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +5 -7
  329. package/node_modules/eslint/lib/rules/no-promise-executor-return.js +5 -7
  330. package/node_modules/eslint/lib/rules/no-script-url.js +4 -6
  331. package/node_modules/eslint/lib/rules/no-shadow.js +14 -20
  332. package/node_modules/eslint/lib/rules/no-unreachable-loop.js +8 -4
  333. package/node_modules/eslint/lib/rules/prefer-numeric-literals.js +14 -6
  334. package/node_modules/eslint/lib/rules/prefer-object-has-own.js +4 -6
  335. package/node_modules/eslint/lib/rules/prefer-object-spread.js +9 -1
  336. package/node_modules/eslint/lib/rules/prefer-template.js +1 -1
  337. package/node_modules/eslint/lib/rules/preserve-caught-error.js +268 -116
  338. package/node_modules/eslint/lib/rules/quotes.js +1 -1
  339. package/node_modules/eslint/lib/rules/radix.js +58 -57
  340. package/node_modules/eslint/lib/rules/use-isnan.js +20 -12
  341. package/node_modules/eslint/lib/rules/utils/ast-utils.js +1 -1
  342. package/node_modules/eslint/lib/shared/serialization.js +1 -1
  343. package/node_modules/eslint/lib/shared/translate-cli-options.js +3 -3
  344. package/node_modules/eslint/lib/types/config-api.d.ts +8 -1
  345. package/node_modules/eslint/lib/types/index.d.ts +3 -6
  346. package/node_modules/eslint/lib/types/rules.d.ts +17 -9
  347. package/node_modules/eslint/package.json +7 -7
  348. package/node_modules/eslint-plugin-astro/README.md +10 -2
  349. package/node_modules/eslint-plugin-astro/lib/index.d.mts +0 -1
  350. package/node_modules/eslint-plugin-astro/lib/index.mjs +76 -637
  351. package/node_modules/eslint-plugin-astro/package.json +11 -11
  352. package/node_modules/eslint-plugin-toml/README.md +2 -0
  353. package/node_modules/eslint-plugin-toml/lib/index.d.mts +6 -5
  354. package/node_modules/eslint-plugin-toml/lib/index.mjs +32 -3
  355. package/node_modules/eslint-plugin-toml/package.json +7 -7
  356. package/node_modules/eslint-plugin-yml/lib/index.mjs +49 -19
  357. package/node_modules/eslint-plugin-yml/package.json +2 -2
  358. package/node_modules/flatted/golang/pkg/flatted/flatted.go +16 -14
  359. package/node_modules/flatted/package.json +10 -5
  360. package/node_modules/flatted/types/index.d.ts +1 -1
  361. package/node_modules/globals/globals.json +105 -33
  362. package/node_modules/globals/index.d.ts +105 -33
  363. package/node_modules/globals/package.json +2 -2
  364. package/node_modules/mdn-data/css/properties.json +64 -16
  365. package/node_modules/mdn-data/css/properties.schema.json +1 -7
  366. package/node_modules/mdn-data/css/syntaxes.json +1 -1
  367. package/node_modules/mdn-data/l10n/css.json +3 -62
  368. package/node_modules/mdn-data/package.json +1 -1
  369. package/node_modules/minimatch/package.json +9 -9
  370. package/node_modules/nanoid/non-secure/index.cjs +2 -2
  371. package/node_modules/nanoid/non-secure/index.js +2 -2
  372. package/node_modules/nanoid/package.json +1 -1
  373. package/node_modules/picomatch/README.md +15 -21
  374. package/node_modules/picomatch/lib/parse.js +39 -9
  375. package/node_modules/picomatch/lib/picomatch.js +14 -2
  376. package/node_modules/picomatch/package.json +3 -2
  377. package/node_modules/postcss/README.md +1 -2
  378. package/node_modules/postcss/lib/container.js +81 -34
  379. package/node_modules/postcss/lib/fromJSON.js +65 -26
  380. package/node_modules/postcss/lib/input.js +7 -1
  381. package/node_modules/postcss/lib/lazy-result.js +77 -14
  382. package/node_modules/postcss/lib/list.js +1 -0
  383. package/node_modules/postcss/lib/node.d.ts +2 -2
  384. package/node_modules/postcss/lib/node.js +90 -52
  385. package/node_modules/postcss/lib/postcss.d.ts +4 -1
  386. package/node_modules/postcss/lib/previous-map.js +6 -3
  387. package/node_modules/postcss/lib/processor.js +1 -1
  388. package/node_modules/postcss/lib/root.js +16 -1
  389. package/node_modules/postcss/lib/stringifier.js +112 -25
  390. package/node_modules/postcss/lib/warning.js +10 -0
  391. package/node_modules/postcss/package.json +2 -2
  392. package/node_modules/typescript-eslint/dist/index.js +47 -0
  393. package/node_modules/typescript-eslint/package.json +14 -6
  394. package/node_modules/yaml-eslint-parser/lib/chunk-CfYAbeIz.mjs +13 -0
  395. package/node_modules/yaml-eslint-parser/lib/index.d.mts +2 -2
  396. package/node_modules/yaml-eslint-parser/lib/index.mjs +164 -157
  397. package/node_modules/yaml-eslint-parser/package.json +17 -18
  398. package/package.json +23 -23
  399. package/node_modules/@astrojs/compiler/LICENSE +0 -53
  400. package/node_modules/@astrojs/compiler/README.md +0 -72
  401. package/node_modules/@astrojs/compiler/dist/astro.wasm +0 -0
  402. package/node_modules/@astrojs/compiler/dist/browser/index.cjs +0 -2
  403. package/node_modules/@astrojs/compiler/dist/browser/index.d.ts +0 -11
  404. package/node_modules/@astrojs/compiler/dist/browser/index.js +0 -1
  405. package/node_modules/@astrojs/compiler/dist/browser/utils.cjs +0 -3
  406. package/node_modules/@astrojs/compiler/dist/browser/utils.d.ts +0 -29
  407. package/node_modules/@astrojs/compiler/dist/browser/utils.js +0 -3
  408. package/node_modules/@astrojs/compiler/dist/browser/wasm_exec.cjs +0 -2
  409. package/node_modules/@astrojs/compiler/dist/browser/wasm_exec.d.ts +0 -37
  410. package/node_modules/@astrojs/compiler/dist/browser/wasm_exec.js +0 -1
  411. package/node_modules/@astrojs/compiler/dist/chunk-QR6QDSEV.js +0 -2
  412. package/node_modules/@astrojs/compiler/dist/chunk-W5DTLHV4.js +0 -1
  413. package/node_modules/@astrojs/compiler/dist/node/index.cjs +0 -1
  414. package/node_modules/@astrojs/compiler/dist/node/index.d.ts +0 -12
  415. package/node_modules/@astrojs/compiler/dist/node/index.js +0 -1
  416. package/node_modules/@astrojs/compiler/dist/node/sync.cjs +0 -1
  417. package/node_modules/@astrojs/compiler/dist/node/sync.d.ts +0 -16
  418. package/node_modules/@astrojs/compiler/dist/node/sync.js +0 -1
  419. package/node_modules/@astrojs/compiler/dist/node/utils.cjs +0 -3
  420. package/node_modules/@astrojs/compiler/dist/node/utils.d.ts +0 -29
  421. package/node_modules/@astrojs/compiler/dist/node/utils.js +0 -3
  422. package/node_modules/@astrojs/compiler/dist/node/wasm_exec.cjs +0 -1
  423. package/node_modules/@astrojs/compiler/dist/node/wasm_exec.d.ts +0 -37
  424. package/node_modules/@astrojs/compiler/dist/node/wasm_exec.js +0 -1
  425. package/node_modules/@astrojs/compiler/dist/shared/ast.cjs +0 -1
  426. package/node_modules/@astrojs/compiler/dist/shared/ast.d.ts +0 -74
  427. package/node_modules/@astrojs/compiler/dist/shared/ast.js +0 -0
  428. package/node_modules/@astrojs/compiler/dist/shared/diagnostics.cjs +0 -1
  429. package/node_modules/@astrojs/compiler/dist/shared/diagnostics.d.ts +0 -18
  430. package/node_modules/@astrojs/compiler/dist/shared/diagnostics.js +0 -1
  431. package/node_modules/@astrojs/compiler/dist/shared/types.cjs +0 -1
  432. package/node_modules/@astrojs/compiler/dist/shared/types.d.ts +0 -153
  433. package/node_modules/@astrojs/compiler/dist/shared/types.js +0 -1
  434. package/node_modules/@astrojs/compiler/package.json +0 -58
  435. package/node_modules/@astrojs/compiler/sync.d.ts +0 -1
  436. package/node_modules/@astrojs/compiler/types.d.ts +0 -1
  437. package/node_modules/@astrojs/compiler/utils.d.ts +0 -1
  438. package/node_modules/@pkgr/core/index.d.cts +0 -3
  439. package/node_modules/@pkgr/core/lib/constants.d.ts +0 -6
  440. package/node_modules/@pkgr/core/lib/constants.js +0 -9
  441. package/node_modules/@pkgr/core/lib/constants.js.map +0 -1
  442. package/node_modules/@pkgr/core/lib/helpers.d.ts +0 -19
  443. package/node_modules/@pkgr/core/lib/helpers.js +0 -67
  444. package/node_modules/@pkgr/core/lib/helpers.js.map +0 -1
  445. package/node_modules/@pkgr/core/lib/index.cjs +0 -91
  446. package/node_modules/@pkgr/core/lib/index.d.ts +0 -2
  447. package/node_modules/@pkgr/core/lib/index.js +0 -3
  448. package/node_modules/@pkgr/core/lib/index.js.map +0 -1
  449. package/node_modules/@pkgr/core/package.json +0 -38
  450. package/node_modules/@rviscomi/capo.js/crx/README.md +0 -10
  451. package/node_modules/@rviscomi/capo.js/crx/capo.js +0 -3
  452. package/node_modules/@rviscomi/capo.js/crx/options/options.js +0 -1
  453. package/node_modules/@rviscomi/capo.js/docs/.vscode/extensions.json +0 -4
  454. package/node_modules/@rviscomi/capo.js/docs/.vscode/launch.json +0 -11
  455. package/node_modules/@rviscomi/capo.js/docs/README.md +0 -51
  456. package/node_modules/@rviscomi/capo.js/docs/astro.config.mjs +0 -82
  457. package/node_modules/@rviscomi/capo.js/docs/package-lock.json +0 -7439
  458. package/node_modules/@rviscomi/capo.js/docs/package.json +0 -21
  459. package/node_modules/@rviscomi/capo.js/docs/public/capo-social-alt.webp +0 -0
  460. package/node_modules/@rviscomi/capo.js/docs/public/capo-social.png +0 -0
  461. package/node_modules/@rviscomi/capo.js/docs/public/capo-social.webp +0 -0
  462. package/node_modules/@rviscomi/capo.js/docs/public/favicon.svg +0 -13
  463. package/node_modules/@rviscomi/capo.js/docs/src/assets/bookmarklet-setup.png +0 -0
  464. package/node_modules/@rviscomi/capo.js/docs/src/assets/bookmarklet.png +0 -0
  465. package/node_modules/@rviscomi/capo.js/docs/src/assets/capo-chrome.png +0 -0
  466. package/node_modules/@rviscomi/capo.js/docs/src/assets/capo-extension.png +0 -0
  467. package/node_modules/@rviscomi/capo.js/docs/src/assets/capo800.png +0 -0
  468. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-console-expanded.png +0 -0
  469. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-console-interactive.png +0 -0
  470. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-console.png +0 -0
  471. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-hover-validation.png +0 -0
  472. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-menu.png +0 -0
  473. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-options-dark.png +0 -0
  474. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-options-light.png +0 -0
  475. package/node_modules/@rviscomi/capo.js/docs/src/assets/crx-store.png +0 -0
  476. package/node_modules/@rviscomi/capo.js/docs/src/assets/custom-palette.png +0 -0
  477. package/node_modules/@rviscomi/capo.js/docs/src/assets/developer-mode.png +0 -0
  478. package/node_modules/@rviscomi/capo.js/docs/src/assets/devtools-console.png +0 -0
  479. package/node_modules/@rviscomi/capo.js/docs/src/assets/devtools-snippet.png +0 -0
  480. package/node_modules/@rviscomi/capo.js/docs/src/assets/devtools-sources.png +0 -0
  481. package/node_modules/@rviscomi/capo.js/docs/src/assets/houston.webp +0 -0
  482. package/node_modules/@rviscomi/capo.js/docs/src/assets/load-unpacked.png +0 -0
  483. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-areas.png +0 -0
  484. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-base.png +0 -0
  485. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-crx-stripes.png +0 -0
  486. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-csp.png +0 -0
  487. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-invalid-element.png +0 -0
  488. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-origin-trial.png +0 -0
  489. package/node_modules/@rviscomi/capo.js/docs/src/assets/validation-title.png +0 -0
  490. package/node_modules/@rviscomi/capo.js/docs/src/components/CapoClient.astro +0 -165
  491. package/node_modules/@rviscomi/capo.js/docs/src/components/CapoOptions.astro +0 -10
  492. package/node_modules/@rviscomi/capo.js/docs/src/components/CapoPalette.astro +0 -26
  493. package/node_modules/@rviscomi/capo.js/docs/src/components/InlineCapoIcon.astro +0 -15
  494. package/node_modules/@rviscomi/capo.js/docs/src/components/InlineCapoWeightBars.astro +0 -39
  495. package/node_modules/@rviscomi/capo.js/docs/src/components/VirtualConsole.astro +0 -11
  496. package/node_modules/@rviscomi/capo.js/docs/src/content/config.ts +0 -7
  497. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/developer/contributing.mdx +0 -8
  498. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/developer/crx-local.mdx +0 -28
  499. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/developer/custom-adapters.mdx +0 -273
  500. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/index.mdx +0 -108
  501. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/migration-v2.mdx +0 -62
  502. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/actionability.mdx +0 -6
  503. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/assessment-mode.mdx +0 -29
  504. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/config.mdx +0 -195
  505. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/demo.mdx +0 -9
  506. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/extension.mdx +0 -116
  507. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/performance.mdx +0 -6
  508. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/quick-start.mdx +0 -26
  509. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/rules.mdx +0 -202
  510. package/node_modules/@rviscomi/capo.js/docs/src/content/docs/user/validation.mdx +0 -197
  511. package/node_modules/@rviscomi/capo.js/docs/src/env.d.ts +0 -2
  512. package/node_modules/@rviscomi/capo.js/docs/src/lib/VirtualConsole.js +0 -190
  513. package/node_modules/@rviscomi/capo.js/docs/src/lib/capo.js +0 -1533
  514. package/node_modules/@rviscomi/capo.js/docs/src/styles/custom.css +0 -7
  515. package/node_modules/@rviscomi/capo.js/docs/src/styles/virtual-console.css +0 -131
  516. package/node_modules/@rviscomi/capo.js/docs/tests/VirtualConsole.test.js +0 -108
  517. package/node_modules/@rviscomi/capo.js/docs/tsconfig.json +0 -3
  518. package/node_modules/@rviscomi/capo.js/src/crx/capo.js +0 -62
  519. package/node_modules/@rviscomi/capo.js/src/crx/options.js +0 -69
  520. package/node_modules/astrojs-compiler-sync/LICENSE +0 -53
  521. package/node_modules/astrojs-compiler-sync/README.md +0 -3
  522. package/node_modules/astrojs-compiler-sync/browser/index.d.ts +0 -6
  523. package/node_modules/astrojs-compiler-sync/browser/index.js +0 -76
  524. package/node_modules/astrojs-compiler-sync/browser/wasm_exec.js +0 -665
  525. package/node_modules/astrojs-compiler-sync/lib/astrojs-compiler-worker.js +0 -5
  526. package/node_modules/astrojs-compiler-sync/lib/compiler-sync.cjs +0 -31
  527. package/node_modules/astrojs-compiler-sync/lib/index.cjs +0 -30
  528. package/node_modules/astrojs-compiler-sync/lib/index.d.cts +0 -3
  529. package/node_modules/astrojs-compiler-sync/lib/index.d.ts +0 -14
  530. package/node_modules/astrojs-compiler-sync/lib/index.js +0 -18
  531. package/node_modules/astrojs-compiler-sync/package.json +0 -100
  532. package/node_modules/entities/LICENSE +0 -11
  533. package/node_modules/entities/dist/decode-codepoint.d.ts +0 -8
  534. package/node_modules/entities/dist/decode-codepoint.d.ts.map +0 -1
  535. package/node_modules/entities/dist/decode-codepoint.js +0 -46
  536. package/node_modules/entities/dist/decode-codepoint.js.map +0 -1
  537. package/node_modules/entities/dist/decode.d.ts +0 -194
  538. package/node_modules/entities/dist/decode.d.ts.map +0 -1
  539. package/node_modules/entities/dist/decode.js +0 -544
  540. package/node_modules/entities/dist/decode.js.map +0 -1
  541. package/node_modules/entities/dist/encode.d.ts +0 -24
  542. package/node_modules/entities/dist/encode.d.ts.map +0 -1
  543. package/node_modules/entities/dist/encode.js +0 -90
  544. package/node_modules/entities/dist/encode.js.map +0 -1
  545. package/node_modules/entities/dist/escape.d.ts +0 -48
  546. package/node_modules/entities/dist/escape.d.ts.map +0 -1
  547. package/node_modules/entities/dist/escape.js +0 -132
  548. package/node_modules/entities/dist/escape.js.map +0 -1
  549. package/node_modules/entities/dist/generated/decode-data-html.d.ts +0 -3
  550. package/node_modules/entities/dist/generated/decode-data-html.d.ts.map +0 -1
  551. package/node_modules/entities/dist/generated/decode-data-html.js +0 -5
  552. package/node_modules/entities/dist/generated/decode-data-html.js.map +0 -1
  553. package/node_modules/entities/dist/generated/decode-data-xml.d.ts +0 -3
  554. package/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +0 -1
  555. package/node_modules/entities/dist/generated/decode-data-xml.js +0 -5
  556. package/node_modules/entities/dist/generated/decode-data-xml.js.map +0 -1
  557. package/node_modules/entities/dist/generated/encode-html.d.ts +0 -5
  558. package/node_modules/entities/dist/generated/encode-html.d.ts.map +0 -1
  559. package/node_modules/entities/dist/generated/encode-html.js +0 -12
  560. package/node_modules/entities/dist/generated/encode-html.js.map +0 -1
  561. package/node_modules/entities/dist/index.d.ts +0 -89
  562. package/node_modules/entities/dist/index.d.ts.map +0 -1
  563. package/node_modules/entities/dist/index.js +0 -91
  564. package/node_modules/entities/dist/index.js.map +0 -1
  565. package/node_modules/entities/dist/internal/bin-trie-flags.d.ts +0 -17
  566. package/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +0 -1
  567. package/node_modules/entities/dist/internal/bin-trie-flags.js +0 -18
  568. package/node_modules/entities/dist/internal/bin-trie-flags.js.map +0 -1
  569. package/node_modules/entities/dist/internal/decode-shared.d.ts +0 -7
  570. package/node_modules/entities/dist/internal/decode-shared.d.ts.map +0 -1
  571. package/node_modules/entities/dist/internal/decode-shared.js +0 -17
  572. package/node_modules/entities/dist/internal/decode-shared.js.map +0 -1
  573. package/node_modules/entities/dist/internal/encode-shared.d.ts +0 -33
  574. package/node_modules/entities/dist/internal/encode-shared.d.ts.map +0 -1
  575. package/node_modules/entities/dist/internal/encode-shared.js +0 -93
  576. package/node_modules/entities/dist/internal/encode-shared.js.map +0 -1
  577. package/node_modules/entities/package.json +0 -83
  578. package/node_modules/entities/readme.md +0 -131
  579. package/node_modules/entities/src/decode-codepoint.ts +0 -50
  580. package/node_modules/entities/src/decode.ts +0 -671
  581. package/node_modules/entities/src/encode.ts +0 -95
  582. package/node_modules/entities/src/escape.ts +0 -160
  583. package/node_modules/entities/src/generated/decode-data-html.ts +0 -7
  584. package/node_modules/entities/src/generated/decode-data-xml.ts +0 -7
  585. package/node_modules/entities/src/generated/encode-html.ts +0 -18
  586. package/node_modules/entities/src/index.ts +0 -162
  587. package/node_modules/entities/src/internal/bin-trie-flags.ts +0 -16
  588. package/node_modules/entities/src/internal/decode-shared.ts +0 -18
  589. package/node_modules/entities/src/internal/encode-shared.ts +0 -123
  590. package/node_modules/parse5/README.md +0 -38
  591. package/node_modules/parse5/dist/common/doctype.d.ts +0 -4
  592. package/node_modules/parse5/dist/common/doctype.js +0 -114
  593. package/node_modules/parse5/dist/common/error-codes.d.ts +0 -67
  594. package/node_modules/parse5/dist/common/error-codes.js +0 -63
  595. package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -9
  596. package/node_modules/parse5/dist/common/foreign-content.js +0 -228
  597. package/node_modules/parse5/dist/common/html.d.ts +0 -289
  598. package/node_modules/parse5/dist/common/html.js +0 -523
  599. package/node_modules/parse5/dist/common/token.d.ts +0 -84
  600. package/node_modules/parse5/dist/common/token.js +0 -20
  601. package/node_modules/parse5/dist/common/unicode.d.ts +0 -42
  602. package/node_modules/parse5/dist/common/unicode.js +0 -62
  603. package/node_modules/parse5/dist/index.d.ts +0 -71
  604. package/node_modules/parse5/dist/index.js +0 -42
  605. package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -36
  606. package/node_modules/parse5/dist/parser/formatting-element-list.js +0 -110
  607. package/node_modules/parse5/dist/parser/index.d.ts +0 -221
  608. package/node_modules/parse5/dist/parser/index.js +0 -3245
  609. package/node_modules/parse5/dist/parser/open-element-stack.d.ts +0 -53
  610. package/node_modules/parse5/dist/parser/open-element-stack.js +0 -324
  611. package/node_modules/parse5/dist/serializer/index.d.ts +0 -60
  612. package/node_modules/parse5/dist/serializer/index.js +0 -168
  613. package/node_modules/parse5/dist/tokenizer/index.d.ts +0 -247
  614. package/node_modules/parse5/dist/tokenizer/index.js +0 -2712
  615. package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +0 -36
  616. package/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -196
  617. package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -84
  618. package/node_modules/parse5/dist/tree-adapters/default.js +0 -173
  619. package/node_modules/parse5/dist/tree-adapters/interface.d.ts +0 -255
  620. package/node_modules/parse5/dist/tree-adapters/interface.js +0 -1
  621. package/node_modules/parse5/package.json +0 -53
  622. package/node_modules/synckit/README.md +0 -256
  623. package/node_modules/synckit/lib/common.d.ts +0 -5
  624. package/node_modules/synckit/lib/common.js +0 -22
  625. package/node_modules/synckit/lib/common.js.map +0 -1
  626. package/node_modules/synckit/lib/constants.d.ts +0 -38
  627. package/node_modules/synckit/lib/constants.js +0 -54
  628. package/node_modules/synckit/lib/constants.js.map +0 -1
  629. package/node_modules/synckit/lib/helpers.d.ts +0 -27
  630. package/node_modules/synckit/lib/helpers.js +0 -411
  631. package/node_modules/synckit/lib/helpers.js.map +0 -1
  632. package/node_modules/synckit/lib/index.cjs +0 -588
  633. package/node_modules/synckit/lib/index.d.cts +0 -138
  634. package/node_modules/synckit/lib/index.d.ts +0 -7
  635. package/node_modules/synckit/lib/index.js +0 -68
  636. package/node_modules/synckit/lib/index.js.map +0 -1
  637. package/node_modules/synckit/lib/types.d.ts +0 -48
  638. package/node_modules/synckit/lib/types.js +0 -2
  639. package/node_modules/synckit/lib/types.js.map +0 -1
  640. package/node_modules/synckit/package.json +0 -45
  641. package/node_modules/yaml-eslint-parser/lib/chunk-15K8U1wQ.mjs +0 -18
  642. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/background.js +0 -0
  643. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/capo.css +0 -0
  644. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/images/icon128.png +0 -0
  645. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/images/icon256.png +0 -0
  646. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/options/options.css +0 -0
  647. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/options/options.html +0 -0
  648. /package/node_modules/@rviscomi/capo.js/{crx → dist/chrome}/styles/open-props.css +0 -0
  649. /package/node_modules/@rviscomi/capo.js/{docs/src/assets/capo256.png → dist/firefox/images/icon256.png} +0 -0
  650. /package/node_modules/eslint-plugin-toml/lib/{chunk-CfYAbeIz.mjs → rolldown-runtime-D7D4PA-g.mjs} +0 -0
@@ -15,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
15
15
  //------------------------------------------------------------------------------
16
16
 
17
17
  /** @typedef {import("estree").Node} ASTNode */
18
+ /** @typedef {import("eslint").Rule.Fix} Fix */
19
+ /** @typedef {import("eslint").Rule.RuleFixer} RuleFixer */
18
20
 
19
21
  //------------------------------------------------------------------------------
20
22
  // Helpers
@@ -40,18 +42,13 @@ const BUILT_IN_ERROR_TYPES = new Set([
40
42
  /**
41
43
  * Finds and returns information about the `cause` property of an error being thrown.
42
44
  * @param {ASTNode} throwStatement `ThrowStatement` to be checked.
45
+ * @param {number} optionsIndex The index of the options argument in the error constructor.
43
46
  * @returns {{ value: ASTNode; multipleDefinitions: boolean; } | UNKNOWN_CAUSE | null}
44
47
  * Information about the `cause` of the error being thrown, such as the value node and
45
48
  * whether there are multiple definitions of `cause`. `null` if there is no `cause`.
46
49
  */
47
- function getErrorCause(throwStatement) {
50
+ function getErrorCause(throwStatement, optionsIndex) {
48
51
  const throwExpression = throwStatement.argument;
49
- /*
50
- * Determine which argument index holds the options object
51
- * `AggregateError` is a special case as it accepts the `options` object as third argument.
52
- */
53
- const optionsIndex =
54
- throwExpression.callee.name === "AggregateError" ? 2 : 1;
55
52
 
56
53
  /*
57
54
  * Make sure there is no `SpreadElement` at or before the `optionsIndex`
@@ -152,6 +149,7 @@ module.exports = {
152
149
  defaultOptions: [
153
150
  {
154
151
  requireCatchParameter: false,
152
+ errorClassNames: [],
155
153
  },
156
154
  ],
157
155
 
@@ -161,14 +159,6 @@ module.exports = {
161
159
  recommended: true,
162
160
  url: "https://eslint.org/docs/latest/rules/preserve-caught-error", // URL to the documentation page for this rule
163
161
  },
164
- /*
165
- * TODO: We should allow passing `customErrorTypes` option once something like `typescript-eslint`'s
166
- * `TypeOrValueSpecifier` is implemented in core Eslint.
167
- * See:
168
- * 1. https://typescript-eslint.io/packages/type-utils/type-or-value-specifier/
169
- * 2. https://github.com/eslint/eslint/pull/19913#discussion_r2192608593
170
- * 3. https://github.com/eslint/eslint/discussions/16540
171
- */
172
162
  schema: [
173
163
  {
174
164
  type: "object",
@@ -178,6 +168,33 @@ module.exports = {
178
168
  description:
179
169
  "Requires the catch blocks to always have the caught error parameter so it is not discarded.",
180
170
  },
171
+ errorClassNames: {
172
+ type: "array",
173
+ description:
174
+ "Additional error class names to check for cause preservation.",
175
+ items: {
176
+ oneOf: [
177
+ {
178
+ type: "string",
179
+ },
180
+ {
181
+ type: "object",
182
+ required: ["name", "argumentPosition"],
183
+ properties: {
184
+ name: {
185
+ type: "string",
186
+ },
187
+ argumentPosition: {
188
+ type: "integer",
189
+ minimum: 1,
190
+ },
191
+ },
192
+ additionalProperties: false,
193
+ },
194
+ ],
195
+ },
196
+ uniqueItems: true,
197
+ },
181
198
  },
182
199
  additionalProperties: false,
183
200
  },
@@ -201,12 +218,34 @@ module.exports = {
201
218
 
202
219
  create(context) {
203
220
  const sourceCode = context.sourceCode;
204
- const [{ requireCatchParameter }] = context.options;
221
+ const [{ requireCatchParameter, errorClassNames }] = context.options;
222
+
223
+ const errorClassNamesMap = new Map();
224
+ for (const item of errorClassNames) {
225
+ const name = typeof item === "string" ? item : item.name;
226
+ const argumentPosition =
227
+ typeof item === "string" ? 2 : item.argumentPosition;
228
+
229
+ errorClassNamesMap.set(name, argumentPosition);
230
+ }
205
231
 
206
232
  //----------------------------------------------------------------------
207
233
  // Helpers
208
234
  //----------------------------------------------------------------------
209
235
 
236
+ /**
237
+ * Checks if the given callee refers to a built-in global Error constructor.
238
+ * @param {ASTNode} callee The callee node.
239
+ * @returns {boolean} `true` if the callee is a built-in global Error constructor.
240
+ */
241
+ function isBuiltInGlobalError(callee) {
242
+ return (
243
+ callee.type === "Identifier" &&
244
+ BUILT_IN_ERROR_TYPES.has(callee.name) &&
245
+ sourceCode.isGlobalReference(callee)
246
+ );
247
+ }
248
+
210
249
  /**
211
250
  * Checks if a `ThrowStatement` is constructing and throwing a new `Error` object.
212
251
  *
@@ -216,18 +255,33 @@ module.exports = {
216
255
  * @returns {boolean} `true` if a new "Error" is being thrown, else `false`.
217
256
  */
218
257
  function isThrowingNewError(throwStatement) {
258
+ if (!(
259
+ throwStatement.argument.type === "NewExpression" ||
260
+ throwStatement.argument.type === "CallExpression"
261
+ )) {
262
+ return false;
263
+ }
264
+
265
+ const callee = throwStatement.argument.callee;
266
+
267
+ /*
268
+ * Make sure the thrown Error instance is one of the built-in global error types.
269
+ * Custom imports could shadow this, which would lead to false positives.
270
+ * e.g. import { Error } from "./my-custom-error.js";
271
+ * throw Error("Failed to perform error prone operations");
272
+ */
273
+ if (isBuiltInGlobalError(callee)) {
274
+ return true;
275
+ }
276
+
277
+ const target =
278
+ callee.type === "MemberExpression" && !callee.computed
279
+ ? callee.property
280
+ : callee;
281
+
219
282
  return (
220
- (throwStatement.argument.type === "NewExpression" ||
221
- throwStatement.argument.type === "CallExpression") &&
222
- throwStatement.argument.callee.type === "Identifier" &&
223
- BUILT_IN_ERROR_TYPES.has(throwStatement.argument.callee.name) &&
224
- /*
225
- * Make sure the thrown Error is instance is one of the built-in global error types.
226
- * Custom imports could shadow this, which would lead to false positives.
227
- * e.g. import { Error } from "./my-custom-error.js";
228
- * throw Error("Failed to perform error prone operations");
229
- */
230
- sourceCode.isGlobalReference(throwStatement.argument.callee)
283
+ target.type === "Identifier" &&
284
+ errorClassNamesMap.has(target.name)
231
285
  );
232
286
  }
233
287
 
@@ -256,6 +310,83 @@ module.exports = {
256
310
  );
257
311
  }
258
312
 
313
+ /**
314
+ * Finds the first token that isn't followed by a closing parenthesis in a specified range.
315
+ * This is the token after which new arguments should be inserted.
316
+ * @param {Token} firstToken The first token to start searching from.
317
+ * @param {Token} lastToken The last token to scan up to (inclusive).
318
+ * @returns {Token} The first token that isn't followed by a closing parenthesis, or `lastToken` if none is found.
319
+ */
320
+ function findInsertionTokenAfterParens(firstToken, lastToken) {
321
+ const lastIndex = lastToken.range[1];
322
+ let token = firstToken;
323
+ let nextToken = sourceCode.getTokenAfter(token);
324
+
325
+ while (
326
+ nextToken.range[1] <= lastIndex &&
327
+ astUtils.isClosingParenToken(nextToken)
328
+ ) {
329
+ token = nextToken;
330
+ nextToken = sourceCode.getTokenAfter(token);
331
+ }
332
+ return token;
333
+ }
334
+
335
+ /**
336
+ * Adds arguments for a call/new expression with no arguments.
337
+ * Works for `new Error`, `new (Error)`, and forms that already include empty argument parentheses.
338
+ * @param {RuleFixer} fixer The fixer instance.
339
+ * @param {ASTNode & { callee: ASTNode }} throwExpression The thrown CallExpression or NewExpression node.
340
+ * @param {string} text The arguments to insert.
341
+ * @returns {Fix} The fixer operation.
342
+ */
343
+ function addArgumentsToEmptyCall(fixer, throwExpression, text) {
344
+ const callClosingParenToken =
345
+ sourceCode.getLastToken(throwExpression);
346
+ const lastCalleeToken = sourceCode.getLastToken(
347
+ throwExpression.callee,
348
+ );
349
+ const parenToken = sourceCode.getFirstTokenBetween(
350
+ lastCalleeToken,
351
+ callClosingParenToken,
352
+ astUtils.isOpeningParenToken,
353
+ );
354
+
355
+ if (parenToken) {
356
+ return fixer.insertTextAfter(parenToken, text);
357
+ }
358
+
359
+ const insertionToken = findInsertionTokenAfterParens(
360
+ lastCalleeToken,
361
+ callClosingParenToken,
362
+ );
363
+
364
+ return fixer.insertTextAfter(insertionToken, `(${text})`);
365
+ }
366
+
367
+ /**
368
+ * Appends additional arguments after the last argument of a call/new expression,
369
+ * accounting for any wrapping parentheses around that argument.
370
+ * @param {RuleFixer} fixer The fixer instance.
371
+ * @param {ASTNode & { arguments: ASTNode[] }} throwExpression The thrown CallExpression or NewExpression node.
372
+ * @param {string} text The additional arguments to insert, including the leading comma.
373
+ * @returns {Fix} The fixer operation.
374
+ */
375
+ function appendArguments(fixer, throwExpression, text) {
376
+ const lastArgument = throwExpression.arguments.at(-1);
377
+ const lastArgumentToken = sourceCode.getLastToken(lastArgument);
378
+ const lastTokenBeforeArgListParen = sourceCode.getLastToken(
379
+ throwExpression,
380
+ { skip: 1 },
381
+ );
382
+ const insertionToken = findInsertionTokenAfterParens(
383
+ lastArgumentToken,
384
+ lastTokenBeforeArgListParen,
385
+ );
386
+
387
+ return fixer.insertTextAfter(insertionToken, text);
388
+ }
389
+
259
390
  //----------------------------------------------------------------------
260
391
  // Public
261
392
  //----------------------------------------------------------------------
@@ -299,8 +430,30 @@ module.exports = {
299
430
  return;
300
431
  }
301
432
 
433
+ // Determine the options argument index
434
+ const callee = throwStatement.argument.callee;
435
+ const errorClassName =
436
+ callee.type === "Identifier"
437
+ ? callee.name
438
+ : callee.property.name;
439
+
440
+ const builtInGlobalError = isBuiltInGlobalError(callee);
441
+
442
+ let optionsIndex;
443
+ if (builtInGlobalError) {
444
+ optionsIndex =
445
+ errorClassName === "AggregateError" ? 2 : 1;
446
+ } else {
447
+ const argumentPosition =
448
+ errorClassNamesMap.get(errorClassName);
449
+ optionsIndex = argumentPosition - 1;
450
+ }
451
+
302
452
  // Check if there is a cause attached to the new error
303
- const errorCauseInfo = getErrorCause(throwStatement);
453
+ const errorCauseInfo = getErrorCause(
454
+ throwStatement,
455
+ optionsIndex,
456
+ );
304
457
 
305
458
  if (errorCauseInfo === UNKNOWN_CAUSE) {
306
459
  // Error options exist, but too complicated to be analyzed/fixed
@@ -319,127 +472,128 @@ module.exports = {
319
472
  const throwExpression =
320
473
  throwStatement.argument;
321
474
  const args = throwExpression.arguments;
322
- const errorType =
323
- throwExpression.callee.name;
475
+
476
+ /**
477
+ * Inserts `cause` into the options argument if it is an `ObjectExpression`.
478
+ * @param {ASTNode} optionsArg The options argument node.
479
+ * @returns {Fix | null} The fix, or `null` if the argument is not an object.
480
+ */
481
+ function fixExistingOptions(
482
+ optionsArg,
483
+ ) {
484
+ if (
485
+ optionsArg.type ===
486
+ "ObjectExpression"
487
+ ) {
488
+ return insertCauseIntoOptions(
489
+ fixer,
490
+ optionsArg,
491
+ caughtError.name,
492
+ );
493
+ }
494
+ return null;
495
+ }
324
496
 
325
497
  // AggregateError: errors, message, options
326
- if (errorType === "AggregateError") {
498
+ if (
499
+ builtInGlobalError &&
500
+ errorClassName === "AggregateError"
501
+ ) {
327
502
  const errorsArg = args[0];
328
503
  const messageArg = args[1];
329
504
  const optionsArg = args[2];
330
505
 
331
506
  if (!errorsArg) {
332
507
  // Case: `throw new AggregateError()` → insert all arguments
333
- const lastToken =
334
- sourceCode.getLastToken(
335
- throwExpression,
336
- );
337
- const lastCalleeToken =
338
- sourceCode.getLastToken(
339
- throwExpression.callee,
340
- );
341
- const parenToken =
342
- sourceCode.getFirstTokenBetween(
343
- lastCalleeToken,
344
- lastToken,
345
- astUtils.isOpeningParenToken,
346
- );
347
-
348
- if (parenToken) {
349
- return fixer.insertTextAfter(
350
- parenToken,
351
- `[], "", { cause: ${caughtError.name} }`,
352
- );
353
- }
354
- return fixer.insertTextAfter(
355
- throwExpression.callee,
356
- `([], "", { cause: ${caughtError.name} })`,
508
+ return addArgumentsToEmptyCall(
509
+ fixer,
510
+ throwExpression,
511
+ `[], "", { cause: ${caughtError.name} }`,
357
512
  );
358
513
  }
359
514
 
360
515
  if (!messageArg) {
361
516
  // Case: `throw new AggregateError([])` → insert message and options
362
- return fixer.insertTextAfter(
363
- errorsArg,
517
+ return appendArguments(
518
+ fixer,
519
+ throwExpression,
364
520
  `, "", { cause: ${caughtError.name} }`,
365
521
  );
366
522
  }
367
523
 
368
524
  if (!optionsArg) {
369
525
  // Case: `throw new AggregateError([], "")` → insert error options only
370
- return fixer.insertTextAfter(
371
- messageArg,
372
- `, { cause: ${caughtError.name} }`,
373
- );
374
- }
375
-
376
- if (
377
- optionsArg.type ===
378
- "ObjectExpression"
379
- ) {
380
- return insertCauseIntoOptions(
526
+ return appendArguments(
381
527
  fixer,
382
- optionsArg,
383
- caughtError.name,
528
+ throwExpression,
529
+ `, { cause: ${caughtError.name} }`,
384
530
  );
385
531
  }
386
532
 
387
- // Complex dynamic options — skip
388
- return null;
533
+ return fixExistingOptions(
534
+ optionsArg,
535
+ );
389
536
  }
390
537
 
391
538
  // Normal Error types
392
- const messageArg = args[0];
393
- const optionsArg = args[1];
539
+ if (builtInGlobalError) {
540
+ const messageArg = args[0];
541
+ const optionsArg = args[1];
394
542
 
395
- if (!messageArg) {
396
- // Case: `throw new Error()` → insert both message and options
397
- const lastToken =
398
- sourceCode.getLastToken(
543
+ if (!messageArg) {
544
+ // Case: `throw new Error()` → insert both message and options
545
+ return addArgumentsToEmptyCall(
546
+ fixer,
399
547
  throwExpression,
400
- );
401
- const lastCalleeToken =
402
- sourceCode.getLastToken(
403
- throwExpression.callee,
404
- );
405
- const parenToken =
406
- sourceCode.getFirstTokenBetween(
407
- lastCalleeToken,
408
- lastToken,
409
- astUtils.isOpeningParenToken,
410
- );
411
-
412
- if (parenToken) {
413
- return fixer.insertTextAfter(
414
- parenToken,
415
548
  `"", { cause: ${caughtError.name} }`,
416
549
  );
417
550
  }
418
- return fixer.insertTextAfter(
419
- throwExpression.callee,
420
- `("", { cause: ${caughtError.name} })`,
551
+ if (!optionsArg) {
552
+ // Case: `throw new Error("Some message")` → insert only options
553
+ return appendArguments(
554
+ fixer,
555
+ throwExpression,
556
+ `, { cause: ${caughtError.name} }`,
557
+ );
558
+ }
559
+
560
+ return fixExistingOptions(
561
+ optionsArg,
421
562
  );
422
563
  }
423
- if (!optionsArg) {
424
- // Case: `throw new Error("Some message")` → insert only options
425
- return fixer.insertTextAfter(
426
- messageArg,
427
- `, { cause: ${caughtError.name} }`,
428
- );
564
+
565
+ // Custom error types
566
+ const optionsArg = args[optionsIndex];
567
+
568
+ /*
569
+ * Custom error signature is unknown, so skip the suggestion rather
570
+ * than synthesize placeholder values for missing positional args.
571
+ */
572
+ if (args.length < optionsIndex) {
573
+ return null;
429
574
  }
430
575
 
431
- if (
432
- optionsArg.type ===
433
- "ObjectExpression"
434
- ) {
435
- return insertCauseIntoOptions(
576
+ if (!optionsArg) {
577
+ const lastProvidedArg = args.at(-1);
578
+
579
+ if (lastProvidedArg) {
580
+ // Options slot missing, all prior args provided → append options
581
+ return appendArguments(
582
+ fixer,
583
+ throwExpression,
584
+ `, { cause: ${caughtError.name} }`,
585
+ );
586
+ }
587
+
588
+ // argumentPosition: 1 and no args → insert options inside parens
589
+ return addArgumentsToEmptyCall(
436
590
  fixer,
437
- optionsArg,
438
- caughtError.name,
591
+ throwExpression,
592
+ `{ cause: ${caughtError.name} }`,
439
593
  );
440
594
  }
441
595
 
442
- return null; // Identifier or spread — do not fix
596
+ return fixExistingOptions(optionsArg);
443
597
  },
444
598
  },
445
599
  ],
@@ -452,12 +606,10 @@ module.exports = {
452
606
  const { value: thrownErrorCause } = errorCauseInfo;
453
607
 
454
608
  // If there is an attached cause, verify that it matches the caught error
455
- if (
456
- !(
457
- thrownErrorCause.type === "Identifier" &&
458
- thrownErrorCause.name === caughtError.name
459
- )
460
- ) {
609
+ if (!(
610
+ thrownErrorCause.type === "Identifier" &&
611
+ thrownErrorCause.name === caughtError.name
612
+ )) {
461
613
  const suggest = errorCauseInfo.multipleDefinitions
462
614
  ? null // If there are multiple `cause` definitions, a suggestion could be confusing.
463
615
  : [
@@ -220,7 +220,7 @@ module.exports = {
220
220
 
221
221
  /**
222
222
  * Checks whether a specified node is either part of, or immediately follows a (possibly empty) directive prologue.
223
- * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive}
223
+ * @see {@link https://262.ecma-international.org/6.0/#sec-directive-prologues-and-the-use-strict-directive}
224
224
  * @param {ASTNode} node A node to check.
225
225
  * @returns {boolean} Whether a specified node is either part of, or immediately follows a (possibly empty) directive prologue.
226
226
  * @private
@@ -34,21 +34,6 @@ function isShadowed(variable) {
34
34
  return variable.defs.length >= 1;
35
35
  }
36
36
 
37
- /**
38
- * Checks whether a given node is a MemberExpression of `parseInt` method or not.
39
- * @param {ASTNode} node A node to check.
40
- * @returns {boolean} `true` if the node is a MemberExpression of `parseInt`
41
- * method.
42
- */
43
- function isParseIntMethod(node) {
44
- return (
45
- node.type === "MemberExpression" &&
46
- !node.computed &&
47
- node.property.type === "Identifier" &&
48
- node.property.name === "parseInt"
49
- );
50
- }
51
-
52
37
  /**
53
38
  * Checks whether a given node is a valid value of radix or not.
54
39
  *
@@ -61,6 +46,20 @@ function isParseIntMethod(node) {
61
46
  * @returns {boolean} `true` if the node is valid.
62
47
  */
63
48
  function isValidRadix(radix, sourceCode) {
49
+ if (
50
+ radix.type === "UnaryExpression" &&
51
+ (radix.operator === "-" || radix.operator === "+") &&
52
+ radix.argument.type === "Literal" &&
53
+ typeof radix.argument.value === "number"
54
+ ) {
55
+ const value =
56
+ radix.operator === "-"
57
+ ? -radix.argument.value
58
+ : radix.argument.value;
59
+
60
+ return validRadixValues.has(value);
61
+ }
62
+
64
63
  return !(
65
64
  (radix.type === "Literal" && !validRadixValues.has(radix.value)) ||
66
65
  (radix.type === "Identifier" &&
@@ -115,49 +114,47 @@ module.exports = {
115
114
  */
116
115
  function checkArguments(node) {
117
116
  const args = node.arguments;
117
+ const spreadIndex = args.findIndex(
118
+ arg => arg.type === "SpreadElement",
119
+ );
118
120
 
119
- switch (args.length) {
120
- case 0:
121
- context.report({
122
- node,
123
- messageId: "missingParameters",
124
- });
125
- break;
126
-
127
- case 1:
128
- context.report({
129
- node,
130
- messageId: "missingRadix",
131
- suggest: [
132
- {
133
- messageId: "addRadixParameter10",
134
- fix(fixer) {
135
- const tokens = sourceCode.getTokens(node);
136
- const lastToken = tokens.at(-1); // Parenthesis.
137
- const secondToLastToken = tokens.at(-2); // May or may not be a comma.
138
- const hasTrailingComma =
139
- secondToLastToken.type ===
140
- "Punctuator" &&
141
- secondToLastToken.value === ",";
142
-
143
- return fixer.insertTextBefore(
144
- lastToken,
145
- hasTrailingComma ? " 10," : ", 10",
146
- );
147
- },
121
+ if (spreadIndex !== -1 && spreadIndex < 2) {
122
+ return;
123
+ }
124
+
125
+ if (args.length === 0) {
126
+ context.report({
127
+ node,
128
+ messageId: "missingParameters",
129
+ });
130
+ } else if (args.length === 1) {
131
+ context.report({
132
+ node,
133
+ messageId: "missingRadix",
134
+ suggest: [
135
+ {
136
+ messageId: "addRadixParameter10",
137
+ fix(fixer) {
138
+ const lastToken = sourceCode.getLastToken(node);
139
+ const prevToken =
140
+ sourceCode.getTokenBefore(lastToken);
141
+
142
+ const hasTrailingComma =
143
+ astUtils.isCommaToken(prevToken);
144
+
145
+ return fixer.insertTextBefore(
146
+ lastToken,
147
+ hasTrailingComma ? " 10," : ", 10",
148
+ );
148
149
  },
149
- ],
150
- });
151
- break;
152
-
153
- default:
154
- if (!isValidRadix(args[1], sourceCode)) {
155
- context.report({
156
- node,
157
- messageId: "invalidRadix",
158
- });
159
- }
160
- break;
150
+ },
151
+ ],
152
+ });
153
+ } else if (!isValidRadix(args[1], sourceCode)) {
154
+ context.report({
155
+ node,
156
+ messageId: "invalidRadix",
157
+ });
161
158
  }
162
159
  }
163
160
 
@@ -189,7 +186,11 @@ module.exports = {
189
186
  : parentNode;
190
187
 
191
188
  if (
192
- isParseIntMethod(parentNode) &&
189
+ astUtils.isSpecificMemberAccess(
190
+ parentNode,
191
+ "Number",
192
+ "parseInt",
193
+ ) &&
193
194
  astUtils.isCallee(maybeCallee)
194
195
  ) {
195
196
  checkArguments(maybeCallee.parent);