xo 0.50.0 → 0.52.1

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 (365) hide show
  1. package/cli.js +1 -1
  2. package/index.js +7 -2
  3. package/lib/options-manager.js +89 -6
  4. package/lib/report.js +3 -1
  5. package/node_modules/@typescript-eslint/eslint-plugin/README.md +2 -146
  6. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +1 -0
  7. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
  8. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +1 -0
  9. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
  10. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +21 -8
  11. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
  12. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +37 -31
  13. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
  14. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js +10 -10
  15. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js.map +1 -1
  16. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +100 -0
  17. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -0
  18. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +1 -1
  19. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js.map +1 -1
  20. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +14 -8
  21. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -1
  22. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +133 -43
  23. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map +1 -1
  24. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +12 -1
  25. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map +1 -1
  26. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +2 -0
  27. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
  28. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +9 -2
  29. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
  30. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +1 -1
  31. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map +1 -1
  32. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js +1 -1
  33. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js.map +1 -1
  34. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +0 -1
  35. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -1
  36. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +2 -1
  37. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -1
  38. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js +8 -2
  39. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map +1 -1
  40. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +4 -0
  41. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map +1 -1
  42. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +8 -3
  43. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -1
  44. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js +1 -1
  45. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map +1 -1
  46. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +9 -1
  47. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -1
  48. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +0 -1
  49. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js.map +1 -1
  50. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +2 -0
  51. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map +1 -1
  52. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js +0 -1
  53. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map +1 -1
  54. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +0 -1
  55. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map +1 -1
  56. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +38 -8
  57. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
  58. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +2 -0
  59. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map +1 -1
  60. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +8 -0
  61. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map +1 -1
  62. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +2 -0
  63. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +1 -1
  64. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +2 -0
  65. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +1 -1
  66. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +1 -0
  67. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map +1 -1
  68. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +3 -1
  69. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js.map +1 -1
  70. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +1 -1
  71. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +1 -1
  72. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +4 -3
  73. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -1
  74. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +42 -12
  75. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -1
  76. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +6 -3
  77. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map +1 -1
  78. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +1 -2
  79. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js.map +1 -1
  80. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +0 -1
  81. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js.map +1 -1
  82. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +1 -0
  83. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +1 -1
  84. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +5 -5
  85. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +1 -1
  86. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js +31 -23
  87. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js.map +1 -1
  88. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +5 -1
  89. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map +1 -1
  90. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +0 -1
  91. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map +1 -1
  92. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +133 -4
  93. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +1 -1
  94. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +166 -86
  95. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
  96. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +2 -0
  97. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
  98. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -0
  99. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -1
  100. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +1 -1
  101. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map +1 -1
  102. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +2 -0
  103. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map +1 -1
  104. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +20 -5
  105. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +1 -1
  106. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js +1 -1
  107. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map +1 -1
  108. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +3 -0
  109. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
  110. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js +16 -30
  111. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js.map +1 -1
  112. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +0 -1
  113. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
  114. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +3 -1
  115. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map +1 -1
  116. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +1 -0
  117. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
  118. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +1 -0
  119. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -1
  120. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +3 -0
  121. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
  122. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +27 -0
  123. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js.map +1 -0
  124. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +9 -0
  125. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -0
  126. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +9 -0
  127. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js.map +1 -0
  128. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +3 -138
  129. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/TEMPLATE.md +3 -30
  130. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +6 -19
  131. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +6 -25
  132. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +6 -19
  133. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +30 -25
  134. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +6 -15
  135. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +74 -99
  136. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +6 -22
  137. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +3 -1
  138. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +9 -5
  139. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +10 -28
  140. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +6 -22
  141. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +73 -0
  142. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +19 -21
  143. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +9 -26
  144. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +15 -22
  145. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +9 -16
  146. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -19
  147. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +8 -24
  148. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +10 -22
  149. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +7 -33
  150. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +7 -30
  151. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +10 -47
  152. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +6 -22
  153. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +11 -23
  154. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +6 -22
  155. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +6 -22
  156. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +8 -24
  157. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +6 -2
  158. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +34 -13
  159. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +6 -2
  160. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +6 -2
  161. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +6 -22
  162. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +7 -11
  163. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +6 -15
  164. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +6 -42
  165. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +6 -22
  166. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +10 -19
  167. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +8 -28
  168. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +6 -19
  169. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +6 -29
  170. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +6 -6
  171. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +6 -22
  172. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +6 -15
  173. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +6 -22
  174. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +6 -22
  175. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +6 -28
  176. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +6 -19
  177. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +6 -21
  178. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +11 -20
  179. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +6 -18
  180. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +11 -31
  181. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +6 -26
  182. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +6 -18
  183. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +6 -22
  184. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +6 -19
  185. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +6 -24
  186. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +6 -2
  187. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +6 -19
  188. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +6 -2
  189. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +10 -17
  190. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +6 -15
  191. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +6 -15
  192. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +6 -19
  193. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +11 -6
  194. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +6 -19
  195. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +6 -15
  196. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +6 -19
  197. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +6 -13
  198. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +6 -19
  199. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +24 -42
  200. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +25 -29
  201. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +6 -18
  202. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +6 -26
  203. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +6 -16
  204. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +6 -19
  205. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +6 -19
  206. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +8 -8
  207. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +6 -15
  208. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +6 -16
  209. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +6 -16
  210. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +6 -16
  211. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +6 -16
  212. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +6 -16
  213. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +6 -22
  214. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +6 -22
  215. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +6 -23
  216. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +7 -23
  217. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +6 -15
  218. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +6 -19
  219. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +6 -15
  220. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +6 -22
  221. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +10 -31
  222. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +6 -6
  223. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +6 -15
  224. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +6 -15
  225. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +6 -19
  226. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +6 -19
  227. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +6 -15
  228. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +6 -2
  229. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +6 -19
  230. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +48 -2
  231. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +18 -17
  232. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +6 -15
  233. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +6 -8
  234. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +6 -15
  235. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +6 -15
  236. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +6 -15
  237. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +6 -16
  238. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +6 -15
  239. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +6 -35
  240. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +6 -22
  241. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +6 -18
  242. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +6 -20
  243. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +6 -28
  244. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +6 -27
  245. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +6 -12
  246. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +6 -22
  247. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +6 -45
  248. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +10 -22
  249. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +6 -22
  250. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +7 -23
  251. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -26
  252. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +6 -15
  253. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +9 -24
  254. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +8 -18
  255. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +12 -32
  256. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +7 -27
  257. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +11 -21
  258. package/node_modules/@typescript-eslint/eslint-plugin/package.json +5 -5
  259. package/node_modules/@typescript-eslint/parser/README.md +1 -1
  260. package/node_modules/@typescript-eslint/parser/package.json +6 -5
  261. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +2 -0
  262. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
  263. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +12 -4
  264. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
  265. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +1 -0
  266. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
  267. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +4 -0
  268. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
  269. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map +1 -1
  270. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +13 -7
  271. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
  272. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts +1 -1
  273. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map +1 -1
  274. package/node_modules/@typescript-eslint/scope-manager/package.json +5 -5
  275. package/node_modules/@typescript-eslint/type-utils/package.json +4 -4
  276. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +22 -20
  277. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  278. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
  279. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +1 -0
  280. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
  281. package/node_modules/@typescript-eslint/types/package.json +3 -2
  282. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
  283. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +9 -2
  284. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  285. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts +3 -0
  286. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
  287. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +21 -1
  288. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
  289. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +1 -1
  290. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
  291. package/node_modules/@typescript-eslint/typescript-estree/package.json +6 -5
  292. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
  293. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +2 -1
  294. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js.map +1 -1
  295. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map +1 -1
  296. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +3 -4
  297. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js.map +1 -1
  298. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +4 -0
  299. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
  300. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +1 -1
  301. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +1 -1
  302. package/node_modules/@typescript-eslint/utils/package.json +5 -5
  303. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +1 -1
  304. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
  305. package/node_modules/@typescript-eslint/visitor-keys/package.json +4 -3
  306. package/node_modules/eslint-config-xo-typescript/index.js +27 -11
  307. package/node_modules/eslint-config-xo-typescript/package.json +5 -4
  308. package/package.json +10 -10
  309. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +0 -8
  310. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getConstrainedTypeAtLocation.d.ts +0 -6
  311. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getContextualType.d.ts +0 -8
  312. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getDeclaration.d.ts +0 -6
  313. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getSourceFileOfNode.d.ts +0 -6
  314. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTokenAtPosition.d.ts +0 -3
  315. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeArguments.d.ts +0 -3
  316. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/getTypeName.d.ts +0 -8
  317. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/index.d.ts +0 -15
  318. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isTypeReadonly.d.ts +0 -20
  319. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/isUnsafeAssignment.d.ts +0 -17
  320. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/predicates.d.ts +0 -52
  321. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/propertyTypes.d.ts +0 -4
  322. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/requiresQuoting.d.ts +0 -4
  323. package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +0 -11
  324. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +0 -48
  325. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +0 -76
  326. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +0 -76
  327. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/index.d.ts +0 -6
  328. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +0 -32
  329. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +0 -18
  330. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +0 -47
  331. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/index.d.ts +0 -5
  332. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/misc.d.ts +0 -8
  333. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +0 -180
  334. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +0 -11
  335. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +0 -35
  336. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleTester.d.ts +0 -18
  337. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/applyDefault.d.ts +0 -10
  338. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/batchedSingleLineTests.d.ts +0 -24
  339. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +0 -17
  340. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/getParserServices.d.ts +0 -8
  341. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/index.d.ts +0 -9
  342. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/nullThrows.d.ts +0 -14
  343. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/index.d.ts +0 -8
  344. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/json-schema.d.ts +0 -2
  345. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/AST.d.ts +0 -9
  346. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/CLIEngine.d.ts +0 -137
  347. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ESLint.d.ts +0 -376
  348. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Linter.d.ts +0 -326
  349. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/ParserOptions.d.ts +0 -2
  350. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +0 -389
  351. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +0 -154
  352. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Scope.d.ts +0 -44
  353. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +0 -342
  354. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/index.d.ts +0 -10
  355. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Definition.d.ts +0 -19
  356. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +0 -15
  357. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/PatternVisitor.d.ts +0 -25
  358. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +0 -28
  359. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Referencer.d.ts +0 -55
  360. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +0 -103
  361. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/ScopeManager.d.ts +0 -50
  362. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Variable.d.ts +0 -17
  363. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/analyze.d.ts +0 -16
  364. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/index.d.ts +0 -11
  365. package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-estree.d.ts +0 -3
