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,6 +1,10 @@
1
- # `no-non-null-asserted-nullish-coalescing`
1
+ ---
2
+ description: 'Disallow non-null assertions in the left operand of a nullish coalescing operator.'
3
+ ---
2
4
 
3
- Disallows non-null assertions in the left operand of a nullish coalescing operator.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -45,19 +49,6 @@ let x: string;
45
49
  x! ?? '';
46
50
  ```
47
51
 
48
- ## Options
49
-
50
- ```jsonc
51
- // .eslintrc.json
52
- {
53
- "rules": {
54
- "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn"
55
- }
56
- }
57
- ```
58
-
59
- This rule is not configurable.
60
-
61
52
  ## When Not To Use It
62
53
 
63
54
  If you are not using TypeScript 3.7 (or greater), then you will not need to use this rule, as the nullish coalescing operator is not supported.
@@ -1,6 +1,10 @@
1
- # `no-non-null-asserted-optional-chain`
1
+ ---
2
+ description: 'Disallow non-null assertions after an optional chain expression.'
3
+ ---
2
4
 
3
- Disallows non-null assertions after an optional chain expression.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -44,19 +48,6 @@ foo?.bar!();
44
48
  foo?.bar!().baz;
45
49
  ```
46
50
 
47
- ## Options
48
-
49
- ```jsonc
50
- // .eslintrc.json
51
- {
52
- "rules": {
53
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error"
54
- }
55
- }
56
- ```
57
-
58
- This rule is not configurable.
59
-
60
51
  ## When Not To Use It
61
52
 
62
53
  If you are not using TypeScript 3.7 (or greater), then you will not need to use this rule, as the operator is not supported.
@@ -1,6 +1,10 @@
1
- # `no-non-null-assertion`
1
+ ---
2
+ description: 'Disallow non-null assertions using the `!` postfix operator.'
3
+ ---
2
4
 
3
- Disallows non-null assertions using the `!` postfix operator.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-non-null-assertion** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -32,19 +36,6 @@ const foo: Foo = getFoo();
32
36
  const includesBaz: boolean = foo.bar?.includes('baz') ?? false;
