@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,1179 +0,0 @@
1
- /**
2
- * @fileoverview Shared types for ESLint Core.
3
- */
4
- import type { JSONSchema4 } from "json-schema";
5
- /**
6
- * Represents an error inside of a file.
7
- */
8
- export interface FileError {
9
- message: string;
10
- line: number;
11
- column: number;
12
- endLine?: number;
13
- endColumn?: number;
14
- }
15
- /**
16
- * Represents a problem found in a file.
17
- */
18
- export interface FileProblem {
19
- ruleId: string | null;
20
- message: string;
21
- loc: SourceLocation;
22
- }
23
- /**
24
- * Represents the start and end coordinates of a node inside the source.
25
- */
26
- export interface SourceLocation {
27
- start: Position;
28
- end: Position;
29
- }
30
- /**
31
- * Represents the start and end coordinates of a node inside the source with an offset.
32
- */
33
- export interface SourceLocationWithOffset {
34
- start: PositionWithOffset;
35
- end: PositionWithOffset;
36
- }
37
- /**
38
- * Represents a location coordinate inside the source. ESLint-style formats
39
- * have just `line` and `column` while others may have `offset` as well.
40
- */
41
- export interface Position {
42
- line: number;
43
- column: number;
44
- }
45
- /**
46
- * Represents a location coordinate inside the source with an offset.
47
- */
48
- export interface PositionWithOffset extends Position {
49
- offset: number;
50
- }
51
- /**
52
- * Represents a range of characters in the source.
53
- */
54
- export type SourceRange = [number, number];
55
- /**
56
- * What the rule is responsible for finding:
57
- * - `problem` means the rule has noticed a potential error.
58
- * - `suggestion` means the rule suggests an alternate or better approach.
59
- * - `layout` means the rule is looking at spacing, indentation, etc.
60
- */
61
- export type RuleType = "problem" | "suggestion" | "layout";
62
- /**
63
- * The type of fix the rule can provide:
64
- * - `code` means the rule can fix syntax.
65
- * - `whitespace` means the rule can fix spacing and indentation.
66
- */
67
- export type RuleFixType = "code" | "whitespace";
68
- /**
69
- * An object containing visitor information for a rule. Each method is either the
70
- * name of a node type or a selector, or is a method that will be called at specific
71
- * times during the traversal.
72
- */
73
- export type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
74
- /**
75
- * Rule meta information used for documentation.
76
- */
77
- export interface RulesMetaDocs {
78
- /**
79
- * A short description of the rule.
80
- */
81
- description?: string | undefined;
82
- /**
83
- * The URL to the documentation for the rule.
84
- */
85
- url?: string | undefined;
86
- /**
87
- * The category the rule falls under.
88
- * @deprecated No longer used.
89
- */
90
- category?: string | undefined;
91
- /**
92
- * Indicates if the rule is generally recommended for all users.
93
- *
94
- * Note - this will always be a boolean for core rules, but may be used in any way by plugins.
95
- */
96
- recommended?: unknown;
97
- /**
98
- * Indicates if the rule is frozen (no longer accepting feature requests).
99
- */
100
- frozen?: boolean | undefined;
101
- }
102
- /**
103
- * Meta information about a rule.
104
- */
105
- export interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[], ExtRuleDocs = unknown> {
106
- /**
107
- * Properties that are used when documenting the rule.
108
- */
109
- docs?: (RulesMetaDocs & ExtRuleDocs) | undefined;
110
- /**
111
- * The type of rule.
112
- */
113
- type?: RuleType | undefined;
114
- /**
115
- * The schema for the rule options. Required if the rule has options.
116
- */
117
- schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
118
- /**
119
- * Any default options to be recursively merged on top of any user-provided options.
120
- */
121
- defaultOptions?: RuleOptions;
122
- /**
123
- * The messages that the rule can report.
124
- */
125
- messages?: Record<MessageIds, string>;
126
- /**
127
- * Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
128
- */
129
- deprecated?: boolean | DeprecatedInfo | undefined;
130
- /**
131
- * @deprecated Use deprecated.replacedBy instead.
132
- * The name of the rule(s) this rule was replaced by, if it was deprecated.
133
- */
134
- replacedBy?: readonly string[] | undefined;
135
- /**
136
- * Indicates if the rule is fixable, and if so, what type of fix it provides.
137
- */
138
- fixable?: RuleFixType | undefined;
139
- /**
140
- * Indicates if the rule may provide suggestions.
141
- */
142
- hasSuggestions?: boolean | undefined;
143
- /**
144
- * The language the rule is intended to lint.
145
- */
146
- language?: string;
147
- /**
148
- * The dialects of `language` that the rule is intended to lint.
149
- */
150
- dialects?: string[];
151
- }
152
- /**
153
- * Provides additional metadata about a deprecation.
154
- */
155
- export interface DeprecatedInfo {
156
- /**
157
- * General message presented to the user, e.g. for the key rule why the rule
158
- * is deprecated or for info how to replace the rule.
159
- */
160
- message?: string;
161
- /**
162
- * URL to more information about this deprecation in general.
163
- */
164
- url?: string;
165
- /**
166
- * An empty array explicitly states that there is no replacement.
167
- */
168
- replacedBy?: ReplacedByInfo[];
169
- /**
170
- * The package version since when the rule is deprecated (should use full
171
- * semver without a leading "v").
172
- */
173
- deprecatedSince?: string;
174
- /**
175
- * The estimated version when the rule is removed (probably the next major
176
- * version). null means the rule is "frozen" (will be available but will not
177
- * be changed).
178
- */
179
- availableUntil?: string | null;
180
- }
181
- /**
182
- * Provides metadata about a replacement
183
- */
184
- export interface ReplacedByInfo {
185
- /**
186
- * General message presented to the user, e.g. how to replace the rule
187
- */
188
- message?: string;
189
- /**
190
- * URL to more information about this replacement in general
191
- */
192
- url?: string;
193
- /**
194
- * Name should be "eslint" if the replacement is an ESLint core rule. Omit
195
- * the property if the replacement is in the same plugin.
196
- */
197
- plugin?: ExternalSpecifier;
198
- /**
199
- * Name and documentation of the replacement rule
200
- */
201
- rule?: ExternalSpecifier;
202
- }
203
- /**
204
- * Specifies the name and url of an external resource. At least one property
205
- * should be set.
206
- */
207
- export interface ExternalSpecifier {
208
- /**
209
- * Name of the referenced plugin / rule.
210
- */
211
- name?: string;
212
- /**
213
- * URL pointing to documentation for the plugin / rule.
214
- */
215
- url?: string;
216
- }
217
- /**
218
- * Generic type for `RuleContext`.
219
- */
220
- export interface RuleContextTypeOptions {
221
- LangOptions: LanguageOptions;
222
- Code: SourceCode;
223
- RuleOptions: unknown[];
224
- Node: unknown;
225
- MessageIds: string;
226
- }
227
- /**
228
- * Represents the context object that is passed to a rule. This object contains
229
- * information about the current state of the linting process and is the rule's
230
- * view into the outside world.
231
- */
232
- export interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOptions> {
233
- /**
234
- * The current working directory for the session.
235
- */
236
- cwd: string;
237
- /**
238
- * Returns the current working directory for the session.
239
- * @deprecated Use `cwd` instead.
240
- */
241
- getCwd(): string;
242
- /**
243
- * The filename of the file being linted.
244
- */
245
- filename: string;
246
- /**
247
- * Returns the filename of the file being linted.
248
- * @deprecated Use `filename` instead.
249
- */
250
- getFilename(): string;
251
- /**
252
- * The physical filename of the file being linted.
253
- */
254
- physicalFilename: string;
255
- /**
256
- * Returns the physical filename of the file being linted.
257
- * @deprecated Use `physicalFilename` instead.
258
- */
259
- getPhysicalFilename(): string;
260
- /**
261
- * The source code object that the rule is running on.
262
- */
263
- sourceCode: Options["Code"];
264
- /**
265
- * Returns the source code object that the rule is running on.
266
- * @deprecated Use `sourceCode` instead.
267
- */
268
- getSourceCode(): Options["Code"];
269
- /**
270
- * Shared settings for the configuration.
271
- */
272
- settings: SettingsConfig;
273
- /**
274
- * Parser-specific options for the configuration.
275
- * @deprecated Use `languageOptions.parserOptions` instead.
276
- */
277
- parserOptions: Record<string, unknown>;
278
- /**
279
- * The language options for the configuration.
280
- */
281
- languageOptions: Options["LangOptions"];
282
- /**
283
- * The CommonJS path to the parser used while parsing this file.
284
- * @deprecated No longer used.
285
- */
286
- parserPath: string | undefined;
287
- /**
288
- * The rule ID.
289
- */
290
- id: string;
291
- /**
292
- * The rule's configured options.
293
- */
294
- options: Options["RuleOptions"];
295
- /**
296
- * The report function that the rule should use to report problems.
297
- * @param violation The violation to report.
298
- */
299
- report(violation: ViolationReport<Options["Node"], Options["MessageIds"]>): void;
300
- }
301
- /**
302
- * Manager of text edits for a rule fix.
303
- */
304
- export interface RuleTextEditor<EditableSyntaxElement = unknown> {
305
- /**
306
- * Inserts text after the specified node or token.
307
- * @param syntaxElement The node or token to insert after.
308
- * @param text The edit to insert after the node or token.
309
- */
310
- insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
311
- /**
312
- * Inserts text after the specified range.
313
- * @param range The range to insert after.
314
- * @param text The edit to insert after the range.
315
- */
316
- insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit;
317
- /**
318
- * Inserts text before the specified node or token.
319
- * @param syntaxElement A syntax element with location information to insert before.
320
- * @param text The edit to insert before the node or token.
321
- */
322
- insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
323
- /**
324
- * Inserts text before the specified range.
325
- * @param range The range to insert before.
326
- * @param text The edit to insert before the range.
327
- */
328
- insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit;
329
- /**
330
- * Removes the specified node or token.
331
- * @param syntaxElement A syntax element with location information to remove.
332
- * @returns The edit to remove the node or token.
333
- */
334
- remove(syntaxElement: EditableSyntaxElement): RuleTextEdit;
335
- /**
336
- * Removes the specified range.
337
- * @param range The range to remove.
338
- * @returns The edit to remove the range.
339
- */
340
- removeRange(range: SourceRange): RuleTextEdit;
341
- /**
342
- * Replaces the specified node or token with the given text.
343
- * @param syntaxElement A syntax element with location information to replace.
344
- * @param text The text to replace the node or token with.
345
- * @returns The edit to replace the node or token.
346
- */
347
- replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
348
- /**
349
- * Replaces the specified range with the given text.
350
- * @param range The range to replace.
351
- * @param text The text to replace the range with.
352
- * @returns The edit to replace the range.
353
- */
354
- replaceTextRange(range: SourceRange, text: string): RuleTextEdit;
355
- }
356
- /**
357
- * Represents a fix for a rule violation implemented as a text edit.
358
- */
359
- export interface RuleTextEdit {
360
- /**
361
- * The range to replace.
362
- */
363
- range: SourceRange;
364
- /**
365
- * The text to insert.
366
- */
367
- text: string;
368
- }
369
- /**
370
- * Fixes a violation.
371
- * @param fixer The text editor to apply the fix.
372
- * @returns The fix(es) for the violation.
373
- */
374
- export type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
375
- export interface ViolationReportBase {
376
- /**
377
- * The data to insert into the message.
378
- */
379
- data?: Record<string, unknown> | undefined;
380
- /**
381
- * The fix to be applied for the violation.
382
- */
383
- fix?: RuleFixer | null | undefined;
384
- /**
385
- * An array of suggested fixes for the problem. These fixes may change the
386
- * behavior of the code, so they are not applied automatically.
387
- */
388
- suggest?: SuggestedEdit[] | null | undefined;
389
- }
390
- export type ViolationMessage<MessageIds = string> = {
391
- message: string;
392
- } | {
393
- messageId: MessageIds;
394
- };
395
- export type ViolationLocation<Node> = {
396
- loc: SourceLocation | Position;
397
- } | {
398
- node: Node;
399
- };
400
- export type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
401
- export interface SuggestedEditBase {
402
- /**
403
- * The data to insert into the message.
404
- */
405
- data?: Record<string, unknown> | undefined;
406
- /**
407
- * The fix to be applied for the suggestion.
408
- */
409
- fix: RuleFixer;
410
- }
411
- export type SuggestionMessage = {
412
- desc: string;
413
- } | {
414
- messageId: string;
415
- };
416
- /**
417
- * A suggested edit for a rule violation.
418
- */
419
- export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
420
- /**
421
- * The normalized version of a lint suggestion.
422
- */
423
- export interface LintSuggestion {
424
- /** A short description. */
425
- desc: string;
426
- /** Fix result info. */
427
- fix: RuleTextEdit;
428
- /** Id referencing a message for the description. */
429
- messageId?: string | undefined;
430
- }
431
- /**
432
- * The normalized version of a lint violation message.
433
- */
434
- export interface LintMessage {
435
- /** The 1-based column number. */
436
- column: number;
437
- /** The 1-based line number. */
438
- line: number;
439
- /** The 1-based column number of the end location. */
440
- endColumn?: number | undefined;
441
- /** The 1-based line number of the end location. */
442
- endLine?: number | undefined;
443
- /** The ID of the rule which makes this message. */
444
- ruleId: string | null;
445
- /** The reported message. */
446
- message: string;
447
- /** The ID of the message in the rule's meta. */
448
- messageId?: string | undefined;
449
- /**
450
- * Type of node.
451
- * @deprecated `nodeType` is deprecated and will be removed in the next major version.
452
- */
453
- nodeType?: string | undefined;
454
- /** If `true` then this is a fatal error. */
455
- fatal?: true | undefined;
456
- /** The severity of this message. */
457
- severity: Exclude<SeverityLevel, 0>;
458
- /** Information for autofix. */
459
- fix?: RuleTextEdit | undefined;
460
- /** Information for suggestions. */
461
- suggestions?: LintSuggestion[] | undefined;
462
- }
463
- /**
464
- * Generic options for the `RuleDefinition` type.
465
- */
466
- export interface RuleDefinitionTypeOptions {
467
- LangOptions: LanguageOptions;
468
- Code: SourceCode;
469
- RuleOptions: unknown[];
470
- Visitor: RuleVisitor;
471
- Node: unknown;
472
- MessageIds: string;
473
- ExtRuleDocs: unknown;
474
- }
475
- /**
476
- * The definition of an ESLint rule.
477
- */
478
- export interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinitionTypeOptions> {
479
- /**
480
- * The meta information for the rule.
481
- */
482
- meta?: RulesMeta<Options["MessageIds"], Options["RuleOptions"], Options["ExtRuleDocs"]>;
483
- /**
484
- * Creates the visitor that ESLint uses to apply the rule during traversal.
485
- * @param context The rule context.
486
- * @returns The rule visitor.
487
- */
488
- create(context: RuleContext<{
489
- LangOptions: Options["LangOptions"];
490
- Code: Options["Code"];
491
- RuleOptions: Options["RuleOptions"];
492
- Node: Options["Node"];
493
- MessageIds: Options["MessageIds"];
494
- }>): Options["Visitor"];
495
- }
496
- /**
497
- * Defaults for non-language-related `RuleDefinition` options.
498
- */
499
- export interface CustomRuleTypeDefinitions {
500
- RuleOptions: unknown[];
501
- MessageIds: string;
502
- ExtRuleDocs: Record<string, unknown>;
503
- }
504
- /**
505
- * A helper type to define language specific specializations of the `RuleDefinition` type.
506
- *
507
- * @example
508
- * ```ts
509
- * type YourRuleDefinition<
510
- * Options extends Partial<CustomRuleTypeDefinitions> = {},
511
- * > = CustomRuleDefinitionType<
512
- * {
513
- * LangOptions: YourLanguageOptions;
514
- * Code: YourSourceCode;
515
- * Visitor: YourRuleVisitor;
516
- * Node: YourNode;
517
- * },
518
- * Options
519
- * >;
520
- * ```
521
- */
522
- export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = RuleDefinition<LanguageSpecificOptions & Required<Options & Omit<CustomRuleTypeDefinitions, keyof Options>>>;
523
- /**
524
- * The human readable severity level used in a configuration.
525
- */
526
- export type SeverityName = "off" | "warn" | "error";
527
- /**
528
- * The numeric severity level for a rule.
529
- *
530
- * - `0` means off.
531
- * - `1` means warn.
532
- * - `2` means error.
533
- */
534
- export type SeverityLevel = 0 | 1 | 2;
535
- /**
536
- * The severity of a rule in a configuration.
537
- */
538
- export type Severity = SeverityName | SeverityLevel;
539
- /**
540
- * Represents the metadata for an object, such as a plugin or processor.
541
- */
542
- export interface ObjectMetaProperties {
543
- /** @deprecated Use `meta.name` instead. */
544
- name?: string | undefined;
545
- /** @deprecated Use `meta.version` instead. */
546
- version?: string | undefined;
547
- meta?: {
548
- name?: string | undefined;
549
- version?: string | undefined;
550
- };
551
- }
552
- /**
553
- * Represents the configuration options for the core linter.
554
- */
555
- export interface LinterOptionsConfig {
556
- /**
557
- * Indicates whether or not inline configuration is evaluated.
558
- */
559
- noInlineConfig?: boolean;
560
- /**
561
- * Indicates what to do when an unused disable directive is found.
562
- */
563
- reportUnusedDisableDirectives?: boolean | Severity;
564
- /**
565
- * A severity value indicating if and how unused inline configs should be
566
- * tracked and reported.
567
- */
568
- reportUnusedInlineConfigs?: Severity;
569
- }
570
- /**
571
- * The configuration for a rule.
572
- */
573
- export type RuleConfig<RuleOptions extends unknown[] = unknown[]> = Severity | [Severity, ...Partial<RuleOptions>];
574
- /**
575
- * A collection of rules and their configurations.
576
- */
577
- export interface RulesConfig {
578
- [key: string]: RuleConfig;
579
- }
580
- /**
581
- * A collection of settings.
582
- */
583
- export interface SettingsConfig {
584
- [key: string]: unknown;
585
- }
586
- /**
587
- * The configuration for a set of files.
588
- */
589
- export interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
590
- /**
591
- * A string to identify the configuration object. Used in error messages and
592
- * inspection tools.
593
- */
594
- name?: string;
595
- /**
596
- * Path to the directory where the configuration object should apply.
597
- * `files` and `ignores` patterns in the configuration object are
598
- * interpreted as relative to this path.
599
- */
600
- basePath?: string;
601
- /**
602
- * An array of glob patterns indicating the files that the configuration
603
- * object should apply to. If not specified, the configuration object applies
604
- * to all files
605
- */
606
- files?: (string | string[])[];
607
- /**
608
- * An array of glob patterns indicating the files that the configuration
609
- * object should not apply to. If not specified, the configuration object
610
- * applies to all files matched by files
611
- */
612
- ignores?: string[];
613
- /**
614
- * The name of the language used for linting. This is used to determine the
615
- * parser and other language-specific settings.
616
- * @since 9.7.0
617
- */
618
- language?: string;
619
- /**
620
- * An object containing settings related to how the language is configured for
621
- * linting.
622
- */
623
- languageOptions?: LanguageOptions;
624
- /**
625
- * An object containing settings related to the linting process
626
- */
627
- linterOptions?: LinterOptionsConfig;
628
- /**
629
- * Either an object containing preprocess() and postprocess() methods or a
630
- * string indicating the name of a processor inside of a plugin
631
- * (i.e., "pluginName/processorName").
632
- */
633
- processor?: string | Processor;
634
- /**
635
- * An object containing a name-value mapping of plugin names to plugin objects.
636
- * When files is specified, these plugins are only available to the matching files.
637
- */
638
- plugins?: Record<string, Plugin>;
639
- /**
640
- * An object containing the configured rules. When files or ignores are specified,
641
- * these rule configurations are only available to the matching files.
642
- */
643
- rules?: Partial<Rules>;
644
- /**
645
- * An object containing name-value pairs of information that should be
646
- * available to all rules.
647
- */
648
- settings?: Record<string, unknown>;
649
- }
650
- /** @deprecated Only supported in legacy eslintrc config format. */
651
- export type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
652
- /** @deprecated Only supported in legacy eslintrc config format. */
653
- export interface GlobalsConfig {
654
- [name: string]: GlobalAccess;
655
- }
656
- /**
657
- * The ECMAScript version of the code being linted.
658
- * @deprecated Only supported in legacy eslintrc config format.
659
- */
660
- export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest";
661
- /**
662
- * The type of JavaScript source code.
663
- * @deprecated Only supported in legacy eslintrc config format.
664
- */
665
- export type JavaScriptSourceType = "script" | "module" | "commonjs";
666
- /**
667
- * Parser options.
668
- * @deprecated Only supported in legacy eslintrc config format.
669
- * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
670
- */
671
- export interface JavaScriptParserOptionsConfig {
672
- /**
673
- * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
674
- *
675
- * @default false
676
- */
677
- allowReserved?: boolean | undefined;
678
- /**
679
- * Accepts any valid ECMAScript version number or `'latest'`:
680
- *
681
- * - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or
682
- * - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or
683
- * - `'latest'`
684
- *
685
- * When it's a version or a year, the value must be a number - so do not include the `es` prefix.
686
- *
687
- * Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default
688
- *
689
- * @default 5
690
- */
691
- ecmaVersion?: EcmaVersion | undefined;
692
- /**
693
- * The type of JavaScript source code. Possible values are "script" for
694
- * traditional script files, "module" for ECMAScript modules (ESM), and
695
- * "commonjs" for CommonJS files.
696
- *
697
- * @default 'script'
698
- *
699
- * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
700
- */
701
- sourceType?: JavaScriptSourceType | undefined;
702
- /**
703
- * An object indicating which additional language features you'd like to use.
704
- *
705
- * @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
706
- */
707
- ecmaFeatures?: {
708
- globalReturn?: boolean | undefined;
709
- impliedStrict?: boolean | undefined;
710
- jsx?: boolean | undefined;
711
- experimentalObjectRestSpread?: boolean | undefined;
712
- [key: string]: any;
713
- } | undefined;
714
- [key: string]: any;
715
- }
716
- /** @deprecated Only supported in legacy eslintrc config format. */
717
- export interface EnvironmentConfig {
718
- /** The definition of global variables. */
719
- globals?: GlobalsConfig | undefined;
720
- /** The parser options that will be enabled under this environment. */
721
- parserOptions?: JavaScriptParserOptionsConfig | undefined;
722
- }
723
- /**
724
- * A configuration object that may have a `rules` block.
725
- */
726
- export interface HasRules<Rules extends RulesConfig = RulesConfig> {
727
- rules?: Partial<Rules> | undefined;
728
- }
729
- /**
730
- * ESLint legacy configuration.
731
- *
732
- * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
733
- */
734
- export interface BaseConfig<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends HasRules<Rules> {
735
- $schema?: string | undefined;
736
- /**
737
- * An environment provides predefined global variables.
738
- *
739
- * @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments)
740
- */
741
- env?: {
742
- [name: string]: boolean;
743
- } | undefined;
744
- /**
745
- * Extending configuration files.
746
- *
747
- * @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files)
748
- */
749
- extends?: string | string[] | undefined;
750
- /**
751
- * Specifying globals.
752
- *
753
- * @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals)
754
- */
755
- globals?: GlobalsConfig | undefined;
756
- /**
757
- * Disable processing of inline comments.
758
- *
759
- * @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#disabling-inline-comments)
760
- */
761
- noInlineConfig?: boolean | undefined;
762
- /**
763
- * Overrides can be used to use a differing configuration for matching sub-directories and files.
764
- *
765
- * @see [How do overrides work](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#how-do-overrides-work)
766
- */
767
- overrides?: ConfigOverride<OverrideRules>[] | undefined;
768
- /**
769
- * Parser.
770
- *
771
- * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
772
- * @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated)
773
- */
774
- parser?: string | undefined;
775
- /**
776
- * Parser options.
777
- *
778
- * @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
779
- * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options)
780
- */
781
- parserOptions?: JavaScriptParserOptionsConfig | undefined;
782
- /**
783
- * Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
784
- *
785
- * @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins)
786
- */
787
- plugins?: string[] | undefined;
788
- /**
789
- * Specifying processor.
790
- *
791
- * @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor)
792
- */
793
- processor?: string | undefined;
794
- /**
795
- * Report unused eslint-disable comments as warning.
796
- *
797
- * @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments)
798
- */
799
- reportUnusedDisableDirectives?: boolean | undefined;
800
- /**
801
- * Settings.
802
- *
803
- * @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings)
804
- */
805
- settings?: SettingsConfig | undefined;
806
- }
807
- /**
808
- * The overwrites that apply more differing configuration to specific files or directories.
809
- */
810
- export interface ConfigOverride<Rules extends RulesConfig = RulesConfig> extends BaseConfig<Rules> {
811
- /**
812
- * The glob patterns for excluded files.
813
- */
814
- excludedFiles?: string | string[] | undefined;
815
- /**
816
- * The glob patterns for target files.
817
- */
818
- files: string | string[];
819
- }
820
- /**
821
- * ESLint legacy configuration.
822
- *
823
- * @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
824
- */
825
- export interface LegacyConfigObject<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends BaseConfig<Rules, OverrideRules> {
826
- /**
827
- * Tell ESLint to ignore specific files and directories.
828
- *
829
- * @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files)
830
- */
831
- ignorePatterns?: string | string[] | undefined;
832
- /**
833
- * @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files)
834
- */
835
- root?: boolean | undefined;
836
- }
837
- /**
838
- * File information passed to a processor.
839
- */
840
- export interface ProcessorFile {
841
- text: string;
842
- filename: string;
843
- }
844
- /**
845
- * A processor is an object that can preprocess and postprocess files.
846
- */
847
- export interface Processor<T extends string | ProcessorFile = string | ProcessorFile> extends ObjectMetaProperties {
848
- /** If `true` then it means the processor supports autofix. */
849
- supportsAutofix?: boolean | undefined;
850
- /** The function to extract code blocks. */
851
- preprocess?(text: string, filename: string): T[];
852
- /** The function to merge messages. */
853
- postprocess?(messages: LintMessage[][], filename: string): LintMessage[];
854
- }
855
- export interface Plugin extends ObjectMetaProperties {
856
- meta?: ObjectMetaProperties["meta"] & {
857
- namespace?: string | undefined;
858
- };
859
- configs?: Record<string, LegacyConfigObject | ConfigObject | ConfigObject[]> | undefined;
860
- environments?: Record<string, EnvironmentConfig> | undefined;
861
- languages?: Record<string, Language> | undefined;
862
- processors?: Record<string, Processor> | undefined;
863
- rules?: Record<string, RuleDefinition> | undefined;
864
- }
865
- /**
866
- * Generic options for the `Language` type.
867
- */
868
- export interface LanguageTypeOptions {
869
- LangOptions: LanguageOptions;
870
- Code: SourceCode;
871
- RootNode: unknown;
872
- Node: unknown;
873
- }
874
- /**
875
- * Represents a plugin language.
876
- */
877
- export interface Language<Options extends LanguageTypeOptions = {
878
- LangOptions: LanguageOptions;
879
- Code: SourceCode;
880
- RootNode: unknown;
881
- Node: unknown;
882
- }> {
883
- /**
884
- * Indicates how ESLint should read the file.
885
- */
886
- fileType: "text";
887
- /**
888
- * First line number returned from the parser (text mode only).
889
- */
890
- lineStart: 0 | 1;
891
- /**
892
- * First column number returned from the parser (text mode only).
893
- */
894
- columnStart: 0 | 1;
895
- /**
896
- * The property to read the node type from. Used in selector querying.
897
- */
898
- nodeTypeKey: string;
899
- /**
900
- * The traversal path that tools should take when evaluating the AST
901
- */
902
- visitorKeys?: Record<string, string[]>;
903
- /**
904
- * Default language options. User-defined options are merged with this object.
905
- */
906
- defaultLanguageOptions?: LanguageOptions;
907
- /**
908
- * Validates languageOptions for this language.
909
- */
910
- validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
911
- /**
912
- * Normalizes languageOptions for this language.
913
- */
914
- normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
915
- /**
916
- * Helper for esquery that allows languages to match nodes against
917
- * class. esquery currently has classes like `function` that will
918
- * match all the various function nodes. This method allows languages
919
- * to implement similar shorthands.
920
- */
921
- matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
922
- /**
923
- * Parses the given file input into its component parts. This file should not
924
- * throws errors for parsing errors but rather should return any parsing
925
- * errors as parse of the ParseResult object.
926
- */
927
- parse(file: File, context: LanguageContext<Options["LangOptions"]>): ParseResult<Options["RootNode"]>;
928
- /**
929
- * Creates SourceCode object that ESLint uses to work with a file.
930
- */
931
- createSourceCode(file: File, input: OkParseResult<Options["RootNode"]>, context: LanguageContext<Options["LangOptions"]>): Options["Code"];
932
- }
933
- /**
934
- * Plugin-defined options for the language.
935
- */
936
- export type LanguageOptions = Record<string, unknown>;
937
- /**
938
- * The context object that is passed to the language plugin methods.
939
- */
940
- export interface LanguageContext<LangOptions = LanguageOptions> {
941
- languageOptions: LangOptions;
942
- }
943
- /**
944
- * Represents a file read by ESLint.
945
- */
946
- export interface File {
947
- /**
948
- * The path that ESLint uses for this file. May be a virtual path
949
- * if it was returned by a processor.
950
- */
951
- path: string;
952
- /**
953
- * The path to the file on disk. This always maps directly to a file
954
- * regardless of whether it was returned from a processor.
955
- */
956
- physicalPath: string;
957
- /**
958
- * Indicates if the original source contained a byte-order marker.
959
- * ESLint strips the BOM from the `body`, but this info is needed
960
- * to correctly apply autofixing.
961
- */
962
- bom: boolean;
963
- /**
964
- * The body of the file to parse.
965
- */
966
- body: string | Uint8Array;
967
- }
968
- /**
969
- * Represents the successful result of parsing a file.
970
- */
971
- export interface OkParseResult<RootNode = unknown> {
972
- /**
973
- * Indicates if the parse was successful. If true, the parse was successful
974
- * and ESLint should continue on to create a SourceCode object and run rules;
975
- * if false, ESLint should just report the error(s) without doing anything
976
- * else.
977
- */
978
- ok: true;
979
- /**
980
- * The abstract syntax tree created by the parser. (only when ok: true)
981
- */
982
- ast: RootNode;
983
- /**
984
- * Any additional data that the parser wants to provide.
985
- */
986
- [key: string]: any;
987
- }
988
- /**
989
- * Represents the unsuccessful result of parsing a file.
990
- */
991
- export interface NotOkParseResult {
992
- /**
993
- * Indicates if the parse was successful. If true, the parse was successful
994
- * and ESLint should continue on to create a SourceCode object and run rules;
995
- * if false, ESLint should just report the error(s) without doing anything
996
- * else.
997
- */
998
- ok: false;
999
- /**
1000
- * Any parsing errors, whether fatal or not. (only when ok: false)
1001
- */
1002
- errors: FileError[];
1003
- /**
1004
- * Any additional data that the parser wants to provide.
1005
- */
1006
- [key: string]: any;
1007
- }
1008
- export type ParseResult<RootNode = unknown> = OkParseResult<RootNode> | NotOkParseResult;
1009
- /**
1010
- * Represents inline configuration found in the source code.
1011
- */
1012
- interface InlineConfigElement {
1013
- /**
1014
- * The location of the inline config element.
1015
- */
1016
- loc: SourceLocation;
1017
- /**
1018
- * The interpreted configuration from the inline config element.
1019
- */
1020
- config: {
1021
- rules: RulesConfig;
1022
- };
1023
- }
1024
- /**
1025
- * Generic options for the `SourceCodeBase` type.
1026
- */
1027
- export interface SourceCodeBaseTypeOptions {
1028
- LangOptions: LanguageOptions;
1029
- RootNode: unknown;
1030
- SyntaxElementWithLoc: unknown;
1031
- ConfigNode: unknown;
1032
- }
1033
- /**
1034
- * Represents the basic interface for a source code object.
1035
- */
1036
- interface SourceCodeBase<Options extends SourceCodeBaseTypeOptions = {
1037
- LangOptions: LanguageOptions;
1038
- RootNode: unknown;
1039
- SyntaxElementWithLoc: unknown;
1040
- ConfigNode: unknown;
1041
- }> {
1042
- /**
1043
- * Root of the AST.
1044
- */
1045
- ast: Options["RootNode"];
1046
- /**
1047
- * The traversal path that tools should take when evaluating the AST.
1048
- * When present, this overrides the `visitorKeys` on the language for
1049
- * just this source code object.
1050
- */
1051
- visitorKeys?: Record<string, string[]>;
1052
- /**
1053
- * Retrieves the equivalent of `loc` for a given node or token.
1054
- * @param syntaxElement The node or token to get the location for.
1055
- * @returns The location of the node or token.
1056
- */
1057
- getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation;
1058
- /**
1059
- * Retrieves the equivalent of `range` for a given node or token.
1060
- * @param syntaxElement The node or token to get the range for.
1061
- * @returns The range of the node or token.
1062
- */
1063
- getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange;
1064
- /**
1065
- * Traversal of AST.
1066
- */
1067
- traverse(): Iterable<TraversalStep>;
1068
- /**
1069
- * Applies language options passed in from the ESLint core.
1070
- */
1071
- applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
1072
- /**
1073
- * Return all of the inline areas where ESLint should be disabled/enabled
1074
- * along with any problems found in evaluating the directives.
1075
- */
1076
- getDisableDirectives?(): {
1077
- directives: Directive[];
1078
- problems: FileProblem[];
1079
- };
1080
- /**
1081
- * Returns an array of all inline configuration nodes found in the
1082
- * source code.
1083
- */
1084
- getInlineConfigNodes?(): Options["ConfigNode"][];
1085
- /**
1086
- * Applies configuration found inside of the source code. This method is only
1087
- * called when ESLint is running with inline configuration allowed.
1088
- */
1089
- applyInlineConfig?(): {
1090
- configs: InlineConfigElement[];
1091
- problems: FileProblem[];
1092
- };
1093
- /**
1094
- * Called by ESLint core to indicate that it has finished providing
1095
- * information. We now add in all the missing variables and ensure that
1096
- * state-changing methods cannot be called by rules.
1097
- * @returns {void}
1098
- */
1099
- finalize?(): void;
1100
- }
1101
- /**
1102
- * Represents the source of a text file being linted.
1103
- */
1104
- export interface TextSourceCode<Options extends SourceCodeBaseTypeOptions = {
1105
- LangOptions: LanguageOptions;
1106
- RootNode: unknown;
1107
- SyntaxElementWithLoc: unknown;
1108
- ConfigNode: unknown;
1109
- }> extends SourceCodeBase<Options> {
1110
- /**
1111
- * The body of the file that you'd like rule developers to access.
1112
- */
1113
- text: string;
1114
- }
1115
- /**
1116
- * Represents the source of a binary file being linted.
1117
- */
1118
- export interface BinarySourceCode<Options extends SourceCodeBaseTypeOptions = {
1119
- LangOptions: LanguageOptions;
1120
- RootNode: unknown;
1121
- SyntaxElementWithLoc: unknown;
1122
- ConfigNode: unknown;
1123
- }> extends SourceCodeBase<Options> {
1124
- /**
1125
- * The body of the file that you'd like rule developers to access.
1126
- */
1127
- body: Uint8Array;
1128
- }
1129
- export type SourceCode<Options extends SourceCodeBaseTypeOptions = {
1130
- LangOptions: LanguageOptions;
1131
- RootNode: unknown;
1132
- SyntaxElementWithLoc: unknown;
1133
- ConfigNode: unknown;
1134
- }> = TextSourceCode<Options> | BinarySourceCode<Options>;
1135
- /**
1136
- * Represents a traversal step visiting the AST.
1137
- */
1138
- export interface VisitTraversalStep {
1139
- kind: 1;
1140
- target: unknown;
1141
- phase: 1 | 2;
1142
- args: unknown[];
1143
- }
1144
- /**
1145
- * Represents a traversal step calling a function.
1146
- */
1147
- export interface CallTraversalStep {
1148
- kind: 2;
1149
- target: string;
1150
- phase?: string;
1151
- args: unknown[];
1152
- }
1153
- export type TraversalStep = VisitTraversalStep | CallTraversalStep;
1154
- /**
1155
- * The type of disable directive. This determines how ESLint will disable rules.
1156
- */
1157
- export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
1158
- /**
1159
- * Represents a disable directive.
1160
- */
1161
- export interface Directive {
1162
- /**
1163
- * The type of directive.
1164
- */
1165
- type: DirectiveType;
1166
- /**
1167
- * The node of the directive. May be in the AST or a comment/token.
1168
- */
1169
- node: unknown;
1170
- /**
1171
- * The value of the directive.
1172
- */
1173
- value: string;
1174
- /**
1175
- * The justification for the directive.
1176
- */
1177
- justification?: string;
1178
- }
1179
- export {};