@alexlit/lint-kit 176.0.1 → 177.0.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 (293) hide show
  1. package/package.json +1 -1
  2. package/packages/config-stylelint/package.json +5 -5
  3. package/packages/config-stylelint/plugins/color-format.js +1 -5
  4. package/packages/config-stylelint/plugins/logical-css.js +1 -4
  5. package/packages/config-eslint/node_modules/@eslint/core/LICENSE +0 -201
  6. package/packages/config-eslint/node_modules/@eslint/core/README.md +0 -29
  7. package/packages/config-eslint/node_modules/@eslint/core/dist/cjs/types.d.cts +0 -1179
  8. package/packages/config-eslint/node_modules/@eslint/core/dist/esm/types.d.ts +0 -1179
  9. package/packages/config-eslint/node_modules/@eslint/core/package.json +0 -49
  10. package/packages/config-eslint/node_modules/@eslint/plugin-kit/LICENSE +0 -201
  11. package/packages/config-eslint/node_modules/@eslint/plugin-kit/README.md +0 -273
  12. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/index.cjs +0 -884
  13. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts +0 -328
  14. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/cjs/types.cts +0 -7
  15. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts +0 -328
  16. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/index.js +0 -879
  17. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/types.d.ts +0 -6
  18. package/packages/config-eslint/node_modules/@eslint/plugin-kit/dist/esm/types.ts +0 -7
  19. package/packages/config-eslint/node_modules/@eslint/plugin-kit/package.json +0 -61
  20. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/configs/flat-config-base.js +0 -9
  21. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/index.d.ts +0 -17
  22. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/index.js +0 -91
  23. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/license +0 -9
  24. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/globals.json +0 -3345
  25. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/index.d.ts +0 -3452
  26. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/index.js +0 -2
  27. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/license +0 -9
  28. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/package.json +0 -117
  29. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/node_modules/globals/readme.md +0 -42
  30. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/package.json +0 -128
  31. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/readme.md +0 -261
  32. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/call-or-new-expression.js +0 -120
  33. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/function-types.js +0 -7
  34. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/index.js +0 -30
  35. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-arrow-function-body.js +0 -3
  36. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-directive.js +0 -4
  37. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-empty-array-expression.js +0 -5
  38. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-empty-node.js +0 -17
  39. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-expression-statement.js +0 -7
  40. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-function.js +0 -5
  41. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-member-expression.js +0 -98
  42. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-method-call.js +0 -62
  43. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-negative-one.js +0 -8
  44. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-reference-identifier.js +0 -159
  45. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-static-require.js +0 -10
  46. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-tagged-template-literal.js +0 -24
  47. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/is-undefined.js +0 -3
  48. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/ast/literal.js +0 -24
  49. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/better-regex.js +0 -146
  50. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/catch-error-name.js +0 -138
  51. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-assert.js +0 -98
  52. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-date-clone.js +0 -54
  53. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-destructuring.js +0 -168
  54. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-empty-array-spread.js +0 -127
  55. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-existence-index-check.js +0 -137
  56. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/consistent-function-scoping.js +0 -265
  57. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/custom-error-definition.js +0 -218
  58. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/empty-brace-spaces.js +0 -62
  59. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/error-message.js +0 -98
  60. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/escape-case.js +0 -86
  61. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/expiring-todo-comments.js +0 -584
  62. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/explicit-length-check.js +0 -236
  63. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/filename-case.js +0 -276
  64. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/add-parenthesizes-to-return-or-throw-expression.js +0 -29
  65. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/append-argument.js +0 -30
  66. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/extend-fix-range.js +0 -11
  67. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/fix-space-around-keywords.js +0 -43
  68. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/index.js +0 -23
  69. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-argument.js +0 -40
  70. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-expression-statement.js +0 -34
  71. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-method-call.js +0 -28
  72. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-object-property.js +0 -21
  73. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-parentheses.js +0 -19
  74. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-spaces-after.js +0 -22
  75. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/remove-specifier.js +0 -59
  76. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/rename-variable.js +0 -8
  77. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-argument.js +0 -17
  78. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-member-expression-property.js +0 -25
  79. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-node-or-token-and-spaces-before.js +0 -31
  80. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-reference-identifier.js +0 -32
  81. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-string-raw.js +0 -12
  82. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/replace-template-element.js +0 -10
  83. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/switch-call-expression-to-new-expression.js +0 -29
  84. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/fix/switch-new-expression-to-call-expression.js +0 -42
  85. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/import-style.js +0 -375
  86. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/index.js +0 -143
  87. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/new-for-builtins.js +0 -112
  88. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-abusive-eslint-disable.js +0 -63
  89. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-accessor-recursion.js +0 -160
  90. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-anonymous-default-export.js +0 -210
  91. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-callback-reference.js +0 -285
  92. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-for-each.js +0 -496
  93. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-method-this-argument.js +0 -223
  94. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-reduce.js +0 -128
  95. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-reverse.js +0 -6
  96. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-array-sort.js +0 -6
  97. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-await-expression-member.js +0 -85
  98. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-await-in-promise-methods.js +0 -69
  99. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-console-spaces.js +0 -89
  100. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-document-cookie.js +0 -27
  101. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-empty-file.js +0 -58
  102. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-for-loop.js +0 -419
  103. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-hex-escape.js +0 -54
  104. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-immediate-mutation.js +0 -778
  105. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-instanceof-builtins.js +0 -216
  106. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-invalid-fetch-options.js +0 -112
  107. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-invalid-remove-event-listener.js +0 -61
  108. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-keyword-prefix.js +0 -202
  109. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-lonely-if.js +0 -155
  110. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-magic-array-flat-depth.js +0 -55
  111. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-named-default.js +0 -101
  112. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-negated-condition.js +0 -145
  113. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-negation-in-equality-check.js +0 -99
  114. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-nested-ternary.js +0 -60
  115. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-new-array.js +0 -106
  116. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-new-buffer.js +0 -100
  117. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-null.js +0 -153
  118. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-object-as-default-parameter.js +0 -52
  119. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-process-exit.js +0 -106
  120. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-single-promise-in-promise-methods.js +0 -179
  121. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-static-only-class.js +0 -226
  122. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-thenable.js +0 -194
  123. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-this-assignment.js +0 -40
  124. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-typeof-undefined.js +0 -146
  125. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-array-flat-depth.js +0 -49
  126. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-array-splice-count.js +0 -23
  127. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-await.js +0 -110
  128. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-polyfills.js +0 -174
  129. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unnecessary-slice-end.js +0 -22
  130. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unreadable-array-destructuring.js +0 -85
  131. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unreadable-iife.js +0 -43
  132. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-unused-properties.js +0 -240
  133. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-collection-argument.js +0 -101
  134. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-error-capture-stack-trace.js +0 -146
  135. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-fallback-in-spread.js +0 -66
  136. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-length-check.js +0 -150
  137. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-promise-resolve-reject.js +0 -210
  138. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-spread.js +0 -389
  139. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-switch-case.js +0 -59
  140. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-useless-undefined.js +0 -275
  141. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/no-zero-fractions.js +0 -81
  142. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/number-literal-case.js +0 -82
  143. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/numeric-separators-style.js +0 -189
  144. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-add-event-listener.js +0 -191
  145. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-find.js +0 -458
  146. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-flat-map.js +0 -86
  147. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-flat.js +0 -279
  148. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-index-of.js +0 -34
  149. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-array-some.js +0 -219
  150. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-at.js +0 -380
  151. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-bigint-literals.js +0 -129
  152. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-blob-reading-methods.js +0 -47
  153. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-class-fields.js +0 -158
  154. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-classlist-toggle.js +0 -255
  155. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-code-point.js +0 -56
  156. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-date-now.js +0 -133
  157. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-default-parameters.js +0 -218
  158. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-append.js +0 -50
  159. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-dataset.js +0 -135
  160. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-remove.js +0 -124
  161. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-dom-node-text-content.js +0 -77
  162. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-event-target.js +0 -119
  163. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-export-from.js +0 -367
  164. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-global-this.js +0 -222
  165. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-import-meta-properties.js +0 -320
  166. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-includes.js +0 -111
  167. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-json-parse-buffer.js +0 -161
  168. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-keyboard-event-key.js +0 -188
  169. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-logical-operator-over-ternary.js +0 -162
  170. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-math-min-max.js +0 -205
  171. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-math-trunc.js +0 -111
  172. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-modern-dom-apis.js +0 -145
  173. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-modern-math-apis.js +0 -210
  174. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-module.js +0 -377
  175. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-native-coercion-functions.js +0 -187
  176. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-negative-index.js +0 -211
  177. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-node-protocol.js +0 -86
  178. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-number-properties.js +0 -142
  179. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-object-from-entries.js +0 -256
  180. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-optional-catch-binding.js +0 -77
  181. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-prototype-methods.js +0 -162
  182. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-query-selector.js +0 -170
  183. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-reflect-apply.js +0 -99
  184. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-regexp-test.js +0 -155
  185. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-response-static-json.js +0 -85
  186. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-set-has.js +0 -181
  187. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-set-size.js +0 -106
  188. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-single-call.js +0 -188
  189. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-spread.js +0 -521
  190. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-raw.js +0 -149
  191. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-replace-all.js +0 -180
  192. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-slice.js +0 -180
  193. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-starts-ends-with.js +0 -201
  194. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-string-trim-start-end.js +0 -46
  195. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-structured-clone.js +0 -149
  196. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-switch.js +0 -357
  197. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-ternary.js +0 -288
  198. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-top-level-await.js +0 -154
  199. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prefer-type-error.js +0 -169
  200. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/prevent-abbreviations.js +0 -655
  201. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/relative-url-style.js +0 -171
  202. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-array-join-separator.js +0 -65
  203. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-module-attributes.js +0 -120
  204. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-module-specifiers.js +0 -158
  205. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-number-to-fixed-digits-argument.js +0 -55
  206. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/require-post-message-target-origin.js +0 -74
  207. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/get-documentation-url.js +0 -9
  208. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/index.js +0 -9
  209. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-create.js +0 -51
  210. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-listener.js +0 -40
  211. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-problem.js +0 -38
  212. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-rule-fixer.js +0 -49
  213. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-rule.js +0 -38
  214. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/to-eslint-rules.js +0 -13
  215. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/unicorn-context.js +0 -36
  216. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/unicorn-listeners.js +0 -65
  217. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/rule/utilities.js +0 -27
  218. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/abbreviations.js +0 -270
  219. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/builtin-errors.js +0 -14
  220. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/dom-events.js +0 -275
  221. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/event-keys.js +0 -54
  222. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/negative-index.js +0 -52
  223. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/no-array-mutate-rule.js +0 -139
  224. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/no-unnecessary-length-or-infinity-rule.js +0 -80
  225. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/package-json.js +0 -42
  226. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/simple-array-search-rule.js +0 -126
  227. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/shared/typed-array.js +0 -17
  228. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/string-content.js +0 -192
  229. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/switch-case-braces.js +0 -114
  230. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/template-indent.js +0 -219
  231. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/text-encoding-identifier-case.js +0 -130
  232. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/throw-new-error.js +0 -60
  233. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/array-or-object-prototype-property.js +0 -57
  234. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/assert-token.js +0 -29
  235. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/boolean.js +0 -88
  236. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/builtins.js +0 -30
  237. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/cartesian-product-samples.js +0 -22
  238. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/create-deprecated-rules.js +0 -29
  239. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/escape-string.js +0 -24
  240. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/escape-template-element-raw.js +0 -6
  241. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-ancestor.js +0 -15
  242. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-available-variable-name.js +0 -147
  243. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-builtin-rule.js +0 -5
  244. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-call-expression-arguments-text.js +0 -36
  245. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-call-or-new-expression-tokens.js +0 -67
  246. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-class-head-location.js +0 -22
  247. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-documentation-url.js +0 -9
  248. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-indent-string.js +0 -18
  249. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-references.js +0 -5
  250. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-scopes.js +0 -12
  251. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-sibling-node.js +0 -38
  252. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-switch-case-head-location.js +0 -22
  253. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-token-store.js +0 -24
  254. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/get-variable-identifiers.js +0 -7
  255. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/global-reference-tracker.js +0 -68
  256. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/has-optional-chain-element.js +0 -17
  257. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/has-same-range.js +0 -7
  258. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/index.js +0 -59
  259. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-function-self-used-inside.js +0 -39
  260. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-left-hand-side.js +0 -20
  261. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-logical-expression.js +0 -14
  262. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-method-named.js +0 -7
  263. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-new-expression-with-parentheses.js +0 -28
  264. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-node-matches.js +0 -58
  265. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-node-value-not-dom-node.js +0 -20
  266. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-node-value-not-function.js +0 -40
  267. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-number.js +0 -224
  268. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-object-method.js +0 -10
  269. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-on-same-line.js +0 -7
  270. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-same-identifier.js +0 -5
  271. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-same-reference.js +0 -170
  272. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-export-local.js +0 -8
  273. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-import-local.js +0 -8
  274. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-property-assignment-pattern-left.js +0 -8
  275. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-shorthand-property-value.js +0 -6
  276. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-unresolved-variable.js +0 -14
  277. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/is-value-not-usable.js +0 -5
  278. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/needs-semicolon.js +0 -118
  279. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/numeric.js +0 -49
  280. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/parentheses.js +0 -71
  281. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/resolve-variable-name.js +0 -18
  282. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/rule.js +0 -27
  283. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-await-expression-argument.js +0 -17
  284. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-call-expression-callee.js +0 -18
  285. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-conditional-expression-child.js +0 -13
  286. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-expression-statement-expression.js +0 -22
  287. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-logical-expression-child.js +0 -43
  288. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-member-expression-object.js +0 -47
  289. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-new-expression-callee.js +0 -28
  290. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/should-add-parentheses-to-unary-expression.js +0 -24
  291. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/singular.js +0 -16
  292. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/string-cases.js +0 -2
  293. package/packages/config-eslint/node_modules/eslint-plugin-unicorn/rules/utils/to-location.js +0 -25