33
37
  ```
34
38
 
35
- ## Options
36
-
37
- ```jsonc
38
- // .eslintrc.json
39
- {
40
- "rules": {
41
- "@typescript-eslint/no-non-null-assertion": "warn"
42
- }
43
- }
44
- ```
45
-
46
- This rule is not configurable.
47
-
48
39
  ## When Not To Use It
49
40
 
50
41
  If you don't care about strict null-checking, then you will not need this rule.
@@ -1,6 +1,15 @@
1
- # `no-parameter-properties`
1
+ ---
2
+ description: 'Disallow the use of parameter properties in class constructors.'
3
+ ---
2
4
 
3
- Disallows the use of parameter properties in class constructors.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-parameter-properties** for documentation.
8
+
9
+ :::danger Deprecated
10
+
11
+ This rule has been deprecated in favour of the equivalent, better named [`parameter-properties`](./parameter-properties) rule.
12
+ :::
4
13
 
5
14
  Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways
6
15
  of declaring and initializing class members.
@@ -1,25 +1,18 @@
1
- # `no-redeclare`
1
+ ---
2
+ description: 'Disallow variable redeclaration.'
3
+ ---
2
4
 
3
- Disallows variable redeclaration.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-redeclare** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-redeclare`](https://eslint.org/docs/rules/no-redeclare) rule.
8
12
  It adds support for TypeScript function overloads, and declaration merging.
9
13
 
10
- ## How to Use
11
-
12
- ```jsonc
13
- {
14
- // note you must disable the base rule as it can report incorrect errors
15
- "no-redeclare": "off",
16
- "@typescript-eslint/no-redeclare": ["error"]
17
- }
18
- ```
19
-
20
14
  ## Options
21
15
 
22
- See [`eslint/no-redeclare` options](https://eslint.org/docs/rules/no-redeclare#options).
23
16
  This rule adds the following options:
24
17
 
25
18
  ```ts
@@ -78,9 +71,3 @@ type something = string;
78
71
  // eslint-disable-next-line @typescript-eslint/no-redeclare -- intentionally naming the variable the same as the type
79
72
  const something = 2;
80
73
  ```
81
-
82
- <sup>
83
-
84
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-redeclare.md)
85
-
86
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-redundant-type-constituents`
1
+ ---
2
+ description: 'Disallow members of unions and intersections that do nothing or override type information.'
3
+ ---
2
4
 
3
- Disallows members of unions and intersections that do nothing or override type information.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-redundant-type-constituents** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -66,19 +70,6 @@ type IntersectionStringLiteral = 'foo';
66
70
  type ReturnUnionNever = () => string | never;
67
71
  ```
68
72
 
69
- ## Options
70
-
71
- ```jsonc
72
- // .eslintrc.json
73
- {
74
- "rules": {
75
- "@typescript-eslint/no-redundant-type-constituents": "warn"
76
- }
77
- }
78
- ```
79
-
80
- This rule is not configurable.
81
-
82
73
  ## Limitations
83
74
 
84
75
  This rule plays it safe and only works with bottom types, top types, and comparing literal types to primitive types.
@@ -1,6 +1,10 @@
1
- # `no-require-imports`
1
+ ---
2
+ description: 'Disallow invocation of `require()`.'
3
+ ---
2
4
 
3
- Disallows invocation of `require()`.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-require-imports** for documentation.
4
8
 
5
9
  Prefer the newer ES6-style imports over `require()`.
6
10
 
@@ -31,19 +35,6 @@ import lib9 = lib2.anotherSubImport;
31
35
  import lib10 from 'lib10';
32
36
  ```
33
37
 
34
- ## Options
35
-
36
- ```jsonc
37
- // .eslintrc.json
38
- {
39
- "rules": {
40
- "@typescript-eslint/no-require-imports": "warn"
41
- }
42
- }
43
- ```
44
-
45
- This rule is not configurable.
46
-
47
38
  ## When Not To Use It
48
39
 
49
40
  If you don't care about TypeScript module syntax, then you will not need this rule.
@@ -1,24 +1,17 @@
1
- # `no-restricted-imports`
1
+ ---
2
+ description: 'Disallow specified modules when loaded by `import`.'
3
+ ---
2
4
 
3
- Disallows specified modules when loaded by `import`.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-restricted-imports** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-restricted-imports`](https://eslint.org/docs/rules/no-restricted-imports) rule.
8
12
 
9
- ## How to Use
10
-
11
- ```jsonc
12
- {
13
- // note you must disable the base rule as it can report incorrect errors
14
- "no-restricted-imports": "off",
15
- "@typescript-eslint/no-restricted-imports": ["error"]
16
- }
17
- ```
18
-
19
13
  ## Options
20
14
 
21
- See [`eslint/no-restricted-imports` options](https://eslint.org/docs/rules/no-restricted-imports#options).
22
15
  This rule adds the following options:
23
16
 
24
17
  ### `allowTypeImports`
@@ -1,25 +1,18 @@
1
- # `no-shadow`
1
+ ---
2
+ description: 'Disallow variable declarations from shadowing variables declared in the outer scope.'
3
+ ---
2
4
 
3
- Disallows variable declarations from shadowing variables declared in the outer scope.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-shadow** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/no-shadow`](https://eslint.org/docs/rules/no-shadow) rule.
8
12
  It adds support for TypeScript's `this` parameters and global augmentation, and adds options for TypeScript features.
9
13
 
10
- ## How to Use
11
-
12
- ```jsonc
13
- {
14
- // note you must disable the base rule as it can report incorrect errors
15
- "no-shadow": "off",
16
- "@typescript-eslint/no-shadow": ["error"]
17
- }
18
- ```
19
-
20
14
  ## Options
21
15
 
22
- See [`eslint/no-shadow` options](https://eslint.org/docs/rules/no-shadow#options).
23
16
  This rule adds the following options:
24
17
 
25
18
  ```ts
@@ -85,9 +78,3 @@ Examples of **correct** code with `{ ignoreFunctionTypeParameterNameValueShadow:
85
78
  const test = 1;
86
79
  type Func = (test: string) => typeof test;
87
80
  ```
88
-
89
- <sup>
90
-
91
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-shadow.md)
92
-
93
- </sup>
@@ -1,6 +1,10 @@
1
- # `no-this-alias`
1
+ ---
2
+ description: 'Disallow aliasing `this`.'
3
+ ---
2
4
 
3
- Disallows aliasing `this`.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-this-alias** for documentation.
4
8
 
5
9
  This rule prohibits assigning variables to `this`.
6
10
 
@@ -35,22 +39,6 @@ Examples of **correct** code for this rule:
35
39
 
36
40
  (see the rationale above)
37
41
 
38
- ## Options
39
-
40
- You can pass an object option:
41
-
42
- ```jsonc
43
- {
44
- "@typescript-eslint/no-this-alias": [
45
- "error",
46
- {
47
- "allowDestructuring": false, // Disallow `const { props, state } = this`; true by default
48
- "allowedNames": ["self"] // Allow `const self = this`; `[]` by default
49
- }
50
- ]
51
- }
52
- ```
53
-
54
42
  ## When Not To Use It
55
43
 
56
44
  If you need to assign `this` to variables, you shouldn’t use this rule.
@@ -1,6 +1,10 @@
1
- # `no-throw-literal`
1
+ ---
2
+ description: 'Disallow throwing literals as exceptions.'
3
+ ---
2
4
 
3
- Disallows throwing literals as exceptions.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-throw-literal** for documentation.
4
8
 
5
9
  It is considered good practice to only `throw` the `Error` object itself or an object using the `Error` object as base objects for user-defined exceptions.
6
10
  The fundamental benefit of `Error` objects is that they automatically keep track of where they were built and originated.
@@ -85,34 +89,26 @@ class CustomError extends Error {
85
89
  throw new CustomError();
86
90
  ```
87
91
 
88
- ## How to Use
92
+ ## Options
89
93
 
90
- ```jsonc
91
- {
92
- // note you must disable the base rule as it can report incorrect errors
93
- "no-throw-literal": "off",
94
- "@typescript-eslint/no-throw-literal": ["error"]
95
- }
96
- ```
94
+ This rule adds the following options:
97
95
 
98
- ### Options
99
-
100
- ```jsonc
101
- {
102
- "@typescript-eslint/no-throw-literal": [
103
- "error",
104
- {
105
- "allowThrowingAny": true, // Default is to allow throwing values of type any
106
- "allowThrowingUnknown": true // Default is to allow throwing values of type unknown
107
- }
108
- ]
96
+ ```ts
97
+ interface Options extends BaseNoShadowOptions {
98
+ /**
99
+ * Whether to always allow throwing values typed as `any`.
100
+ */
101
+ allowThrowingAny?: boolean;
102
+
103
+ /**
104
+ * Whether to always allow throwing values typed as `unknown`.
105
+ */
106
+ allowThrowingUnknown?: boolean;
109
107
  }
110
- ```
111
108
 
112
- ---
113
-
114
- <sup>
115
-
116
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-throw-literal.md)
117
-
118
- </sup>
109
+ const defaultOptions: Options = {
110
+ ...baseNoShadowDefaultOptions,
111
+ allowThrowingAny: false,
112
+ allowThrowingUnknown: false,
113
+ };
114
+ ```
@@ -1,6 +1,10 @@
1
- # `no-type-alias`
1
+ ---
2
+ description: 'Disallow type aliases.'
3
+ ---
2
4
 
3
- Disallows type aliases.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-type-alias** for documentation.
4
8
 
5
9
  In TypeScript, type aliases serve three purposes:
6
10
 
@@ -81,18 +85,6 @@ and simplified types (primitives, tuples, unions, intersections, etc).
81
85
 
82
86
  ## Options
83
87
 
84
- This rule, in its default state, does not require any argument. If you would like to enable one
85
- or more of the following you may pass an object with the options set as follows:
86
-
87
- - `allowAliases` set to `"always"` will allow you to do aliasing (Defaults to `"never"`).
88
- - `allowCallbacks` set to `"always"` will allow you to use type aliases with callbacks (Defaults to `"never"`)
89
- - `allowConditionalTypes` set to `"always"` will allow you to use type aliases with conditional types (Defaults to `"never"`)
90
- - `allowConstructors` set to `"always"` will allow you to use type aliases with constructors (Defaults to `"never"`)
91
- - `allowLiterals` set to `"always"` will allow you to use type aliases with literal objects (Defaults to `"never"`)
92
- - `allowMappedTypes` set to `"always"` will allow you to use type aliases as mapping tools (Defaults to `"never"`)
93
- - `allowTupleTypes` set to `"always"` will allow you to use type aliases with tuples (Defaults to `"never"`)
94
- - `allowGenerics` set to `"always"` will allow you to use type aliases with generics (Defaults to `"never"`)
95
-
96
88
  ### `allowAliases`
97
89
 
98
90
  This applies to primitive types and reference types.
@@ -1,6 +1,10 @@
1
- # `no-unnecessary-boolean-literal-compare`
1
+ ---
2
+ description: 'Disallow unnecessary equality comparisons against boolean literals.'
3
+ ---
2
4
 
3
- Disallows unnecessary equality comparisons against boolean literals.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare** for documentation.
4
8
 
5
9
  Comparing boolean values to boolean literals is unnecessary, those comparisons result in the same booleans. Using the boolean values directly, or via a unary negation (`!value`), is more concise and clearer.
6
10
 
@@ -50,30 +54,10 @@ if (someStringBoolean === true) {
50
54
 
51
55
  ## Options
52
56
 
53
- The rule accepts an options object with the following properties.
54
-
55
- ```ts
56
- type Options = {
57
- // if false, comparisons between a nullable boolean variable to `true` will be checked and fixed
58
- allowComparingNullableBooleansToTrue?: boolean;
59
- // if false, comparisons between a nullable boolean variable to `false` will be checked and fixed
60
- allowComparingNullableBooleansToFalse?: boolean;
61
- };
62
- ```
63
-
64
- ### Defaults
65
-
66
57
  This rule always checks comparisons between a boolean variable and a boolean
67
58
  literal. Comparisons between nullable boolean variables and boolean literals
68
59
  are **not** checked by default.
69
60
 
70
- ```ts
71
- const defaults = {
72
- allowComparingNullableBooleansToTrue: true,
73
- allowComparingNullableBooleansToFalse: true,
74
- };
75
- ```
76
-
77
61
  ### `allowComparingNullableBooleansToTrue`
78
62
 
79
63
  Examples of code for this rule with `{ allowComparingNullableBooleansToTrue: false }`:
@@ -1,6 +1,10 @@
1
- # `no-unnecessary-condition`
1
+ ---
2
+ description: 'Disallow conditionals where the type is always truthy or always falsy.'
3
+ ---
2
4
 
3
- Disallows conditionals where the type is always truthy or always falsy.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unnecessary-condition** for documentation.
4
8
 
5
9
  Any expression being used as a condition must be able to evaluate as truthy or falsy in order to be considered "necessary". Conversely, any expression that always evaluates to truthy or always evaluates to falsy, as determined by the type of the expression, is considered unnecessary and will be flagged by this rule.
6
10
 
@@ -70,20 +74,6 @@ function bar(arg?: string | null) {
70
74
 
71
75
  ## Options
72
76
 
73
- ```ts
74
- type Options = {
75
- // if true, the rule will ignore constant loop conditions
76
- allowConstantLoopConditions?: boolean;
77
- // if true, the rule will not error when running with a tsconfig that has strictNullChecks turned **off**
78
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
79
- };
80
-
81
- const defaultOptions: Options = {
82
- allowConstantLoopConditions: false,
83
- allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
84
- };
85
- ```
86
-
87
77
  ### `allowConstantLoopConditions`
88
78
 
89
79
  Example of correct code for `{ allowConstantLoopConditions: true }`:
@@ -1,6 +1,10 @@
1
- # `no-unnecessary-qualifier`
1
+ ---
2
+ description: 'Disallow unnecessary namespace qualifiers.'
3
+ ---
2
4
 
3
- Disallows unnecessary namespace qualifiers.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unnecessary-qualifier** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -76,19 +80,6 @@ namespace X {
76
80
  }
77
81
  ```
78
82
 
79
- ## Options
80
-
81
- ```jsonc
82
- // .eslintrc.json
83
- {
84
- "rules": {
85
- "@typescript-eslint/no-unnecessary-qualifier": "warn"
86
- }
87
- }
88
- ```
89
-
90
- This rule is not configurable.
91
-
92
83
  ## When Not To Use It
93
84
 
94
85
  If you don't care about having unneeded namespace or enum qualifiers, then you don't need to use this rule.
@@ -1,6 +1,10 @@
1
- # `no-unnecessary-type-arguments`
1
+ ---
2
+ description: 'Disallow type arguments that are equal to the default.'
3
+ ---
2
4
 
3
- Disallows type arguments that are equal to the default.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unnecessary-type-arguments** for documentation.
4
8
 
5
9
  Warns if an explicitly specified type argument is the default for that type parameter.
6
10
 
@@ -53,16 +57,3 @@ class D extends C<string> {}
53
57
  interface I<T = number> {}
54
58
  class Impl implements I<string> {}
55
59
  ```
56
-
57
- ## Options
58
-
59
- ```jsonc
60
- // .eslintrc.json
61
- {
62
- "rules": {
63
- "@typescript-eslint/no-unnecessary-type-arguments": "warn"
64
- }
65
- }
66
- ```
67
-
68
- This rule is not configurable.
@@ -1,6 +1,10 @@
1
- # `no-unnecessary-type-assertion`
1
+ ---
2
+ description: 'Disallow type assertions that do not change the type of an expression.'
3
+ ---
2
4
 
3
- Disallows type assertions that do not change the type of an expression.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unnecessary-type-assertion** for documentation.
4
8
 
5
9
  This rule prohibits using a type assertion that does not change the type of an expression.
6
10
 
@@ -61,9 +65,9 @@ function foo(x: number | undefined): number {
61
65
 
62
66
  ## Options
63
67
 
64
- This rule optionally takes an object with a single property `typesToIgnore`, which can be set to a list of type names to ignore.
68
+ ### `typesToIgnore`
65
69
 
66
- For example, with `@typescript-eslint/no-unnecessary-type-assertion: ["error", { typesToIgnore: ['Foo'] }]`, the following is **correct** code":
70
+ With `@typescript-eslint/no-unnecessary-type-assertion: ["error", { typesToIgnore: ['Foo'] }]`, the following is **correct** code":
67
71
 
68
72
  ```ts
69
73
  type Foo = 3;
@@ -1,6 +1,10 @@
1
- # `no-unnecessary-type-constraint`
1
+ ---
2
+ description: 'Disallow unnecessary constraints on generic types.'
3
+ ---
2
4
 
3
- Disallows unnecessary constraints on generic types.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unnecessary-type-constraint** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -56,19 +60,6 @@ const Quux = <T>() => {};
56
60
  function Quuz<T>() {}
57
61
  ```
58
62
 
59
- ## Options
60
-
61
- ```jsonc
62
- // .eslintrc.json
63
- {
64
- "rules": {
65
- "@typescript-eslint/no-unnecessary-type-constraint": "error"
66
- }
67
- }
68
- ```
69
-
70
- This rule is not configurable.
71
-
72
63
  ## When Not To Use It
73
64
 
74
65
  If you don't care about the specific styles of your type constraints, or never use them in the first place, then you will not need this rule.
@@ -1,6 +1,10 @@
1
- # `no-unsafe-argument`
1
+ ---
2
+ description: 'Disallow calling a function with a value with type `any`.'
3
+ ---
2
4
 
3
- Disallows calling a function with a value with type `any`.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/no-unsafe-argument** for documentation.
4
8
 
5
9
  Despite your best intentions, the `any` type can sometimes leak into your codebase.
6
10
  Call a function with `any` typed argument are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase.
@@ -71,19 +75,6 @@ declare function foo(arg1: unknown, arg2: Set<unkown>, arg3: unknown[]): void;
71
75
  foo(1 as any, new Set<any>(), [] as any[]);
72
76
  ```
73
77
 
74
- ## Options
75
-
76
- ```jsonc
77
- // .eslintrc.json
78
- {
79
- "rules": {
80
- "@typescript-eslint/no-unsafe-argument": "error"
81
- }
82
- }
83
- ```
84
-
85
- This rule is not configurable.
86
-
87
78
  ## Related To
88
79
 
89
80
  - [`no-explicit-any`](./no-explicit-any.md)