@@ -1,6 +1,10 @@
1
- # `no-explicit-any`
1
+ ---
2
+ description: 'Disallow the `any` type.'
3
+ ---
2
4
 
3
- Disallows the `any` type.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-explicit-any** for documentation.
4
8
 
5
9
  Using the `any` type defeats the purpose of using TypeScript.
6
10
  When `any` is used, all compiler type checks around that value are ignored.
@@ -93,22 +97,6 @@ function greet(param: Array<string>): Array<string> {}
93
97
 
94
98
  ## Options
95
99
 
96
- The rule accepts an options object with the following properties:
97
-
98
- ```ts
99
- type Options = {
100
- // if true, auto-fixing will be made available in which the "any" type is converted to an "unknown" type
101
- fixToUnknown: boolean;
102
- // specify if arrays from the rest operator are considered okay
103
- ignoreRestArgs: boolean;
104
- };
105
-
106
- const defaults = {
107
- fixToUnknown: false,
108
- ignoreRestArgs: false,
109
- };
110
- ```
111
-
112
100
  ### `ignoreRestArgs`
113
101
 
114
102
  A boolean to specify if arrays from the rest operator are considered okay. `false` by default.
@@ -179,7 +167,3 @@ and you want to be able to specify `any`.
179
167
  ## Further Reading
