xo 0.51.0 → 0.52.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 (361) hide show
  1. package/lib/options-manager.js +89 -6
  2. package/node_modules/@typescript-eslint/eslint-plugin/README.md +1 -1
  3. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +21 -8
  4. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
  5. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +37 -31
  6. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
  7. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js +10 -10
  8. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js.map +1 -1
  9. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +17 -4
  10. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -1
  11. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +14 -8
  12. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -1
  13. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +133 -43
  14. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map +1 -1
  15. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +12 -1
  16. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map +1 -1
  17. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +9 -2
  18. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
  19. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js +1 -1
  20. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js.map +1 -1
  21. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +0 -1
  22. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -1
  23. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +2 -1
  24. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -1
  25. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js +8 -2
  26. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map +1 -1
  27. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +4 -0
  28. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map +1 -1
  29. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +8 -3
  30. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -1
  31. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js +1 -1
  32. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map +1 -1
  33. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +0 -1
  34. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js.map +1 -1
  35. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +2 -0
  36. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map +1 -1
  37. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js +0 -1
  38. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map +1 -1
  39. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +0 -1
  40. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map +1 -1
  41. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +2 -0
  42. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map +1 -1
  43. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +8 -0
  44. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map +1 -1
  45. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +2 -0
  46. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +1 -1
  47. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +2 -0
  48. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +1 -1
  49. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +1 -0
  50. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map +1 -1
  51. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +3 -1
  52. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js.map +1 -1
  53. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +1 -1
  54. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +1 -1
  55. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +42 -12
  56. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -1
  57. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +6 -3
  58. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map +1 -1
  59. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +1 -2
  60. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js.map +1 -1
  61. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +0 -1
  62. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js.map +1 -1
  63. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +1 -0
  64. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +1 -1
  65. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +5 -5
  66. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +1 -1
  67. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js +31 -23
  68. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js.map +1 -1
  69. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +5 -1
  70. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map +1 -1
  71. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +0 -1
  72. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map +1 -1
  73. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +133 -4
  74. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +1 -1
  75. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +166 -86
  76. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
  77. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +2 -0
  78. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
  79. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -0
  80. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -1
  81. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +1 -1
  82. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map +1 -1
  83. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +2 -0
  84. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map +1 -1
  85. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +20 -5
  86. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +1 -1
  87. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js +1 -1
  88. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map +1 -1
  89. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +3 -0
  90. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
  91. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +0 -1
  92. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
  93. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +3 -1
  94. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map +1 -1
  95. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +1 -0
  96. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
  97. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +1 -0
  98. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -1
  99. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +3 -0
  100. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
  101. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +27 -0
  102. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js.map +1 -0
  103. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +9 -0
  104. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -0
  105. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +9 -0
  106. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js.map +1 -0
  107. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/TEMPLATE.md +3 -30
  108. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +6 -15
  109. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +6 -21
  110. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +6 -15
  111. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +8 -26
  112. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +6 -15
  113. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +74 -95
  114. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +6 -22
  115. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +3 -1
  116. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +9 -5
  117. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +9 -27
  118. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +6 -22
  119. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +11 -20
  120. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +19 -21
  121. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +9 -21
  122. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +15 -18
  123. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +9 -16
  124. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -19
  125. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +8 -24
  126. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +10 -22
  127. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +7 -33
  128. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +7 -26
  129. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +7 -43
  130. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +6 -22
  131. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +11 -23
  132. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +6 -22
  133. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +6 -22
  134. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +8 -24
  135. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +6 -2
  136. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +34 -9
  137. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +6 -2
  138. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +6 -2
  139. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +6 -22
  140. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +7 -11
  141. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +6 -15
  142. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +6 -38
  143. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +6 -22
  144. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +10 -19
  145. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +8 -28
  146. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +6 -15
  147. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +6 -29
  148. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +6 -2
  149. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +6 -18
  150. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +6 -15
  151. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +6 -22
  152. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +6 -22
  153. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +6 -24
  154. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +6 -18
  155. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +6 -15
  156. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +11 -20
  157. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +6 -18
  158. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +11 -27
  159. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +6 -26
  160. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +6 -14
  161. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +6 -22
  162. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +6 -19
  163. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +6 -24
  164. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +6 -2
  165. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +6 -15
  166. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +6 -2
  167. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +10 -13
  168. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +6 -15
  169. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +6 -15
  170. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +6 -15
  171. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +11 -2
  172. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +6 -19
  173. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +6 -15
  174. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +6 -15
  175. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +6 -13
  176. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +6 -19
  177. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +6 -18
  178. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +25 -29
  179. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +6 -14
  180. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +6 -22
  181. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +6 -16
  182. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +6 -15
  183. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +6 -15
  184. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +8 -4
  185. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +6 -15
  186. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +6 -15
  187. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +6 -15
  188. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +6 -15
  189. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +6 -15
  190. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +6 -15
  191. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +6 -22
  192. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +6 -22
  193. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +6 -23
  194. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +7 -23
  195. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +6 -15
  196. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +6 -15
  197. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +6 -15
  198. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +6 -22
  199. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +10 -31
  200. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +6 -2
  201. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +6 -15
  202. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +6 -15
  203. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +6 -15
  204. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +6 -15
  205. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +6 -15
  206. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +6 -2
  207. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +6 -15
  208. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +48 -2
  209. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +16 -15
  210. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +6 -15
  211. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +6 -4
  212. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +6 -15
  213. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +6 -15
  214. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +6 -15
  215. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +6 -16
  216. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +6 -15
  217. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +6 -31
  218. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +6 -22
  219. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +6 -18
  220. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +6 -20
  221. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +6 -24
  222. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +6 -27
  223. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +6 -12
  224. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +6 -22
  225. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +6 -45
  226. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +10 -22
  227. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +6 -22
  228. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +7 -23
  229. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -25
  230. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +6 -15
  231. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +9 -19
  232. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +8 -14
  233. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +11 -27
  234. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +7 -23
  235. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +12 -18
  236. package/node_modules/@typescript-eslint/eslint-plugin/package.json +5 -5
  237. package/node_modules/@typescript-eslint/parser/README.md +1 -1
  238. package/node_modules/@typescript-eslint/parser/package.json +5 -5
  239. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +2 -0
  240. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
  241. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +6 -0
  242. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
  243. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +1 -0
  244. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
  245. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +4 -0
  246. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
  247. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts +1 -1
  248. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map +1 -1
  249. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  250. package/node_modules/@typescript-eslint/type-utils/package.json +4 -4
  251. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +1 -1
  252. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  253. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +1 -0
  254. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
  255. package/node_modules/@typescript-eslint/types/package.json +2 -2
  256. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +2 -2
  257. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  258. package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -5
  259. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
  260. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +2 -1
  261. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js.map +1 -1
  262. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map +1 -1
  263. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +3 -4
  264. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js.map +1 -1
  265. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +4 -0
  266. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
  267. package/node_modules/@typescript-eslint/utils/package.json +5 -5
  268. package/node_modules/@typescript-eslint/visitor-keys/package.json +3 -3
  269. package/node_modules/eslint-config-xo-typescript/index.js +27 -11
  270. package/node_modules/eslint-config-xo-typescript/package.json +5 -4
  271. package/package.json +10 -10
  272. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +0 -4
  273. package/node_modules/@typescript-eslint/parser/_ts3.4/dist/parser.d.ts +0 -20
  274. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +0 -8
  275. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts +0 -6
  276. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts +0 -8
  277. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts +0 -6
  278. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts +0 -6
  279. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts +0 -3
  280. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts +0 -3
  281. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts +0 -8
  282. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts +0 -15
  283. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts +0 -20
  284. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts +0 -17
  285. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts +0 -52
  286. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts +0 -4
  287. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts +0 -4
  288. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +0 -11
  289. package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +0 -1732
  290. package/node_modules/@typescript-eslint/types/_ts3.4/dist/index.d.ts +0 -5
  291. package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +0 -3
  292. package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +0 -35
  293. package/node_modules/@typescript-eslint/types/_ts3.4/dist/ts-estree.d.ts +0 -9
  294. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ast-converter.d.ts +0 -9
  295. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert-comments.d.ts +0 -11
  296. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/convert.d.ts +0 -157
  297. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/WatchCompilerHostOfConfigFile.d.ts +0 -13
  298. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createDefaultProgram.d.ts +0 -12
  299. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createIsolatedProgram.d.ts +0 -9
  300. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createProjectProgram.d.ts +0 -11
  301. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createSourceFile.d.ts +0 -5
  302. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/createWatchProgram.d.ts +0 -19
  303. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/getScriptKind.d.ts +0 -5
  304. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +0 -22
  305. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/useProvidedPrograms.d.ts +0 -13
  306. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +0 -10
  307. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/jsx/xhtml-entities.d.ts +0 -2
  308. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/node-utils.d.ts +0 -230
  309. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +0 -188
  310. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +0 -25
  311. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/semantic-or-syntactic-errors.d.ts +0 -13
  312. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +0 -9
  313. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +0 -175
  314. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/index.d.ts +0 -4
  315. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +0 -18
  316. package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +0 -3
  317. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +0 -48
  318. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +0 -76
  319. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +0 -76
  320. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts +0 -6
  321. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +0 -32
  322. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +0 -18
  323. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +0 -47
  324. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts +0 -5
  325. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts +0 -8
  326. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +0 -180
  327. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +0 -11
  328. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +0 -35
  329. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleTester.d.ts +0 -18
  330. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts +0 -10
  331. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts +0 -24
  332. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +0 -17
  333. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts +0 -8
  334. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts +0 -9
  335. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts +0 -14
  336. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts +0 -8
  337. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts +0 -2
  338. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts +0 -9
  339. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts +0 -137
  340. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts +0 -376
  341. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts +0 -326
  342. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts +0 -2
  343. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +0 -389
  344. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +0 -154
  345. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts +0 -44
  346. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +0 -342
  347. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts +0 -10
  348. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts +0 -19
  349. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +0 -15
  350. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts +0 -25
  351. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +0 -28
  352. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts +0 -55
  353. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +0 -103
  354. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts +0 -50
  355. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts +0 -17
  356. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts +0 -16
  357. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts +0 -11
  358. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts +0 -3
  359. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/get-keys.d.ts +0 -4
  360. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/index.d.ts +0 -3
  361. package/node_modules/@typescript-eslint/visitor-keys/_ts3.4/dist/visitor-keys.d.ts +0 -6