@@ -1,328 +0,0 @@
1
- export type VisitTraversalStep = $eslintcore.VisitTraversalStep;
2
- export type CallTraversalStep = $eslintcore.CallTraversalStep;
3
- export type TraversalStep = $eslintcore.TraversalStep;
4
- export type SourceLocation = $eslintcore.SourceLocation;
5
- export type SourceLocationWithOffset = $eslintcore.SourceLocationWithOffset;
6
- export type SourceRange = $eslintcore.SourceRange;
7
- export type IDirective = $eslintcore.Directive;
8
- export type DirectiveType = $eslintcore.DirectiveType;
9
- export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions;
10
- /**
11
- * <Options>
12
- */
13
- export type TextSourceCode<Options extends SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions> = import("@eslint/core").TextSourceCode<Options>;
14
- export type RuleConfig = $eslintcore.RuleConfig;
15
- export type RulesConfig = $eslintcore.RulesConfig;
16
- export type StringConfig = $typests.StringConfig;
17
- export type BooleanConfig = $typests.BooleanConfig;
18
- /**
19
- * A class to represent a step in the traversal process where a
20
- * method is called.
21
- * @implements {CallTraversalStep}
22
- */
23
- export class CallMethodStep implements CallTraversalStep {
24
- /**
25
- * Creates a new instance.
26
- * @param {Object} options The options for the step.
27
- * @param {string} options.target The target of the step.
28
- * @param {Array<any>} options.args The arguments of the step.
29
- */
30
- constructor({ target, args }: {
31
- target: string;
32
- args: Array<any>;
33
- });
34
- /**
35
- * The type of the step.
36
- * @type {"call"}
37
- * @readonly
38
- */
39
- readonly type: "call";
40
- /**
41
- * The kind of the step. Represents the same data as the `type` property
42
- * but it's a number for performance.
43
- * @type {2}
44
- * @readonly
45
- */
46
- readonly kind: 2;
47
- /**
48
- * The name of the method to call.
49
- * @type {string}
50
- */
51
- target: string;
52
- /**
53
- * The arguments to pass to the method.
54
- * @type {Array<any>}
55
- */
56
- args: Array<any>;
57
- }
58
- /**
59
- * Object to parse ESLint configuration comments.
60
- */
61
- export class ConfigCommentParser {
62
- /**
63
- * Parses a list of "name:string_value" or/and "name" options divided by comma or
64
- * whitespace. Used for "global" comments.
65
- * @param {string} string The string to parse.
66
- * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided.
67
- */
68
- parseStringConfig(string: string): StringConfig;
69
- /**
70
- * Parses a JSON-like config.
71
- * @param {string} string The string to parse.
72
- * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object
73
- */
74
- parseJSONLikeConfig(string: string): ({
75
- ok: true;
76
- config: RulesConfig;
77
- } | {
78
- ok: false;
79
- error: {
80
- message: string;
81
- };
82
- });
83
- /**
84
- * Parses a config of values separated by comma.
85
- * @param {string} string The string to parse.
86
- * @returns {BooleanConfig} Result map of values and true values
87
- */
88
- parseListConfig(string: string): BooleanConfig;
89
- /**
90
- * Parses a directive comment into directive text and value.
91
- * @param {string} string The string with the directive to be parsed.
92
- * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid.
93
- */
94
- parseDirective(string: string): DirectiveComment | undefined;
95
- #private;
96
- }
97
- /**
98
- * A class to represent a directive comment.
99
- * @implements {IDirective}
100
- */
101
- export class Directive implements IDirective {
102
- /**
103
- * Creates a new instance.
104
- * @param {Object} options The options for the directive.
105
- * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive.
106
- * @param {unknown} options.node The node representing the directive.
107
- * @param {string} options.value The value of the directive.
108
- * @param {string} options.justification The justification for the directive.
109
- */
110
- constructor({ type, node, value, justification }: {
111
- type: "disable" | "enable" | "disable-next-line" | "disable-line";
112
- node: unknown;
113
- value: string;
114
- justification: string;
115
- });
116
- /**
117
- * The type of directive.
118
- * @type {DirectiveType}
119
- * @readonly
120
- */
121
- readonly type: DirectiveType;
122
- /**
123
- * The node representing the directive.
124
- * @type {unknown}
125
- * @readonly
126
- */
127
- readonly node: unknown;
128
- /**
129
- * Everything after the "eslint-disable" portion of the directive,
130
- * but before the "--" that indicates the justification.
131
- * @type {string}
132
- * @readonly
133
- */
134
- readonly value: string;
135
- /**
136
- * The justification for the directive.
137
- * @type {string}
138
- * @readonly
139
- */
140
- readonly justification: string;
141
- }
142
- /**
143
- * Source Code Base Object
144
- * @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}]
145
- * @implements {TextSourceCode<Options>}
146
- */
147
- export class TextSourceCodeBase<Options extends SourceCodeBaseTypeOptions & {
148
- RootNode: object;
149
- SyntaxElementWithLoc: object;
150
- } = $eslintcore.SourceCodeBaseTypeOptions & {
151
- RootNode: object;
152
- SyntaxElementWithLoc: object;
153
- }> implements TextSourceCode<Options> {
154
- /**
155
- * Creates a new instance.
156
- * @param {Object} options The options for the instance.
157
- * @param {string} options.text The source code text.
158
- * @param {Options['RootNode']} options.ast The root AST node.
159
- * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`.
160
- */
161
- constructor({ text, ast, lineEndingPattern }: {
162
- text: string;
163
- ast: Options["RootNode"];
164
- lineEndingPattern?: RegExp;
165
- });
166
- /**
167
- * The AST of the source code.
168
- * @type {Options['RootNode']}
169
- */
170
- ast: Options["RootNode"];
171
- /**
172
- * The text of the source code.
173
- * @type {string}
174
- */
175
- text: string;
176
- /**
177
- * Returns the loc information for the given node or token.
178
- * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for.
179
- * @returns {SourceLocation} The loc information for the node or token.
180
- * @throws {Error} If the node or token does not have loc information.
181
- */
182
- getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation;
183
- /**
184
- * Converts a source text index into a `{ line: number, column: number }` pair.
185
- * @param {number} index The index of a character in a file.
186
- * @throws {TypeError|RangeError} If non-numeric index or index out of range.
187
- * @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language.
188
- * @public
189
- */
190
- public getLocFromIndex(index: number): {
191
- line: number;
192
- column: number;
193
- };
194
- /**
195
- * Converts a `{ line: number, column: number }` pair into a source text index.
196
- * @param {Object} loc A line/column location.
197
- * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.)
198
- * @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.)
199
- * @throws {TypeError|RangeError} If `loc` is not an object with a numeric
200
- * `line` and `column`, if the `line` is less than or equal to zero or
201
- * the `line` or `column` is out of the expected range.
202
- * @returns {number} The index of the line/column location in a file.
203
- * @public
204
- */
205
- public getIndexFromLoc(loc: {
206
- line: number;
207
- column: number;
208
- }): number;
209
- /**
210
- * Returns the range information for the given node or token.
211
- * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for.
212
- * @returns {SourceRange} The range information for the node or token.
213
- * @throws {Error} If the node or token does not have range information.
214
- */
215
- getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange;
216
- /**
217
- * Returns the parent of the given node.
218
- * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of.
219
- * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node.
220
- * @throws {Error} If the method is not implemented in the subclass.
221
- */
222
- getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined;
223
- /**
224
- * Gets all the ancestors of a given node
225
- * @param {Options['SyntaxElementWithLoc']} node The node
226
- * @returns {Array<Options['SyntaxElementWithLoc']>} All the ancestor nodes in the AST, not including the provided node, starting
227
- * from the root node at index 0 and going inwards to the parent node.
228
- * @throws {TypeError} When `node` is missing.
229
- */
230
- getAncestors(node: Options["SyntaxElementWithLoc"]): Array<Options["SyntaxElementWithLoc"]>;
231
- /**
232
- * Gets the source code for the given node.
233
- * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for.
234
- * @param {number} [beforeCount] The number of characters before the node to retrieve.
235
- * @param {number} [afterCount] The number of characters after the node to retrieve.
236
- * @returns {string} The text representing the AST node.
237
- * @public
238
- */
239
- public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string;
240
- /**
241
- * Gets the entire source text split into an array of lines.
242
- * @returns {Array<string>} The source text as an array of lines.
243
- * @public
244
- */
245
- public get lines(): Array<string>;
246
- /**
247
- * Traverse the source code and return the steps that were taken.
248
- * @returns {Iterable<TraversalStep>} The steps that were taken while traversing the source code.
249
- */
250
- traverse(): Iterable<TraversalStep>;
251
- #private;
252
- }
253
- /**
254
- * A class to represent a step in the traversal process where a node is visited.
255
- * @implements {VisitTraversalStep}
256
- */
257
- export class VisitNodeStep implements VisitTraversalStep {
258
- /**
259
- * Creates a new instance.
260
- * @param {Object} options The options for the step.
261
- * @param {object} options.target The target of the step.
262
- * @param {1|2} options.phase The phase of the step.
263
- * @param {Array<any>} options.args The arguments of the step.
264
- */
265
- constructor({ target, phase, args }: {
266
- target: object;
267
- phase: 1 | 2;
268
- args: Array<any>;
269
- });
270
- /**
271
- * The type of the step.
272
- * @type {"visit"}
273
- * @readonly
274
- */
275
- readonly type: "visit";
276
- /**
277
- * The kind of the step. Represents the same data as the `type` property
278
- * but it's a number for performance.
279
- * @type {1}
280
- * @readonly
281
- */
282
- readonly kind: 1;
283
- /**
284
- * The target of the step.
285
- * @type {object}
286
- */
287
- target: object;
288
- /**
289
- * The phase of the step.
290
- * @type {1|2}
291
- */
292
- phase: 1 | 2;
293
- /**
294
- * The arguments of the step.
295
- * @type {Array<any>}
296
- */
297
- args: Array<any>;
298
- }
299
- import type * as $eslintcore from "@eslint/core";
300
- import type * as $typests from "./types.cts";
301
- /**
302
- * Represents a directive comment.
303
- */
304
- declare class DirectiveComment {
305
- /**
306
- * Creates a new directive comment.
307
- * @param {string} label The label of the directive.
308
- * @param {string} value The value of the directive.
309
- * @param {string} justification The justification of the directive.
310
- */
311
- constructor(label: string, value: string, justification: string);
312
- /**
313
- * The label of the directive, such as "eslint", "eslint-disable", etc.
314
- * @type {string}
315
- */
316
- label: string;
317
- /**
318
- * The value of the directive (the string after the label).
319
- * @type {string}
320
- */
321
- value: string;
322
- /**
323
- * The justification of the directive (the string after the --).
324
- * @type {string}
325
- */
326
- justification: string;
327
- }
328
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * @fileoverview Types for the plugin-kit package.
3
- * @author Nicholas C. Zakas
4
- */
5
-
6
- export type StringConfig = Record<string, string | null>;
7
- export type BooleanConfig = Record<string, boolean>;
@@ -1,328 +0,0 @@
1
- export type VisitTraversalStep = $eslintcore.VisitTraversalStep;
2
- export type CallTraversalStep = $eslintcore.CallTraversalStep;
3
- export type TraversalStep = $eslintcore.TraversalStep;
4
- export type SourceLocation = $eslintcore.SourceLocation;
5
- export type SourceLocationWithOffset = $eslintcore.SourceLocationWithOffset;
6
- export type SourceRange = $eslintcore.SourceRange;
7
- export type IDirective = $eslintcore.Directive;
8
- export type DirectiveType = $eslintcore.DirectiveType;
9
- export type SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions;
10
- /**
11
- * <Options>
12
- */
13
- export type TextSourceCode<Options extends SourceCodeBaseTypeOptions = $eslintcore.SourceCodeBaseTypeOptions> = import("@eslint/core").TextSourceCode<Options>;
14
- export type RuleConfig = $eslintcore.RuleConfig;
15
- export type RulesConfig = $eslintcore.RulesConfig;
16
- export type StringConfig = $typests.StringConfig;
17
- export type BooleanConfig = $typests.BooleanConfig;
18
- /**
19
- * A class to represent a step in the traversal process where a
20
- * method is called.
21
- * @implements {CallTraversalStep}
22
- */
23
- export class CallMethodStep implements CallTraversalStep {
24
- /**
25
- * Creates a new instance.
26
- * @param {Object} options The options for the step.
27
- * @param {string} options.target The target of the step.
28
- * @param {Array<any>} options.args The arguments of the step.
29
- */
30
- constructor({ target, args }: {
31
- target: string;
32
- args: Array<any>;
33
- });
34
- /**
35
- * The type of the step.
36
- * @type {"call"}
37
- * @readonly
38
- */
39
- readonly type: "call";
40
- /**
41
- * The kind of the step. Represents the same data as the `type` property
42
- * but it's a number for performance.
43
- * @type {2}
44
- * @readonly
45
- */
46
- readonly kind: 2;
47
- /**
48
- * The name of the method to call.
49
- * @type {string}
50
- */
51
- target: string;
52
- /**
53
- * The arguments to pass to the method.
54
- * @type {Array<any>}
55
- */
56
- args: Array<any>;
57
- }
58
- /**
59
- * Object to parse ESLint configuration comments.
60
- */
61
- export class ConfigCommentParser {
62
- /**
63
- * Parses a list of "name:string_value" or/and "name" options divided by comma or
64
- * whitespace. Used for "global" comments.
65
- * @param {string} string The string to parse.
66
- * @returns {StringConfig} Result map object of names and string values, or null values if no value was provided.
67
- */
68
- parseStringConfig(string: string): StringConfig;
69
- /**
70
- * Parses a JSON-like config.
71
- * @param {string} string The string to parse.
72
- * @returns {({ok: true, config: RulesConfig}|{ok: false, error: {message: string}})} Result map object
73
- */
74
- parseJSONLikeConfig(string: string): ({
75
- ok: true;
76
- config: RulesConfig;
77
- } | {
78
- ok: false;
79
- error: {
80
- message: string;
81
- };
82
- });
83
- /**
84
- * Parses a config of values separated by comma.
85
- * @param {string} string The string to parse.
86
- * @returns {BooleanConfig} Result map of values and true values
87
- */
88
- parseListConfig(string: string): BooleanConfig;
89
- /**
90
- * Parses a directive comment into directive text and value.
91
- * @param {string} string The string with the directive to be parsed.
92
- * @returns {DirectiveComment|undefined} The parsed directive or `undefined` if the directive is invalid.
93
- */
94
- parseDirective(string: string): DirectiveComment | undefined;
95
- #private;
96
- }
97
- /**
98
- * A class to represent a directive comment.
99
- * @implements {IDirective}
100
- */
101
- export class Directive implements IDirective {
102
- /**
103
- * Creates a new instance.
104
- * @param {Object} options The options for the directive.
105
- * @param {"disable"|"enable"|"disable-next-line"|"disable-line"} options.type The type of directive.
106
- * @param {unknown} options.node The node representing the directive.
107
- * @param {string} options.value The value of the directive.
108
- * @param {string} options.justification The justification for the directive.
109
- */
110
- constructor({ type, node, value, justification }: {
111
- type: "disable" | "enable" | "disable-next-line" | "disable-line";
112
- node: unknown;
113
- value: string;
114
- justification: string;
115
- });
116
- /**
117
- * The type of directive.
118
- * @type {DirectiveType}
119
- * @readonly
120
- */
121
- readonly type: DirectiveType;
122
- /**
123
- * The node representing the directive.
124
- * @type {unknown}
125
- * @readonly
126
- */
127
- readonly node: unknown;
128
- /**
129
- * Everything after the "eslint-disable" portion of the directive,
130
- * but before the "--" that indicates the justification.
131
- * @type {string}
132
- * @readonly
133
- */
134
- readonly value: string;
135
- /**
136
- * The justification for the directive.
137
- * @type {string}
138
- * @readonly
139
- */
140
- readonly justification: string;
141
- }
142
- /**
143
- * Source Code Base Object
144
- * @template {SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}} [Options=SourceCodeBaseTypeOptions & {RootNode: object, SyntaxElementWithLoc: object}]
145
- * @implements {TextSourceCode<Options>}
146
- */
147
- export class TextSourceCodeBase<Options extends SourceCodeBaseTypeOptions & {
148
- RootNode: object;
149
- SyntaxElementWithLoc: object;
150
- } = $eslintcore.SourceCodeBaseTypeOptions & {
151
- RootNode: object;
152
- SyntaxElementWithLoc: object;
153
- }> implements TextSourceCode<Options> {
154
- /**
155
- * Creates a new instance.
156
- * @param {Object} options The options for the instance.
157
- * @param {string} options.text The source code text.
158
- * @param {Options['RootNode']} options.ast The root AST node.
159
- * @param {RegExp} [options.lineEndingPattern] The pattern to match lineEndings in the source code. Defaults to `/\r?\n/u`.
160
- */
161
- constructor({ text, ast, lineEndingPattern }: {
162
- text: string;
163
- ast: Options["RootNode"];
164
- lineEndingPattern?: RegExp;
165
- });
166
- /**
167
- * The AST of the source code.
168
- * @type {Options['RootNode']}
169
- */
170
- ast: Options["RootNode"];
171
- /**
172
- * The text of the source code.
173
- * @type {string}
174
- */
175
- text: string;
176
- /**
177
- * Returns the loc information for the given node or token.
178
- * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the loc information for.
179
- * @returns {SourceLocation} The loc information for the node or token.
180
- * @throws {Error} If the node or token does not have loc information.
181
- */
182
- getLoc(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceLocation;
183
- /**
184
- * Converts a source text index into a `{ line: number, column: number }` pair.
185
- * @param {number} index The index of a character in a file.
186
- * @throws {TypeError|RangeError} If non-numeric index or index out of range.
187
- * @returns {{line: number, column: number}} A `{ line: number, column: number }` location object with 0 or 1-indexed line and 0 or 1-indexed column based on language.
188
- * @public
189
- */
190
- public getLocFromIndex(index: number): {
191
- line: number;
192
- column: number;
193
- };
194
- /**
195
- * Converts a `{ line: number, column: number }` pair into a source text index.
196
- * @param {Object} loc A line/column location.
197
- * @param {number} loc.line The line number of the location. (0 or 1-indexed based on language.)
198
- * @param {number} loc.column The column number of the location. (0 or 1-indexed based on language.)
199
- * @throws {TypeError|RangeError} If `loc` is not an object with a numeric
200
- * `line` and `column`, if the `line` is less than or equal to zero or
201
- * the `line` or `column` is out of the expected range.
202
- * @returns {number} The index of the line/column location in a file.
203
- * @public
204
- */
205
- public getIndexFromLoc(loc: {
206
- line: number;
207
- column: number;
208
- }): number;
209
- /**
210
- * Returns the range information for the given node or token.
211
- * @param {Options['SyntaxElementWithLoc']} nodeOrToken The node or token to get the range information for.
212
- * @returns {SourceRange} The range information for the node or token.
213
- * @throws {Error} If the node or token does not have range information.
214
- */
215
- getRange(nodeOrToken: Options["SyntaxElementWithLoc"]): SourceRange;
216
- /**
217
- * Returns the parent of the given node.
218
- * @param {Options['SyntaxElementWithLoc']} node The node to get the parent of.
219
- * @returns {Options['SyntaxElementWithLoc']|undefined} The parent of the node.
220
- * @throws {Error} If the method is not implemented in the subclass.
221
- */
222
- getParent(node: Options["SyntaxElementWithLoc"]): Options["SyntaxElementWithLoc"] | undefined;
223
- /**
224
- * Gets all the ancestors of a given node
225
- * @param {Options['SyntaxElementWithLoc']} node The node
226
- * @returns {Array<Options['SyntaxElementWithLoc']>} All the ancestor nodes in the AST, not including the provided node, starting
227
- * from the root node at index 0 and going inwards to the parent node.
228
- * @throws {TypeError} When `node` is missing.
229
- */
230
- getAncestors(node: Options["SyntaxElementWithLoc"]): Array<Options["SyntaxElementWithLoc"]>;
231
- /**
232
- * Gets the source code for the given node.
233
- * @param {Options['SyntaxElementWithLoc']} [node] The AST node to get the text for.
234
- * @param {number} [beforeCount] The number of characters before the node to retrieve.
235
- * @param {number} [afterCount] The number of characters after the node to retrieve.
236
- * @returns {string} The text representing the AST node.
237
- * @public
238
- */
239
- public getText(node?: Options["SyntaxElementWithLoc"], beforeCount?: number, afterCount?: number): string;
240
- /**
241
- * Gets the entire source text split into an array of lines.
242
- * @returns {Array<string>} The source text as an array of lines.
243
- * @public
244
- */
245
- public get lines(): Array<string>;
246
- /**
247
- * Traverse the source code and return the steps that were taken.
248
- * @returns {Iterable<TraversalStep>} The steps that were taken while traversing the source code.
249
- */
250
- traverse(): Iterable<TraversalStep>;
251
- #private;
252
- }
253
- /**
254
- * A class to represent a step in the traversal process where a node is visited.
255
- * @implements {VisitTraversalStep}
256
- */
257
- export class VisitNodeStep implements VisitTraversalStep {
258
- /**
259
- * Creates a new instance.
260
- * @param {Object} options The options for the step.
261
- * @param {object} options.target The target of the step.
262
- * @param {1|2} options.phase The phase of the step.
263
- * @param {Array<any>} options.args The arguments of the step.
264
- */
265
- constructor({ target, phase, args }: {
266
- target: object;
267
- phase: 1 | 2;
268
- args: Array<any>;
269
- });
270
- /**
271
- * The type of the step.
272
- * @type {"visit"}
273
- * @readonly
274
- */
275
- readonly type: "visit";
276
- /**
277
- * The kind of the step. Represents the same data as the `type` property
278
- * but it's a number for performance.
279
- * @type {1}
280
- * @readonly
281
- */
282
- readonly kind: 1;
283
- /**
284
- * The target of the step.
285
- * @type {object}
286
- */
287
- target: object;
288
- /**
289
- * The phase of the step.
290
- * @type {1|2}
291
- */
292
- phase: 1 | 2;
293
- /**
294
- * The arguments of the step.
295
- * @type {Array<any>}
296
- */
297
- args: Array<any>;
298
- }
299
- import type * as $eslintcore from "@eslint/core";
300
- import type * as $typests from "./types.ts";
301
- /**
302
- * Represents a directive comment.
303
- */
304
- declare class DirectiveComment {
305
- /**
306
- * Creates a new directive comment.
307
- * @param {string} label The label of the directive.
308
- * @param {string} value The value of the directive.
309
- * @param {string} justification The justification of the directive.
310
- */
311
- constructor(label: string, value: string, justification: string);
312
- /**
313
- * The label of the directive, such as "eslint", "eslint-disable", etc.
314
- * @type {string}
315
- */
316
- label: string;
317
- /**
318
- * The value of the directive (the string after the label).
319
- * @type {string}
320
- */
321
- value: string;
322
- /**
323
- * The justification of the directive (the string after the --).
324
- * @type {string}
325
- */
326
- justification: string;
327
- }
328
- export {};