180
168
 
181
169
  - TypeScript [any type](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)
182
-
183
- ## Related To
184
-
185
- - TSLint: [no-any](https://palantir.github.io/tslint/rules/no-any/)
@@ -1,6 +1,10 @@
1
- # `no-extra-non-null-assertion`
1
+ ---
2
+ description: 'Disallow extra non-null assertion.'
3
+ ---
2
4
 
3
- Disallows extra non-null assertion.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-extra-non-null-assertion** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -45,16 +49,3 @@ function foo(bar?: { n: number }) {
45
49
  return bar?.n;
46
50
  }
47
51
  ```
48
-
49
- ## Options
50
-
51
- ```jsonc
52
- // .eslintrc.json
53
- {
54
- "rules": {
55
- "@typescript-eslint/no-extra-non-null-assertion": "error"
56
- }
57
- }
58
- ```
59
-
60
- This rule is not configurable.
@@ -1,28 +1,12 @@
1
- # `no-extra-parens`
1
+ ---
2
+ description: 'Disallow unnecessary parentheses.'
3
+ ---
2
4
 
3
- Disallows unnecessary parentheses.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-extra-parens** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule.
8
12
  It adds support for TypeScript type assertions.
9
-
10
- ## How to Use
11
-
12
- ```jsonc
13
- {
14
- // note you must disable the base rule as it can report incorrect errors
15
- "no-extra-parens": "off",
16
- "@typescript-eslint/no-extra-parens": ["error"]
17
- }
18
- ```
19
-
20
- ## Options
21
-
22
- See [`eslint/no-extra-parens` options](https://eslint.org/docs/rules/no-extra-parens#options).
23
-
24
- <sup>
25
-
26
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-extra-parens.md)
27
-
28
- </sup>
@@ -1,28 +1,12 @@
1
- # `no-extra-semi`
1
+ ---
2
+ description: 'Disallow unnecessary semicolons.'
3
+ ---
2
4
 
3
- Disallows unnecessary semicolons.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-extra-semi** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule.
8
12
  It adds support for class properties.
9
-
10
- ## How to Use
11
-
12
- ```jsonc
13
- {
14
- // note you must disable the base rule as it can report incorrect errors
15
- "no-extra-semi": "off",
16
- "@typescript-eslint/no-extra-semi": ["error"]
17
- }
18
- ```
19
-
20
- ## Options
21
-
22
- See [`eslint/no-extra-semi` options](https://eslint.org/docs/rules/no-extra-semi#options).
23
-
24
- <sup>
25
-
26
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-extra-semi.md)
27
-
28
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-extraneous-class`
1
+ ---
2
+ description: 'Disallow classes used as namespaces.'
3
+ ---
2
4
 
3
- Disallows classes used as namespaces.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-extraneous-class** for documentation.
4
8
 
5
9
  This rule warns when a class has no non-static members, such as for a class used exclusively as a static namespace.
6
10
 
@@ -192,28 +196,6 @@ export function incrementCount() {
192
196
 
193
197
  ## Options
194
198
 
195
- This rule accepts a single object option.
196
-
197
- ```ts
198
- type Options = {
199
- // allow extraneous classes if they only contain a constructor
200
- allowConstructorOnly?: boolean;
201
- // allow extraneous classes if they have no body (i.e. are empty)
202
- allowEmpty?: boolean;
203
- // allow extraneous classes if they only contain static members
204
- allowStaticOnly?: boolean;
205
- // allow extraneous classes if they have a decorator
206
- allowWithDecorator?: boolean;
207
- };
208
-
209
- const defaultOptions: Options = {
210
- allowConstructorOnly: false,
211
- allowEmpty: false,
212
- allowStaticOnly: false,
213
- allowWithDecorator: false,
214
- };
215
- ```
216
-
217
199
  This rule normally bans classes that are empty (have no constructor or fields).
218
200
  The rule's options each add an exemption for a specific type of class.
219
201
 
@@ -312,7 +294,3 @@ class Constants {
312
294
  ## When Not To Use It
313
295
 
314
296
  You can disable this rule if you are unable -or unwilling- to switch off using classes as namespaces.
315
-
316
- ## Related To
317
-
318
- [`no-unnecessary-class`](https://palantir.github.io/tslint/rules/no-unnecessary-class/) from TSLint
@@ -1,6 +1,10 @@
1
- # `no-floating-promises`
1
+ ---
2
+ description: 'Require Promise-like statements to be handled appropriately.'
3
+ ---
2
4
 
3
- Requires Promise-like statements to be handled appropriately.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-floating-promises** for documentation.
4
8
 
5
9
  A "floating" Promise is one that is created without any code set up to handle any errors it might throw.
6
10
 
@@ -61,22 +65,6 @@ Promise.reject('value').finally(() => {});
61
65
 
62
66
  ## Options
63
67
 
64
- The rule accepts an options object with the following properties:
65
-
66
- ```ts
67
- type Options = {
68
- // if true, checking void expressions will be skipped
69
- ignoreVoid?: boolean;
70
- // if true, checking for async iife will be skipped
71
- ignoreIIFE?: boolean;
72
- };
73
-
74
- const defaults = {
75
- ignoreVoid: true,
76
- ignoreIIFE: false,
77
- };
78
- ```
79
-
80
68
  ### `ignoreVoid`
81
69
 
82
70
  This allows you to stop the rule reporting promises consumed with void operator.
@@ -118,4 +106,3 @@ If you do not use Promise-like values in your codebase, or want to allow them to
118
106
  ## Related To
119
107
 
120
108
  - [`no-misused-promises`](./no-misused-promises.md)
121
- - TSLint: ['no-floating-promises'](https://palantir.github.io/tslint/rules/no-floating-promises/)
@@ -1,13 +1,15 @@
1
- # `no-for-in-array`
1
+ ---
2
+ description: 'Disallow iterating over an array with a for-in loop.'
3
+ ---
2
4
 
3
- Disallows iterating over an array with a for-in loop.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-for-in-array** for documentation.
4
8
 
5
9
  This rule prohibits iterating over an array with a for-in loop.
6
10
 
7
11
  ## Rule Details
8
12
 
9
- Rationale from TSLint:
10
-
11
13
  A for-in loop (`for (var k in o)`) iterates over the properties of an Object.
12
14
  While it is legal to use for-in loops with array types, it is not common.
13
15
  for-in will iterate over the indices of the array as strings, omitting any "holes" in
@@ -41,23 +43,6 @@ for (const x in { a: 3, b: 4, c: 5 }) {
41
43
  }
42
44
  ```
43
45
 
44
- ## Options
45
-
46
- ```jsonc
47
- // .eslintrc.json
48
- {
49
- "rules": {
50
- "@typescript-eslint/no-for-in-array": "error"
51
- }
52
- }
53
- ```
54
-
55
- This rule is not configurable.
56
-
57
46
  ## When Not To Use It
58
47
 
59
48
  If you want to iterate through a loop using the indices in an array as strings, you can turn off this rule.
60
-
61
- ## Related To
62
-
63
- - TSLint: ['no-for-in-array'](https://palantir.github.io/tslint/rules/no-for-in-array/)
@@ -1,6 +1,15 @@
1
- # `no-implicit-any-catch`
1
+ ---
2
+ description: 'Disallow usage of the implicit `any` type in catch clauses.'
3
+ ---
2
4
 
3
- Disallows usage of the implicit `any` type in catch clauses.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-implicit-any-catch** for documentation.
8
+
9
+ :::danger Deprecated
10
+
11
+ This rule has been deprecated as TypeScript versions >=4 includes a `useUnknownInCatchVariables` compiler option with the same check.
12
+ :::
4
13
 
5
14
  TypeScript 4.0 added support for adding an explicit `any` or `unknown` type annotation on a catch clause variable.
6
15
 
@@ -45,26 +54,10 @@ try {
45
54
 
46
55
  ## Options
47
56
 
48
- The rule accepts an options object with the following properties:
49
-
50
- ```ts
51
- type Options = {
52
- // if false, disallow specifying `: any` as the error type as well. See also `no-explicit-any`
53
- allowExplicitAny: boolean;
54
- };
55
-
56
- const defaults = {
57
- allowExplicitAny: false,
58
- };
59
- ```
60
-
61
57
  ### `allowExplicitAny`
62
58
 
63
59
  The follow is is **_not_** considered a warning with `{ allowExplicitAny: true }`
64
60
 
65
- <!-- TODO: prettier currently removes the type annotations, re-enable this once prettier is updated -->
66
- <!-- prettier-ignore-start -->
67
-
68
61
  ```ts
69
62
  try {
70
63
  // ...
@@ -73,8 +66,6 @@ try {
73
66
  }
74
67
  ```
75
68
 
76
- <!-- prettier-ignore-end -->
77
-
78
69
  ## When Not To Use It
79
70
 
80
71
  If you are not using TypeScript 4.0 (or greater), then you will not be able to use this rule, annotations on catch clauses is not supported.
@@ -1,6 +1,10 @@
1
- # `no-implied-eval`
1
+ ---
2
+ description: 'Disallow the use of `eval()`-like methods.'
3
+ ---
2
4
 
3
- Disallows the use of `eval()`-like methods.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-implied-eval** for documentation.
4
8
 
5
9
  It's considered a good practice to avoid using `eval()`. There are security and performance implications involved with doing so, which is why many linters recommend disallowing `eval()`. However, there are some other ways to pass a string and have it interpreted as JavaScript code that have similar concerns.
6
10
 
@@ -94,22 +98,6 @@ class Foo {
94
98
  setTimeout(Foo.fn, 100);
95
99
  ```
96
100
 
97
- ## How to Use
98
-
99
- ```jsonc
100
- {
101
- // note you must disable the base rule as it can report incorrect errors
102
- "no-implied-eval": "off",
103
- "@typescript-eslint/no-implied-eval": ["error"]
104
- }
105
- ```
106
-
107
101
  ## When Not To Use It
108
102
 
109
103
  If you want to allow `new Function()` or `setTimeout()`, `setInterval()`, `setImmediate()` and `execScript()` with string arguments, then you can safely disable this rule.
110
-
111
- <sup>
112
-
113
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-implied-eval.md)
114
-
115
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-inferrable-types`
1
+ ---
2
+ description: 'Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.'
3
+ ---
2
4
 
3
- Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-inferrable-types** for documentation.
4
8
 
5
9
  Explicit types where they can be easily inferred may add unnecessary verbosity.
6
10
 
@@ -9,33 +13,11 @@ Explicit types where they can be easily inferred may add unnecessary verbosity.
9
13
  This rule disallows explicit type declarations on parameters, variables
10
14
  and properties where the type can be easily inferred from its value.
11
15
 
12
- ## Options
13
-
14
- This rule accepts the following options:
15
-
16
- ```ts
17
- interface Options {
18
- ignoreParameters?: boolean;
19
- ignoreProperties?: boolean;
20
- }
21
- ```
22
-
23
- ### Default
24
-
25
- The default options are:
26
-
27
- ```json
28
- {
29
- "ignoreParameters": false,
30
- "ignoreProperties": false
31
- }
32
- ```
33
-
34
- With these options, the following patterns are:
16
+ Examples of code with the default options:
35
17
 
36
18
  <!--tabs-->
37
19
 
38
- #### ❌ Incorrect
20
+ ### ❌ Incorrect
39
21
 
40
22
  ```ts
41
23
  const a: bigint = 10n;
@@ -76,7 +58,7 @@ class Foo {
76
58
  function fn(a: number = 5, b: boolean = true) {}
77
59
  ```
78
60
 
79
- #### ✅ Correct
61
+ ### ✅ Correct
80
62
 
81
63
  ```ts
82
64
  const a = 10n;
@@ -121,6 +103,8 @@ function fn(a: number, b: boolean, c: string) {}
121
103
 
122
104
  <!--/tabs-->
123
105
 
106
+ ## Options
107
+
124
108
  ### `ignoreParameters`
125
109
 
126
110
  When set to true, the following pattern is considered valid:
@@ -148,7 +132,3 @@ If you do not want to enforce inferred types.
148
132
  ## Further Reading
149
133
 
150
134
  TypeScript [Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)
151
-
152
- ## Related To
153
-
154
- TSLint: [no-inferrable-types](https://palantir.github.io/tslint/rules/no-inferrable-types/)
@@ -1,32 +1,12 @@
1
- # `no-invalid-this`
1
+ ---
2
+ description: 'Disallow `this` keywords outside of classes or class-like objects.'
3
+ ---
2
4
 
3
- Disallows `this` keywords outside of classes or class-like objects.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-invalid-this** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-invalid-this`](https://eslint.org/docs/rules/no-invalid-this) rule.
8
12
  It adds support for TypeScript's `this` parameters.
9
-
10
- ## How to Use
11
-
12
- ```jsonc
13
- {
14
- // note you must disable the base rule as it can report incorrect errors
15
- "no-invalid-this": "off",
16
- "@typescript-eslint/no-invalid-this": ["error"]
17
- }
18
- ```
19
-
20
- ## Options
21
-
22
- See [`eslint/no-invalid-this` options](https://eslint.org/docs/rules/no-invalid-this#options).
23
-
24
- ## When Not To Use It
25
-
26
- When you are indifferent as to how your variables are initialized.
27
-
28
- <sup>
29
-
30
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-invalid-this.md)
31
-
32
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-invalid-void-type`
1
+ ---
2
+ description: 'Disallow `void` type outside of generic or return types.'
3
+ ---
2
4
 
3
- Disallows `void` type outside of generic or return types.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-invalid-void-type** for documentation.
4
8
 
5
9
  Disallows usage of `void` type outside of return types or generic type arguments.
6
10
  If `void` is used as return type, it shouldn’t be a part of intersection/union type with most other types.
@@ -57,18 +61,6 @@ type stillVoid = void | never;
57
61
 
58
62
  ## Options
59
63
 
60
- ```ts
61
- interface Options {
62
- allowInGenericTypeArguments?: boolean | string[];
63
- allowAsThisParameter?: boolean;
64
- }
65
-
66
- const defaultOptions: Options = {
67
- allowInGenericTypeArguments: true,
68
- allowAsThisParameter: false,
69
- };
70
- ```
71
-
72
64
  ### `allowInGenericTypeArguments`
73
65
 
74
66
  This option lets you control if `void` can be used as a valid value for generic type parameters.
@@ -126,7 +118,3 @@ class Example {
126
118
 
127
119
  If you don't care about if `void` is used with other types,
128
120
  or in invalid places, then you don't need this rule.
129
-
130
- ## Related To
131
-
132
- - TSLint: [invalid-void](https://palantir.github.io/tslint/rules/invalid-void/)
@@ -1,28 +1,12 @@
1
- # `no-loop-func`
1
+ ---
2
+ description: 'Disallow function declarations that contain unsafe references inside loop statements.'
3
+ ---
2
4
 
3
- Disallows function declarations that contain unsafe references inside loop statements.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-loop-func** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-loop-func`](https://eslint.org/docs/rules/no-loop-func) rule.
8
12
  It adds support for TypeScript types.
9
-
10
- ## How to Use
11
-
12
- ```jsonc
13
- {
14
- // note you must disable the base rule as it can report incorrect errors
15
- "no-loop-func": "off",
16
- "@typescript-eslint/no-loop-func": ["error"]
17
- }
18
- ```
19
-
20
- ## Options
21
-
22
- See [`eslint/no-loop-func` options](https://eslint.org/docs/rules/no-loop-func#options).
23
-
24
- <sup>
25
-
26
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-loop-func.md)
27
-
28
- </sup>
@@ -1,25 +1,12 @@
1
- # `no-loss-of-precision`
1
+ ---
2
+ description: 'Disallow literal numbers that lose precision.'
3
+ ---
2
4
 
3
- Disallows literal numbers that lose precision.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-loss-of-precision`](https://eslint.org/docs/rules/no-loss-of-precision) rule.
8
12
  It adds support for [numeric separators](https://github.com/tc39/proposal-numeric-separator).
9
- Note that this rule requires ESLint v7.
10
-
11
- ## How to Use
12
-
13
- ```jsonc
14
- {
15
- // note you must disable the base rule as it can report incorrect errors
16
- "no-loss-of-precision": "off",
17
- "@typescript-eslint/no-loss-of-precision": ["error"]
18
- }
19
- ```
20
-
21
- <sup>
22
-
23
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-loss-of-precision.md)
24
-
25
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-magic-numbers`
1
+ ---
2
+ description: 'Disallow magic numbers.'
3
+ ---
2
4
 
3
- Disallows magic numbers.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-magic-numbers** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -11,24 +15,8 @@ It adds support for:
11
15
  - `enum` members (`enum Foo { bar = 1 }`),
12
16
  - `readonly` class properties (`class Foo { readonly bar = 1 }`).
13
17
 
14
- ## How to Use
15
-
16
- ```jsonc
17
- {
18
- // note you must disable the base rule as it can report incorrect errors
19
- "no-magic-numbers": "off",
20
- "@typescript-eslint/no-magic-numbers": [
21
- "error",
22
- {
23
- /* options */
24
- }
25
- ]
26
- }
27
- ```
28
-
29
18
  ## Options
30
19
 
31
- See [`eslint/no-magic-numbers` options](https://eslint.org/docs/rules/no-magic-numbers#options).
32
20
  This rule adds the following options:
33
21
 
34
22
  ```ts
@@ -141,9 +129,3 @@ Examples of **correct** code for the `{ "ignoreTypeIndexes": true }` option:
141
129
  type Foo = Bar[0];
142
130
  type Baz = Parameters<Foo>[2];
143
131
  ```
144
-
145
- <sup>
146
-
147
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-magic-numbers.md)
148
-
149
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-meaningless-void-operator`
1
+ ---
2
+ description: 'Disallow the `void` operator except when used to discard a value.'
3
+ ---
2
4
 
3
- Disallows the `void` operator except when used to discard a value.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-meaningless-void-operator** for documentation.
4
8
 
5
9
  Disallows the `void` operator when its argument is already of type `void` or `undefined`.
6
10
 
@@ -1,6 +1,10 @@
1
- # `no-misused-new`
1
+ ---
2
+ description: 'Enforce valid definition of `new` and `constructor`.'
3
+ ---
2
4
 
3
- Enforces valid definition of `new` and `constructor`.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-misused-new** for documentation.
4
8
 
5
9
  Warns on apparent attempts to define constructors for interfaces or `new` for classes.
6
10
 
@@ -33,20 +37,3 @@ interface I {
33
37
  new (): C;
34
38
  }
35
39
  ```
36
-
37
- ## Options
38
-
39
- ```jsonc
40
- // .eslintrc.json
41
- {
42
- "rules": {
43
- "@typescript-eslint/no-misused-new": "error"
44
- }
45
- }
46
- ```
47
-
48
- This rule is not configurable.
49
-
50
- ## Related To
51
-
52
- - TSLint: [no-misused-new](https://palantir.github.io/tslint/rules/no-misused-new/)