@@ -1,188 +0,0 @@
1
- import { DebugLevel } from '@typescript-eslint/types';
2
- import * as ts from 'typescript';
3
- import { CanonicalPath } from './create-program/shared';
4
- import { TSESTree, TSESTreeToTSNode, TSNode, TSToken } from './ts-estree';
5
- declare type DebugModule = 'typescript-eslint' | 'eslint' | 'typescript';
6
- export interface Extra {
7
- code: string;
8
- comment: boolean;
9
- comments: TSESTree.Comment[];
10
- createDefaultProgram: boolean;
11
- debugLevel: Set<DebugModule>;
12
- errorOnTypeScriptSyntacticAndSemanticIssues: boolean;
13
- errorOnUnknownASTType: boolean;
14
- EXPERIMENTAL_useSourceOfProjectReferenceRedirect: boolean;
15
- extraFileExtensions: string[];
16
- filePath: string;
17
- jsx: boolean;
18
- loc: boolean;
19
- singleRun: boolean;
20
- log: (message: string) => void;
21
- preserveNodeMaps?: boolean;
22
- programs: null | Iterable<ts.Program>;
23
- projects: CanonicalPath[];
24
- range: boolean;
25
- strict: boolean;
26
- tokens: null | TSESTree.Token[];
27
- tsconfigRootDir: string;
28
- moduleResolver: string;
29
- }
30
- interface ParseOptions {
31
- /**
32
- * create a top-level comments array containing all comments
33
- */
34
- comment?: boolean;
35
- /**
36
- * An array of modules to turn explicit debugging on for.
37
- * - 'typescript-eslint' is the same as setting the env var `DEBUG=typescript-eslint:*`
38
- * - 'eslint' is the same as setting the env var `DEBUG=eslint:*`
39
- * - 'typescript' is the same as setting `extendedDiagnostics: true` in your tsconfig compilerOptions
40
- *
41
- * For convenience, also supports a boolean:
42
- * - true === ['typescript-eslint']
43
- * - false === []
44
- */
45
- debugLevel?: DebugLevel;
46
- /**
47
- * Cause the parser to error if it encounters an unknown AST node type (useful for testing).
48
- * This case only usually occurs when TypeScript releases new features.
49
- */
50
- errorOnUnknownASTType?: boolean;
51
- /**
52
- * Absolute (or relative to `cwd`) path to the file being parsed.
53
- */
54
- filePath?: string;
55
- /**
56
- * Enable parsing of JSX.
57
- * For more details, see https://www.typescriptlang.org/docs/handbook/jsx.html
58
- *
59
- * NOTE: this setting does not effect known file types (.js, .cjs, .mjs, .jsx, .ts, .mts, .cts, .tsx, .json) because the
60
- * TypeScript compiler has its own internal handling for known file extensions.
61
- *
62
- * For the exact behavior, see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser#parseroptionsecmafeaturesjsx
63
- */
64
- jsx?: boolean;
65
- /**
66
- * Controls whether the `loc` information to each node.
67
- * The `loc` property is an object which contains the exact line/column the node starts/ends on.
68
- * This is similar to the `range` property, except it is line/column relative.
69
- */
70
- loc?: boolean;
71
- loggerFn?: ((message: string) => void) | false;
72
- /**
73
- * Controls whether the `range` property is included on AST nodes.
74
- * The `range` property is a [number, number] which indicates the start/end index of the node in the file contents.
75
- * This is similar to the `loc` property, except this is the absolute index.
76
- */
77
- range?: boolean;
78
- /**
79
- * Set to true to create a top-level array containing all tokens from the file.
80
- */
81
- tokens?: boolean;
82
- }
83
- interface ParseAndGenerateServicesOptions extends ParseOptions {
84
- /**
85
- * Causes the parser to error if the TypeScript compiler returns any unexpected syntax/semantic errors.
86
- */
87
- errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;
88
- /**
89
- * ***EXPERIMENTAL FLAG*** - Use this at your own risk.
90
- *
91
- * Causes TS to use the source files for referenced projects instead of the compiled .d.ts files.
92
- * This feature is not yet optimized, and is likely to cause OOMs for medium to large projects.
93
- *
94
- * This flag REQUIRES at least TS v3.9, otherwise it does nothing.
95
- *
96
- * See: https://github.com/typescript-eslint/typescript-eslint/issues/2094
97
- */
98
- EXPERIMENTAL_useSourceOfProjectReferenceRedirect?: boolean;
99
- /**
100
- * When `project` is provided, this controls the non-standard file extensions which will be parsed.
101
- * It accepts an array of file extensions, each preceded by a `.`.
102
- */
103
- extraFileExtensions?: string[];
104
- /**
105
- * Absolute (or relative to `tsconfigRootDir`) path to the file being parsed.
106
- * When `project` is provided, this is required, as it is used to fetch the file from the TypeScript compiler's cache.
107
- */
108
- filePath?: string;
109
- /**
110
- * Allows the user to control whether or not two-way AST node maps are preserved
111
- * during the AST conversion process.
112
- *
113
- * By default: the AST node maps are NOT preserved, unless `project` has been specified,
114
- * in which case the maps are made available on the returned `parserServices`.
115
- *
116
- * NOTE: If `preserveNodeMaps` is explicitly set by the user, it will be respected,
117
- * regardless of whether or not `project` is in use.
118
- */
119
- preserveNodeMaps?: boolean;
120
- /**
121
- * Absolute (or relative to `tsconfigRootDir`) paths to the tsconfig(s).
122
- * If this is provided, type information will be returned.
123
- */
124
- project?: string | string[];
125
- /**
126
- * If you provide a glob (or globs) to the project option, you can use this option to ignore certain folders from
127
- * being matched by the globs.
128
- * This accepts an array of globs to ignore.
129
- *
130
- * By default, this is set to ["**\/node_modules/**"]
131
- */
132
- projectFolderIgnoreList?: string[];
133
- /**
134
- * The absolute path to the root directory for all provided `project`s.
135
- */
136
- tsconfigRootDir?: string;
137
- /**
138
- * An array of one or more instances of TypeScript Program objects to be used for type information.
139
- * This overrides any program or programs that would have been computed from the `project` option.
140
- * All linted files must be part of the provided program(s).
141
- */
142
- programs?: ts.Program[];
143
- /**
144
- ***************************************************************************************
145
- * IT IS RECOMMENDED THAT YOU DO NOT USE THIS OPTION, AS IT CAUSES PERFORMANCE ISSUES. *
146
- ***************************************************************************************
147
- *
148
- * When passed with `project`, this allows the parser to create a catch-all, default program.
149
- * This means that if the parser encounters a file not included in any of the provided `project`s,
150
- * it will not error, but will instead parse the file and its dependencies in a new program.
151
- */
152
- createDefaultProgram?: boolean;
153
- /**
154
- * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts,
155
- * such as an ESLint CLI invocation, and long-running sessions (such as continuous feedback
156
- * on a file in an IDE).
157
- *
158
- * When typescript-eslint handles TypeScript Program management behind the scenes, this distinction
159
- * is important because there is significant overhead to managing the so called Watch Programs
160
- * needed for the long-running use-case.
161
- *
162
- * When allowAutomaticSingleRunInference is enabled, we will use common heuristics to infer
163
- * whether or not ESLint is being used as part of a single run.
164
- */
165
- allowAutomaticSingleRunInference?: boolean;
166
- moduleResolver?: string;
167
- }
168
- export declare type TSESTreeOptions = ParseAndGenerateServicesOptions;
169
- export interface ParserWeakMap<TKey, TValueBase> {
170
- get<TValue extends TValueBase>(key: TKey): TValue;
171
- has(key: unknown): boolean;
172
- }
173
- export interface ParserWeakMapESTreeToTSNode<TKey extends TSESTree.Node = TSESTree.Node> {
174
- get<TKeyBase extends TKey>(key: TKeyBase): TSESTreeToTSNode<TKeyBase>;
175
- has(key: unknown): boolean;
176
- }
177
- export interface ParserServices {
178
- program: ts.Program;
179
- esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode;
180
- tsNodeToESTreeNodeMap: ParserWeakMap<TSNode | TSToken, TSESTree.Node>;
181
- hasFullTypeInformation: boolean;
182
- }
183
- export interface ModuleResolver {
184
- version: 1;
185
- resolveModuleNames(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions): (ts.ResolvedModule | undefined)[];
186
- }
187
- export {};
188
- //# sourceMappingURL=parser-options.d.ts.map
@@ -1,25 +0,0 @@
1
- import { TSESTreeOptions, ParserServices } from './parser-options';
2
- import { TSESTree } from './ts-estree';
3
- declare function clearProgramCache(): void;
4
- interface EmptyObject {
5
- }
6
- declare type AST<T extends TSESTreeOptions> = TSESTree.Program & (T['tokens'] extends true ? {
7
- tokens: TSESTree.Token[];
8
- } : EmptyObject) & (T['comment'] extends true ? {
9
- comments: TSESTree.Comment[];
10
- } : EmptyObject);
11
- interface ParseAndGenerateServicesResult<T extends TSESTreeOptions> {
12
- ast: AST<T>;
13
- services: ParserServices;
14
- }
15
- interface ParseWithNodeMapsResult<T extends TSESTreeOptions> {
16
- ast: AST<T>;
17
- esTreeNodeToTSNodeMap: ParserServices['esTreeNodeToTSNodeMap'];
18
- tsNodeToESTreeNodeMap: ParserServices['tsNodeToESTreeNodeMap'];
19
- }
20
- declare function parse<T extends TSESTreeOptions = TSESTreeOptions>(code: string, options?: T): AST<T>;
21
- declare function parseWithNodeMaps<T extends TSESTreeOptions = TSESTreeOptions>(code: string, options?: T): ParseWithNodeMapsResult<T>;
22
- declare function clearParseAndGenerateServicesCalls(): void;
23
- declare function parseAndGenerateServices<T extends TSESTreeOptions = TSESTreeOptions>(code: string, options: T): ParseAndGenerateServicesResult<T>;
24
- export { AST, parse, parseAndGenerateServices, parseWithNodeMaps, ParseAndGenerateServicesResult, ParseWithNodeMapsResult, clearProgramCache, clearParseAndGenerateServicesCalls, };
25
- //# sourceMappingURL=parser.d.ts.map
@@ -1,13 +0,0 @@
1
- import { Diagnostic, Program, SourceFile } from 'typescript';
2
- export interface SemanticOrSyntacticError extends Diagnostic {
3
- message: string;
4
- }
5
- /**
6
- * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether
7
- * they are related to generic ECMAScript standards, or TypeScript-specific constructs.
8
- *
9
- * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when
10
- * the user opts in to throwing errors on semantic issues.
11
- */
12
- export declare function getFirstSemanticOrSyntacticError(program: Program, ast: SourceFile): SemanticOrSyntacticError | undefined;
13
- //# sourceMappingURL=semantic-or-syntactic-errors.d.ts.map
@@ -1,9 +0,0 @@
1
- import { TSESTree } from './ts-estree';
2
- declare type SimpleTraverseOptions = {
3
- enter: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void;
4
- } | {
5
- [key: string]: (node: TSESTree.Node, parent: TSESTree.Node | undefined) => void;
6
- };
7
- export declare function simpleTraverse(startingNode: TSESTree.Node, options: SimpleTraverseOptions, setParentPointers?: boolean): void;
8
- export {};
9
- //# sourceMappingURL=simple-traverse.d.ts.map
@@ -1,175 +0,0 @@
1
- import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/types';
2
- import * as ts from 'typescript';
3
- import { TSNode } from './ts-nodes';
4
- export interface EstreeToTsNodeTypes {
5
- [AST_NODE_TYPES.ArrayExpression]: ts.ArrayLiteralExpression;
6
- [AST_NODE_TYPES.ArrayPattern]: ts.ArrayLiteralExpression | ts.ArrayBindingPattern;
7
- [AST_NODE_TYPES.ArrowFunctionExpression]: ts.ArrowFunction;
8
- [AST_NODE_TYPES.AssignmentExpression]: ts.BinaryExpression;
9
- [AST_NODE_TYPES.AssignmentPattern]: ts.ShorthandPropertyAssignment | ts.BindingElement | ts.BinaryExpression | ts.ParameterDeclaration;
10
- [AST_NODE_TYPES.AwaitExpression]: ts.AwaitExpression;
11
- [AST_NODE_TYPES.BinaryExpression]: ts.BinaryExpression;
12
- [AST_NODE_TYPES.BlockStatement]: ts.Block;
13
- [AST_NODE_TYPES.BreakStatement]: ts.BreakStatement;
14
- [AST_NODE_TYPES.CallExpression]: ts.CallExpression;
15
- [AST_NODE_TYPES.CatchClause]: ts.CatchClause;
16
- [AST_NODE_TYPES.ChainExpression]: ts.CallExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.NonNullExpression;
17
- [AST_NODE_TYPES.ClassBody]: ts.ClassDeclaration | ts.ClassExpression;
18
- [AST_NODE_TYPES.ClassDeclaration]: ts.ClassDeclaration;
19
- [AST_NODE_TYPES.ClassExpression]: ts.ClassExpression;
20
- [AST_NODE_TYPES.PropertyDefinition]: ts.PropertyDeclaration;
21
- [AST_NODE_TYPES.ConditionalExpression]: ts.ConditionalExpression;
22
- [AST_NODE_TYPES.ContinueStatement]: ts.ContinueStatement;
23
- [AST_NODE_TYPES.DebuggerStatement]: ts.DebuggerStatement;
24
- [AST_NODE_TYPES.Decorator]: ts.Decorator;
25
- [AST_NODE_TYPES.DoWhileStatement]: ts.DoStatement;
26
- [AST_NODE_TYPES.EmptyStatement]: ts.EmptyStatement;
27
- [AST_NODE_TYPES.ExportAllDeclaration]: ts.ExportDeclaration;
28
- [AST_NODE_TYPES.ExportDefaultDeclaration]: ts.ExportAssignment | ts.FunctionDeclaration | ts.VariableStatement | ts.ClassDeclaration | ts.ClassExpression | ts.TypeAliasDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.ModuleDeclaration;
29
- [AST_NODE_TYPES.ExportNamedDeclaration]: ts.ExportDeclaration | ts.FunctionDeclaration | ts.VariableStatement | ts.ClassDeclaration | ts.ClassExpression | ts.TypeAliasDeclaration | ts.InterfaceDeclaration | ts.EnumDeclaration | ts.ModuleDeclaration;
30
- [AST_NODE_TYPES.ExportSpecifier]: ts.ExportSpecifier;
31
- [AST_NODE_TYPES.ExpressionStatement]: ts.ExpressionStatement;
32
- [AST_NODE_TYPES.ForInStatement]: ts.ForInStatement;
33
- [AST_NODE_TYPES.ForOfStatement]: ts.ForOfStatement;
34
- [AST_NODE_TYPES.ForStatement]: ts.ForStatement;
35
- [AST_NODE_TYPES.FunctionDeclaration]: ts.FunctionDeclaration;
36
- [AST_NODE_TYPES.FunctionExpression]: ts.FunctionExpression | ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration;
37
- [AST_NODE_TYPES.Identifier]: ts.Identifier | ts.ConstructorDeclaration | ts.Token<ts.SyntaxKind.NewKeyword | ts.SyntaxKind.ImportKeyword>;
38
- [AST_NODE_TYPES.PrivateIdentifier]: ts.PrivateIdentifier;
39
- [AST_NODE_TYPES.IfStatement]: ts.IfStatement;
40
- [AST_NODE_TYPES.ImportAttribute]: ts.AssertEntry;
41
- [AST_NODE_TYPES.ImportDeclaration]: ts.ImportDeclaration;
42
- [AST_NODE_TYPES.ImportDefaultSpecifier]: ts.ImportClause;
43
- [AST_NODE_TYPES.ImportExpression]: ts.CallExpression;
44
- [AST_NODE_TYPES.ImportNamespaceSpecifier]: ts.NamespaceImport;
45
- [AST_NODE_TYPES.ImportSpecifier]: ts.ImportSpecifier;
46
- [AST_NODE_TYPES.JSXAttribute]: ts.JsxAttribute;
47
- [AST_NODE_TYPES.JSXClosingElement]: ts.JsxClosingElement;
48
- [AST_NODE_TYPES.JSXClosingFragment]: ts.JsxClosingFragment;
49
- [AST_NODE_TYPES.JSXElement]: ts.JsxElement | ts.JsxSelfClosingElement;
50
- [AST_NODE_TYPES.JSXEmptyExpression]: ts.JsxExpression;
51
- [AST_NODE_TYPES.JSXExpressionContainer]: ts.JsxExpression;
52
- [AST_NODE_TYPES.JSXFragment]: ts.JsxFragment;
53
- [AST_NODE_TYPES.JSXIdentifier]: ts.Identifier | ts.ThisExpression;
54
- [AST_NODE_TYPES.JSXOpeningElement]: ts.JsxOpeningElement | ts.JsxSelfClosingElement;
55
- [AST_NODE_TYPES.JSXOpeningFragment]: ts.JsxOpeningFragment;
56
- [AST_NODE_TYPES.JSXSpreadAttribute]: ts.JsxSpreadAttribute;
57
- [AST_NODE_TYPES.JSXSpreadChild]: ts.JsxExpression;
58
- [AST_NODE_TYPES.JSXMemberExpression]: ts.PropertyAccessExpression;
59
- [AST_NODE_TYPES.JSXNamespacedName]: ts.Identifier | ts.ThisExpression;
60
- [AST_NODE_TYPES.JSXText]: ts.JsxText;
61
- [AST_NODE_TYPES.LabeledStatement]: ts.LabeledStatement;
62
- [AST_NODE_TYPES.Literal]: ts.StringLiteral | ts.NumericLiteral | ts.RegularExpressionLiteral | ts.NullLiteral | ts.BooleanLiteral | ts.BigIntLiteral;
63
- [AST_NODE_TYPES.LogicalExpression]: ts.BinaryExpression;
64
- [AST_NODE_TYPES.MemberExpression]: ts.PropertyAccessExpression | ts.ElementAccessExpression;
65
- [AST_NODE_TYPES.MetaProperty]: ts.MetaProperty;
66
- [AST_NODE_TYPES.MethodDefinition]: ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration;
67
- [AST_NODE_TYPES.NewExpression]: ts.NewExpression;
68
- [AST_NODE_TYPES.ObjectExpression]: ts.ObjectLiteralExpression;
69
- [AST_NODE_TYPES.ObjectPattern]: ts.ObjectLiteralExpression | ts.ObjectBindingPattern;
70
- [AST_NODE_TYPES.Program]: ts.SourceFile;
71
- [AST_NODE_TYPES.Property]: ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.BindingElement;
72
- [AST_NODE_TYPES.RestElement]: ts.BindingElement | ts.SpreadAssignment | ts.SpreadElement | ts.ParameterDeclaration;
73
- [AST_NODE_TYPES.ReturnStatement]: ts.ReturnStatement;
74
- [AST_NODE_TYPES.SequenceExpression]: ts.BinaryExpression;
75
- [AST_NODE_TYPES.SpreadElement]: ts.SpreadElement | ts.SpreadAssignment;
76
- [AST_NODE_TYPES.StaticBlock]: ts.ClassStaticBlockDeclaration;
77
- [AST_NODE_TYPES.Super]: ts.SuperExpression;
78
- [AST_NODE_TYPES.SwitchCase]: ts.CaseClause | ts.DefaultClause;
79
- [AST_NODE_TYPES.SwitchStatement]: ts.SwitchStatement;
80
- [AST_NODE_TYPES.TaggedTemplateExpression]: ts.TaggedTemplateExpression;
81
- [AST_NODE_TYPES.TemplateElement]: ts.NoSubstitutionTemplateLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail;
82
- [AST_NODE_TYPES.TemplateLiteral]: ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
83
- [AST_NODE_TYPES.ThisExpression]: ts.ThisExpression | ts.KeywordTypeNode | ts.Identifier;
84
- [AST_NODE_TYPES.ThrowStatement]: ts.ThrowStatement;
85
- [AST_NODE_TYPES.TryStatement]: ts.TryStatement;
86
- [AST_NODE_TYPES.TSAbstractPropertyDefinition]: ts.PropertyDeclaration;
87
- [AST_NODE_TYPES.TSAbstractMethodDefinition]: ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration;
88
- [AST_NODE_TYPES.TSArrayType]: ts.ArrayTypeNode;
89
- [AST_NODE_TYPES.TSAsExpression]: ts.AsExpression;
90
- [AST_NODE_TYPES.TSCallSignatureDeclaration]: ts.CallSignatureDeclaration;
91
- [AST_NODE_TYPES.TSClassImplements]: ts.ExpressionWithTypeArguments;
92
- [AST_NODE_TYPES.TSConditionalType]: ts.ConditionalTypeNode;
93
- [AST_NODE_TYPES.TSConstructorType]: ts.ConstructorTypeNode;
94
- [AST_NODE_TYPES.TSConstructSignatureDeclaration]: ts.ConstructSignatureDeclaration;
95
- [AST_NODE_TYPES.TSDeclareFunction]: ts.FunctionDeclaration;
96
- [AST_NODE_TYPES.TSEnumDeclaration]: ts.EnumDeclaration;
97
- [AST_NODE_TYPES.TSEnumMember]: ts.EnumMember;
98
- [AST_NODE_TYPES.TSExportAssignment]: ts.ExportAssignment;
99
- [AST_NODE_TYPES.TSExternalModuleReference]: ts.ExternalModuleReference;
100
- [AST_NODE_TYPES.TSFunctionType]: ts.FunctionTypeNode;
101
- [AST_NODE_TYPES.TSImportEqualsDeclaration]: ts.ImportEqualsDeclaration;
102
- [AST_NODE_TYPES.TSImportType]: ts.ImportTypeNode;
103
- [AST_NODE_TYPES.TSIndexedAccessType]: ts.IndexedAccessTypeNode;
104
- [AST_NODE_TYPES.TSIndexSignature]: ts.IndexSignatureDeclaration;
105
- [AST_NODE_TYPES.TSInferType]: ts.InferTypeNode;
106
- [AST_NODE_TYPES.TSInterfaceDeclaration]: ts.InterfaceDeclaration;
107
- [AST_NODE_TYPES.TSInterfaceBody]: ts.InterfaceDeclaration;
108
- [AST_NODE_TYPES.TSInterfaceHeritage]: ts.ExpressionWithTypeArguments;
109
- [AST_NODE_TYPES.TSIntersectionType]: ts.IntersectionTypeNode;
110
- [AST_NODE_TYPES.TSInstantiationExpression]: ts.ExpressionWithTypeArguments;
111
- [AST_NODE_TYPES.TSLiteralType]: ts.LiteralTypeNode;
112
- [AST_NODE_TYPES.TSMappedType]: ts.MappedTypeNode;
113
- [AST_NODE_TYPES.TSMethodSignature]: ts.MethodSignature | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration;
114
- [AST_NODE_TYPES.TSModuleBlock]: ts.ModuleBlock;
115
- [AST_NODE_TYPES.TSModuleDeclaration]: ts.ModuleDeclaration;
116
- [AST_NODE_TYPES.TSNamedTupleMember]: ts.NamedTupleMember;
117
- [AST_NODE_TYPES.TSNamespaceExportDeclaration]: ts.NamespaceExportDeclaration;
118
- [AST_NODE_TYPES.TSNonNullExpression]: ts.NonNullExpression;
119
- [AST_NODE_TYPES.TSOptionalType]: ts.OptionalTypeNode;
120
- [AST_NODE_TYPES.TSParameterProperty]: ts.ParameterDeclaration;
121
- [AST_NODE_TYPES.TSPropertySignature]: ts.PropertySignature;
122
- [AST_NODE_TYPES.TSQualifiedName]: ts.QualifiedName;
123
- [AST_NODE_TYPES.TSRestType]: ts.RestTypeNode | ts.NamedTupleMember;
124
- [AST_NODE_TYPES.TSThisType]: ts.ThisTypeNode;
125
- [AST_NODE_TYPES.TSTupleType]: ts.TupleTypeNode;
126
- [AST_NODE_TYPES.TSTemplateLiteralType]: ts.TemplateLiteralTypeNode;
127
- [AST_NODE_TYPES.TSTypeAliasDeclaration]: ts.TypeAliasDeclaration;
128
- [AST_NODE_TYPES.TSTypeAnnotation]: undefined;
129
- [AST_NODE_TYPES.TSTypeAssertion]: ts.TypeAssertion;
130
- [AST_NODE_TYPES.TSTypeLiteral]: ts.TypeLiteralNode;
131
- [AST_NODE_TYPES.TSTypeOperator]: ts.TypeOperatorNode;
132
- [AST_NODE_TYPES.TSTypeParameter]: ts.TypeParameterDeclaration;
133
- [AST_NODE_TYPES.TSTypeParameterDeclaration]: undefined;
134
- [AST_NODE_TYPES.TSTypeParameterInstantiation]: ts.TaggedTemplateExpression | ts.ImportTypeNode | ts.ExpressionWithTypeArguments | ts.TypeReferenceNode | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.NewExpression | ts.CallExpression | ts.TypeQueryNode;
135
- [AST_NODE_TYPES.TSTypePredicate]: ts.TypePredicateNode;
136
- [AST_NODE_TYPES.TSTypeQuery]: ts.TypeQueryNode;
137
- [AST_NODE_TYPES.TSTypeReference]: ts.TypeReferenceNode;
138
- [AST_NODE_TYPES.TSUnionType]: ts.UnionTypeNode;
139
- [AST_NODE_TYPES.UpdateExpression]: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression;
140
- [AST_NODE_TYPES.UnaryExpression]: ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.DeleteExpression | ts.VoidExpression | ts.TypeOfExpression;
141
- [AST_NODE_TYPES.VariableDeclaration]: ts.VariableDeclarationList | ts.VariableStatement;
142
- [AST_NODE_TYPES.VariableDeclarator]: ts.VariableDeclaration;
143
- [AST_NODE_TYPES.WhileStatement]: ts.WhileStatement;
144
- [AST_NODE_TYPES.WithStatement]: ts.WithStatement;
145
- [AST_NODE_TYPES.YieldExpression]: ts.YieldExpression;
146
- [AST_NODE_TYPES.TSEmptyBodyFunctionExpression]: ts.FunctionExpression | ts.ConstructorDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.MethodDeclaration;
147
- [AST_NODE_TYPES.TSAbstractKeyword]: ts.Token<ts.SyntaxKind.AbstractKeyword>;
148
- [AST_NODE_TYPES.TSNullKeyword]: ts.NullLiteral | ts.KeywordTypeNode;
149
- [AST_NODE_TYPES.TSAnyKeyword]: ts.KeywordTypeNode;
150
- [AST_NODE_TYPES.TSBigIntKeyword]: ts.KeywordTypeNode;
151
- [AST_NODE_TYPES.TSBooleanKeyword]: ts.KeywordTypeNode;
152
- [AST_NODE_TYPES.TSIntrinsicKeyword]: ts.KeywordTypeNode;
153
- [AST_NODE_TYPES.TSNeverKeyword]: ts.KeywordTypeNode;
154
- [AST_NODE_TYPES.TSNumberKeyword]: ts.KeywordTypeNode;
155
- [AST_NODE_TYPES.TSObjectKeyword]: ts.KeywordTypeNode;
156
- [AST_NODE_TYPES.TSStringKeyword]: ts.KeywordTypeNode;
157
- [AST_NODE_TYPES.TSSymbolKeyword]: ts.KeywordTypeNode;
158
- [AST_NODE_TYPES.TSUnknownKeyword]: ts.KeywordTypeNode;
159
- [AST_NODE_TYPES.TSVoidKeyword]: ts.KeywordTypeNode;
160
- [AST_NODE_TYPES.TSUndefinedKeyword]: ts.KeywordTypeNode;
161
- [AST_NODE_TYPES.TSAsyncKeyword]: ts.Token<ts.SyntaxKind.AsyncKeyword>;
162
- [AST_NODE_TYPES.TSDeclareKeyword]: ts.Token<ts.SyntaxKind.DeclareKeyword>;
163
- [AST_NODE_TYPES.TSExportKeyword]: ts.Token<ts.SyntaxKind.ExportKeyword>;
164
- [AST_NODE_TYPES.TSStaticKeyword]: ts.Token<ts.SyntaxKind.StaticKeyword>;
165
- [AST_NODE_TYPES.TSPublicKeyword]: ts.Token<ts.SyntaxKind.PublicKeyword>;
166
- [AST_NODE_TYPES.TSPrivateKeyword]: ts.Token<ts.SyntaxKind.PrivateKeyword>;
167
- [AST_NODE_TYPES.TSProtectedKeyword]: ts.Token<ts.SyntaxKind.ProtectedKeyword>;
168
- [AST_NODE_TYPES.TSReadonlyKeyword]: ts.Token<ts.SyntaxKind.ReadonlyKeyword>;
169
- }
170
- /**
171
- * Maps TSESTree AST Node type to the expected TypeScript AST Node type(s).
172
- * This mapping is based on the internal logic of the parser.
173
- */
174
- export declare type TSESTreeToTSNode<T extends TSESTree.Node = TSESTree.Node> = Extract<TSNode | ts.Token<ts.SyntaxKind.NewKeyword | ts.SyntaxKind.ImportKeyword>, EstreeToTsNodeTypes[T['type']]>;
175
- //# sourceMappingURL=estree-to-ts-node-types.d.ts.map
@@ -1,4 +0,0 @@
1
- export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types';
2
- export * from './ts-nodes';
3
- export * from './estree-to-ts-node-types';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,18 +0,0 @@
1
- import * as ts from 'typescript';
2
- declare module 'typescript' {
3
- interface NamedTupleMember extends ts.Node {
4
- }
5
- interface TemplateLiteralTypeNode extends ts.Node {
6
- }
7
- interface PrivateIdentifier extends ts.Node {
8
- }
9
- interface ClassStaticBlockDeclaration extends ts.Node {
10
- }
11
- interface AssertClause extends ts.Node {
12
- }
13
- interface AssertEntry extends ts.Node {
14
- }
15
- }
16
- export declare type TSToken = ts.Token<ts.SyntaxKind>;
17
- export declare type TSNode = ts.AssertClause | ts.AssertEntry | ts.Modifier | ts.Identifier | ts.PrivateIdentifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ClassStaticBlockDeclaration | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.NamedTupleMember | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.TemplateLiteralTypeNode | ts.JSDoc | ts.JSDocTypeExpression | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.JSDocFunctionType | ts.JSDocAllType | ts.JSDocUnknownType | ts.JSDocNullableType | ts.JSDocNonNullableType | ts.JSDocOptionalType | ts.JSDocVariadicType | ts.JSDocAuthorTag;
18
- //# sourceMappingURL=ts-nodes.d.ts.map
@@ -1,3 +0,0 @@
1
- declare const typescriptVersionIsAtLeast: Record<"3.7" | "3.8" | "3.9" | "4.0", boolean>;
2
- export { typescriptVersionIsAtLeast };
3
- //# sourceMappingURL=version-check.d.ts.map
@@ -1,48 +0,0 @@
1
- interface PatternMatcher {
2
- /**
3
- * Iterate all matched parts in a given string.
4
- *
5
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#matcher-execall}
6
- */
7
- execAll(str: string): IterableIterator<RegExpExecArray>;
8
- /**
9
- * Check whether this pattern matches a given string or not.
10
- *
11
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#matcher-test}
12
- */
13
- test(str: string): boolean;
14
- /**
15
- * Replace all matched parts by a given replacer.
16
- *
17
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#matcher-symbol-replace}
18
- * @example
19
- * const { PatternMatcher } = require("eslint-utils")
20
- * const matcher = new PatternMatcher(/\\p{Script=Greek}/g)
21
- *
22
- * module.exports = {
23
- * meta: {},
24
- * create(context) {
25
- * return {
26
- * "Literal[regex]"(node) {
27
- * const replacedPattern = node.regex.pattern.replace(
28
- * matcher,
29
- * "[\\u0370-\\u0373\\u0375-\\u0377\\u037A-\\u037D\\u037F\\u0384\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03E1\\u03F0-\\u03FF\\u1D26-\\u1D2A\\u1D5D-\\u1D61\\u1D66-\\u1D6A\\u1DBF\\u1F00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u2126\\uAB65]|\\uD800[\\uDD40-\\uDD8E\\uDDA0]|\\uD834[\\uDE00-\\uDE45]"
30
- * )
31
- * },
32
- * }
33
- * },
34
- * }
35
- */
36
- [Symbol.replace](str: string, replacer: string | ((...strs: string[]) => string)): string;
37
- }
38
- /**
39
- * The class to find a pattern in strings as handling escape sequences.
40
- * It ignores the found pattern if it's escaped with `\`.
41
- *
42
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#patternmatcher-class}
43
- */
44
- declare const PatternMatcher: new (pattern: RegExp, options?: {
45
- escaped?: boolean;
46
- }) => PatternMatcher;
47
- export { PatternMatcher };
48
- //# sourceMappingURL=PatternMatcher.d.ts.map
@@ -1,76 +0,0 @@
1
- import { TSESTree } from '../../ts-estree';
2
- import * as TSESLint from '../../ts-eslint';
3
- declare const ReferenceTrackerREAD: unique symbol;
4
- declare const ReferenceTrackerCALL: unique symbol;
5
- declare const ReferenceTrackerCONSTRUCT: unique symbol;
6
- declare const ReferenceTrackerESM: unique symbol;
7
- interface ReferenceTracker {
8
- /**
9
- * Iterate the references that the given `traceMap` determined.
10
- * This method starts to search from global variables.
11
- *
12
- * @see {@link https://eslint-utils.mysticatea.dev/api/scope-utils.html#tracker-iterateglobalreferences}
13
- */
14
- iterateGlobalReferences<T>(traceMap: ReferenceTracker.TraceMap<T>): IterableIterator<ReferenceTracker.FoundReference<T>>;
15
- /**
16
- * Iterate the references that the given `traceMap` determined.
17
- * This method starts to search from `require()` expression.
18
- *
19
- * @see {@link https://eslint-utils.mysticatea.dev/api/scope-utils.html#tracker-iteratecjsreferences}
20
- */
21
- iterateCjsReferences<T>(traceMap: ReferenceTracker.TraceMap<T>): IterableIterator<ReferenceTracker.FoundReference<T>>;
22
- /**
23
- * Iterate the references that the given `traceMap` determined.
24
- * This method starts to search from `import`/`export` declarations.
25
- *
26
- * @see {@link https://eslint-utils.mysticatea.dev/api/scope-utils.html#tracker-iterateesmreferences}
27
- */
28
- iterateEsmReferences<T>(traceMap: ReferenceTracker.TraceMap<T>): IterableIterator<ReferenceTracker.FoundReference<T>>;
29
- }
30
- interface ReferenceTrackerStatic {
31
- new (globalScope: TSESLint.Scope.Scope, options?: {
32
- /**
33
- * The mode which determines how the `tracker.iterateEsmReferences()` method scans CommonJS modules.
34
- * If this is `"strict"`, the method binds CommonJS modules to the default export. Otherwise, the method binds
35
- * CommonJS modules to both the default export and named exports. Optional. Default is `"strict"`.
36
- */
37
- mode?: 'strict' | 'legacy';
38
- /**
39
- * The name list of Global Object. Optional. Default is `["global", "globalThis", "self", "window"]`.
40
- */
41
- globalObjectNames?: readonly string[];
42
- }): ReferenceTracker;
43
- readonly READ: typeof ReferenceTrackerREAD;
44
- readonly CALL: typeof ReferenceTrackerCALL;
45
- readonly CONSTRUCT: typeof ReferenceTrackerCONSTRUCT;
46
- readonly ESM: typeof ReferenceTrackerESM;
47
- }
48
- declare namespace ReferenceTracker {
49
- type READ = ReferenceTrackerStatic['READ'];
50
- type CALL = ReferenceTrackerStatic['CALL'];
51
- type CONSTRUCT = ReferenceTrackerStatic['CONSTRUCT'];
52
- type ESM = ReferenceTrackerStatic['ESM'];
53
- type ReferenceType = READ | CALL | CONSTRUCT;
54
- type TraceMap<T = any> = Record<string, TraceMapElement<T>>;
55
- interface TraceMapElement<T> {
56
- [ReferenceTrackerREAD]?: T;
57
- [ReferenceTrackerCALL]?: T;
58
- [ReferenceTrackerCONSTRUCT]?: T;
59
- [ReferenceTrackerESM]?: true;
60
- [key: string]: TraceMapElement<T>;
61
- }
62
- interface FoundReference<T = any> {
63
- node: TSESTree.Node;
64
- path: readonly string[];
65
- type: ReferenceType;
66
- info: T;
67
- }
68
- }
69
- /**
70
- * The tracker for references. This provides reference tracking for global variables, CommonJS modules, and ES modules.
71
- *
72
- * @see {@link https://eslint-utils.mysticatea.dev/api/scope-utils.html#referencetracker-class}
73
- */
74
- declare const ReferenceTracker: ReferenceTrackerStatic;
75
- export { ReferenceTracker };
76
- //# sourceMappingURL=ReferenceTracker.d.ts.map
@@ -1,76 +0,0 @@
1
- import * as TSESLint from '../../ts-eslint';
2
- import { TSESTree } from '../../ts-estree';
3
- /**
4
- * Get the proper location of a given function node to report.
5
- *
6
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#getfunctionheadlocation}
7
- */
8
- declare const getFunctionHeadLocation: (node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression, sourceCode: TSESLint.SourceCode) => TSESTree.SourceLocation;
9
- /**
10
- * Get the name and kind of a given function node.
11
- *
12
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#getfunctionnamewithkind}
13
- */
14
- declare const getFunctionNameWithKind: (node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression | TSESTree.ArrowFunctionExpression, sourceCode?: TSESLint.SourceCode) => string;
15
- /**
16
- * Get the property name of a given property node.
17
- * If the node is a computed property, this tries to compute the property name by the getStringIfConstant function.
18
- *
19
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#getpropertyname}
20
- * @returns The property name of the node. If the property name is not constant then it returns `null`.
21
- */
22
- declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.Property | TSESTree.MethodDefinition | TSESTree.PropertyDefinition, initialScope?: TSESLint.Scope.Scope) => string | null;
23
- /**
24
- * Get the value of a given node if it can decide the value statically.
25
- * If the 2nd parameter `initialScope` was given, this function tries to resolve identifier references which are in the
26
- * given node as much as possible. In the resolving way, it does on the assumption that built-in global objects have
27
- * not been modified.
28
- * For example, it considers `Symbol.iterator`, ` String.raw``hello`` `, and `Object.freeze({a: 1}).a` as static.
29
- *
30
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#getstaticvalue}
31
- * @returns The `{ value: any }` shaped object. The `value` property is the static value. If it couldn't compute the
32
- * static value of the node, it returns `null`.
33
- */
34
- declare const getStaticValue: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => {
35
- value: unknown;
36
- } | null;
37
- /**
38
- * Get the string value of a given node.
39
- * This function is a tiny wrapper of the getStaticValue function.
40
- *
41
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#getstringifconstant}
42
- */
43
- declare const getStringIfConstant: (node: TSESTree.Node, initialScope?: TSESLint.Scope.Scope) => string | null;
44
- /**
45
- * Check whether a given node has any side effect or not.
46
- * The side effect means that it may modify a certain variable or object member. This function considers the node which
47
- * contains the following types as the node which has side effects:
48
- * - `AssignmentExpression`
49
- * - `AwaitExpression`
50
- * - `CallExpression`
51
- * - `ImportExpression`
52
- * - `NewExpression`
53
- * - `UnaryExpression([operator = "delete"])`
54
- * - `UpdateExpression`
55
- * - `YieldExpression`
56
- * - When `options.considerGetters` is `true`:
57
- * - `MemberExpression`
58
- * - When `options.considerImplicitTypeConversion` is `true`:
59
- * - `BinaryExpression([operator = "==" | "!=" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in"])`
60
- * - `MemberExpression([computed = true])`
61
- * - `MethodDefinition([computed = true])`
62
- * - `Property([computed = true])`
63
- * - `UnaryExpression([operator = "-" | "+" | "!" | "~"])`
64
- *
65
- * @see {@link https://eslint-utils.mysticatea.dev/api/ast-utils.html#hassideeffect}
66
- */
67
- declare const hasSideEffect: (node: TSESTree.Node, sourceCode: TSESLint.SourceCode, options?: {
68
- considerGetters?: boolean;
69
- considerImplicitTypeConversion?: boolean;
70
- }) => boolean;
71
- declare const isParenthesized: {
72
- (node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean;
73
- (times: number, node: TSESTree.Node, sourceCode: TSESLint.SourceCode): boolean;
74
- };
75
- export { getFunctionHeadLocation, getFunctionNameWithKind, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isParenthesized, };
76
- //# sourceMappingURL=astUtilities.d.ts.map