xo 0.49.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 (486) hide show
  1. package/cli.js +1 -1
  2. package/config/plugins.cjs +24 -24
  3. package/index.js +7 -2
  4. package/lib/constants.js +6 -6
  5. package/lib/options-manager.js +92 -9
  6. package/lib/report.js +3 -1
  7. package/node_modules/@typescript-eslint/eslint-plugin/README.md +2 -149
  8. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +1 -1
  9. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
  10. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js +1 -1
  11. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map +1 -1
  12. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +2 -6
  13. package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
  14. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +22 -9
  15. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
  16. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js +1 -1
  17. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map +1 -1
  18. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +70 -63
  19. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
  20. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js +1 -1
  21. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js.map +1 -1
  22. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +1 -1
  23. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +1 -1
  24. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js +1 -1
  25. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js +11 -11
  26. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-dangle.js.map +1 -1
  27. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js +1 -1
  28. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map +1 -1
  29. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +100 -0
  30. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -0
  31. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js +2 -2
  32. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-indexed-object-style.js.map +1 -1
  33. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +1 -1
  34. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map +1 -1
  35. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js +1 -1
  36. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map +1 -1
  37. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js +1 -1
  38. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-exports.js.map +1 -1
  39. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +1 -1
  40. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map +1 -1
  41. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js +1 -1
  42. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +14 -8
  43. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -1
  44. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js +133 -43
  45. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map +1 -1
  46. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js +12 -1
  47. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map +1 -1
  48. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +2 -0
  49. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
  50. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js +1 -1
  51. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js +18 -3
  52. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map +1 -1
  53. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +9 -2
  54. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
  55. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js +1 -1
  56. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js.map +1 -1
  57. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +1 -1
  58. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map +1 -1
  59. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js +2 -2
  60. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map +1 -1
  61. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +1 -1
  62. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js.map +1 -1
  63. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js +1 -1
  64. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-enum-values.js.map +1 -1
  65. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-imports.js +2 -0
  66. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-imports.js.map +1 -1
  67. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js +1 -1
  68. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map +1 -1
  69. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js +11 -1
  70. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map +1 -1
  71. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +0 -1
  72. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -1
  73. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +3 -2
  74. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -1
  75. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js +8 -2
  76. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map +1 -1
  77. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js +5 -1
  78. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map +1 -1
  79. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +9 -4
  80. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -1
  81. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js +1 -1
  82. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map +1 -1
  83. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +10 -2
  84. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -1
  85. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js +1 -1
  86. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map +1 -1
  87. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js +0 -1
  88. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-meaningless-void-operator.js.map +1 -1
  89. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +29 -3
  90. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map +1 -1
  91. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js +3 -1
  92. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map +1 -1
  93. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +1 -1
  94. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js.map +1 -1
  95. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js +1 -2
  96. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map +1 -1
  97. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js +1 -2
  98. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map +1 -1
  99. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js +1 -1
  100. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map +1 -1
  101. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +38 -8
  102. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
  103. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js +2 -0
  104. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map +1 -1
  105. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js +10 -1
  106. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map +1 -1
  107. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +3 -1
  108. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +1 -1
  109. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +3 -1
  110. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +1 -1
  111. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +1 -1
  112. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map +1 -1
  113. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js +1 -1
  114. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js.map +1 -1
  115. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js +2 -1
  116. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map +1 -1
  117. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js +4 -2
  118. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-constraint.js.map +1 -1
  119. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +8 -8
  120. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +1 -1
  121. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js +8 -8
  122. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js.map +1 -1
  123. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js +1 -1
  124. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js.map +1 -1
  125. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js +4 -4
  126. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js.map +1 -1
  127. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js +1 -1
  128. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map +1 -1
  129. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +4 -3
  130. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -1
  131. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +42 -12
  132. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -1
  133. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js +6 -3
  134. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map +1 -1
  135. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js +1 -2
  136. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-empty-export.js.map +1 -1
  137. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js +1 -1
  138. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map +1 -1
  139. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js +1 -2
  140. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/non-nullable-type-assertion-style.js.map +1 -1
  141. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +1 -0
  142. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +1 -1
  143. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +6 -6
  144. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +1 -1
  145. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js +32 -24
  146. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/parameter-properties.js.map +1 -1
  147. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js +6 -2
  148. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map +1 -1
  149. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js +1 -2
  150. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map +1 -1
  151. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +1 -1
  152. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map +1 -1
  153. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +1 -1
  154. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map +1 -1
  155. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js +1 -1
  156. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js.map +1 -1
  157. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js +1 -1
  158. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map +1 -1
  159. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +134 -5
  160. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +1 -1
  161. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +166 -86
  162. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
  163. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js +1 -1
  164. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js.map +1 -1
  165. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +8 -3
  166. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map +1 -1
  167. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js +1 -1
  168. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js.map +1 -1
  169. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +1 -1
  170. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map +1 -1
  171. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +1 -1
  172. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map +1 -1
  173. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js +1 -1
  174. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js.map +1 -1
  175. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +3 -1
  176. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
  177. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +2 -1
  178. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -1
  179. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js +1 -1
  180. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map +1 -1
  181. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js +3 -1
  182. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map +1 -1
  183. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +21 -6
  184. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +1 -1
  185. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js +2 -2
  186. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map +1 -1
  187. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +4 -1
  188. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
  189. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js +1 -1
  190. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js.map +1 -1
  191. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js +1 -1
  192. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map +1 -1
  193. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js +22 -26
  194. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-infix-ops.js.map +1 -1
  195. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +1 -1
  196. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map +1 -1
  197. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +1 -2
  198. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
  199. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +1 -1
  200. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map +1 -1
  201. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js +24 -20
  202. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map +1 -1
  203. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +2 -1
  204. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
  205. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +2 -1
  206. package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -1
  207. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +3 -0
  208. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
  209. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js +27 -0
  210. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNodeEqual.js.map +1 -0
  211. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +9 -0
  212. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -0
  213. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js +9 -0
  214. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isUndefinedIdentifier.js.map +1 -0
  215. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +36 -1
  216. package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map +1 -1
  217. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +4 -141
  218. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/TEMPLATE.md +3 -38
  219. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md +6 -27
  220. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md +6 -33
  221. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +6 -27
  222. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md +30 -33
  223. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md +6 -23
  224. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +77 -101
  225. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md +6 -30
  226. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md +3 -1
  227. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md +9 -13
  228. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-dangle.md +10 -36
  229. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md +6 -30
  230. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-generic-constructors.md +73 -0
  231. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +19 -29
  232. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md +9 -34
  233. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md +15 -30
  234. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +9 -24
  235. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -27
  236. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md +8 -32
  237. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md +10 -30
  238. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +9 -43
  239. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md +9 -40
  240. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md +12 -57
  241. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md +6 -30
  242. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md +11 -31
  243. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md +6 -30
  244. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md +6 -30
  245. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md +8 -32
  246. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md +6 -10
  247. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +34 -21
  248. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md +6 -10
  249. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +6 -10
  250. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md +6 -30
  251. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md +8 -20
  252. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +6 -23
  253. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-void-expression.md +6 -50
  254. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md +6 -30
  255. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-enum-values.md +10 -27
  256. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-imports.md +9 -33
  257. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md +6 -27
  258. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md +20 -34
  259. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +6 -14
  260. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md +6 -30
  261. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +6 -23
  262. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md +6 -30
  263. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md +6 -30
  264. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md +252 -50
  265. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md +6 -27
  266. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md +6 -29
  267. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md +13 -28
  268. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md +6 -26
  269. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md +11 -39
  270. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md +6 -34
  271. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md +6 -26
  272. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md +6 -30
  273. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md +6 -27
  274. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md +6 -32
  275. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-meaningless-void-operator.md +7 -11
  276. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md +6 -27
  277. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md +62 -13
  278. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md +10 -25
  279. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +6 -23
  280. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +6 -23
  281. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +6 -27
  282. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md +11 -14
  283. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md +6 -27
  284. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redundant-type-constituents.md +6 -23
  285. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md +6 -27
  286. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-restricted-imports.md +6 -21
  287. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +6 -27
  288. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md +24 -50
  289. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md +25 -37
  290. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md +22 -26
  291. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +6 -34
  292. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md +6 -24
  293. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +6 -27
  294. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +6 -27
  295. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +8 -16
  296. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +6 -23
  297. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-argument.md +6 -24
  298. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md +6 -24
  299. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md +6 -24
  300. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md +6 -24
  301. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md +6 -24
  302. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-expressions.md +6 -30
  303. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unused-vars.md +6 -30
  304. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-use-before-define.md +6 -31
  305. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-constructor.md +7 -31
  306. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-useless-empty-export.md +6 -23
  307. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-var-requires.md +6 -27
  308. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +6 -23
  309. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/object-curly-spacing.md +6 -30
  310. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/padding-line-between-statements.md +10 -39
  311. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/parameter-properties.md +6 -14
  312. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-as-const.md +6 -23
  313. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-enum-initializers.md +6 -23
  314. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-for-of.md +6 -27
  315. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +6 -27
  316. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-includes.md +6 -23
  317. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-literal-enum-member.md +6 -10
  318. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-namespace-keyword.md +6 -27
  319. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +48 -10
  320. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-optional-chain.md +18 -25
  321. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +8 -25
  322. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-readonly.md +6 -16
  323. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +6 -23
  324. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-regexp-exec.md +6 -23
  325. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-return-this-type.md +6 -23
  326. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +6 -24
  327. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-ts-expect-error.md +6 -23
  328. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +6 -44
  329. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/quotes.md +6 -30
  330. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-array-sort-compare.md +6 -26
  331. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/require-await.md +6 -28
  332. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-plus-operands.md +6 -36
  333. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +6 -35
  334. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/return-await.md +6 -20
  335. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/semi.md +6 -30
  336. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +6 -53
  337. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-blocks.md +10 -30
  338. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-before-function-paren.md +6 -30
  339. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/space-infix-ops.md +7 -31
  340. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -34
  341. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +6 -23
  342. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/triple-slash-reference.md +9 -16
  343. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/type-annotation-spacing.md +8 -26
  344. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/typedef.md +12 -40
  345. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unbound-method.md +7 -35
  346. package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +11 -29
  347. package/node_modules/@typescript-eslint/eslint-plugin/package.json +7 -7
  348. package/node_modules/@typescript-eslint/parser/README.md +15 -11
  349. package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -1
  350. package/node_modules/@typescript-eslint/parser/dist/parser.js +1 -8
  351. package/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -1
  352. package/node_modules/@typescript-eslint/parser/package.json +8 -7
  353. package/node_modules/@typescript-eslint/scope-manager/dist/lib/base-config.d.ts +9 -9
  354. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +1 -1
  355. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +1 -1
  356. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +4 -0
  357. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +1 -1
  358. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +44 -4
  359. package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -1
  360. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.d.ts.map +1 -1
  361. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js +2 -11
  362. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.bigint.js.map +1 -1
  363. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.d.ts.map +1 -1
  364. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts +3 -0
  365. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.d.ts.map +1 -0
  366. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js +11 -0
  367. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.date.js.map +1 -0
  368. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js +3 -1
  369. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.js.map +1 -1
  370. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts +3 -0
  371. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.d.ts.map +1 -0
  372. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js +11 -0
  373. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2020.number.js.map +1 -0
  374. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js +1 -1
  375. package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.object.js.map +1 -1
  376. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.d.ts.map +1 -1
  377. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js +2 -11
  378. package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.bigint.js.map +1 -1
  379. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +2 -0
  380. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +1 -1
  381. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +4 -0
  382. package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +1 -1
  383. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +1 -1
  384. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +13 -1
  385. package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +1 -1
  386. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +2 -0
  387. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
  388. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +12 -4
  389. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
  390. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +1 -0
  391. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
  392. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +4 -0
  393. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
  394. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.d.ts.map +1 -1
  395. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js +13 -7
  396. package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
  397. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts +1 -1
  398. package/node_modules/@typescript-eslint/scope-manager/dist/scope/ClassStaticBlockScope.d.ts.map +1 -1
  399. package/node_modules/@typescript-eslint/scope-manager/package.json +6 -6
  400. package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +27 -27
  401. package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +1 -1
  402. package/node_modules/@typescript-eslint/type-utils/package.json +6 -6
  403. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +412 -68
  404. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
  405. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +1 -0
  406. package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
  407. package/node_modules/@typescript-eslint/types/dist/lib.d.ts +1 -1
  408. package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +1 -1
  409. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +1 -1
  410. package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
  411. package/node_modules/@typescript-eslint/types/package.json +5 -4
  412. package/node_modules/@typescript-eslint/typescript-estree/README.md +1 -1
  413. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
  414. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +34 -13
  415. package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
  416. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.d.ts.map +1 -1
  417. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js +2 -1
  418. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createIsolatedProgram.js.map +1 -1
  419. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
  420. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +34 -1
  421. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
  422. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js +2 -2
  423. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createSourceFile.js.map +1 -1
  424. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts +5 -0
  425. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.d.ts.map +1 -0
  426. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js +72 -0
  427. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getScriptKind.js.map +1 -0
  428. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +1 -2
  429. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
  430. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +8 -23
  431. package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
  432. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +1 -0
  433. package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
  434. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +1 -0
  435. package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
  436. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts +3 -0
  437. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
  438. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +21 -1
  439. package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
  440. package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +1 -1
  441. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +1 -1
  442. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +6 -3
  443. package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
  444. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +3 -2
  445. package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
  446. package/node_modules/@typescript-eslint/typescript-estree/package.json +8 -7
  447. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +2 -2
  448. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts.map +1 -1
  449. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts +7 -7
  450. package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts.map +1 -1
  451. package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +1 -1
  452. package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.js.map +1 -1
  453. package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +6 -2
  454. package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +1 -1
  455. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
  456. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js +2 -1
  457. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js.map +1 -1
  458. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.d.ts.map +1 -1
  459. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +2 -0
  460. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js.map +1 -1
  461. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.d.ts.map +1 -1
  462. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js +3 -4
  463. package/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js.map +1 -1
  464. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts +3 -3
  465. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/CLIEngine.d.ts.map +1 -1
  466. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts +2 -2
  467. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Linter.d.ts.map +1 -1
  468. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +4 -0
  469. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
  470. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +1 -1
  471. package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +1 -1
  472. package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Definition.d.ts +1 -1
  473. package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Definition.d.ts.map +1 -1
  474. package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts +1 -1
  475. package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts.map +1 -1
  476. package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/analyze.d.ts +1 -1
  477. package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/analyze.d.ts.map +1 -1
  478. package/node_modules/@typescript-eslint/utils/package.json +7 -7
  479. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map +1 -1
  480. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +2 -1
  481. package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
  482. package/node_modules/@typescript-eslint/visitor-keys/package.json +6 -5
  483. package/node_modules/eslint-config-xo-typescript/index.js +27 -11
  484. package/node_modules/eslint-config-xo-typescript/package.json +5 -4
  485. package/package.json +13 -13
  486. package/readme.md +1 -1
@@ -1,34 +1,25 @@
1
- # `padding-line-between-statements`
1
+ ---
2
+ description: 'Require or disallow padding lines between statements.'
3
+ ---
2
4
 
3
- require or disallow padding lines between statements.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
7
11
  This rule extends the base [`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements) rule.
12
+ It adds support for TypeScript constructs such as `interface` and `type`.
8
13
 
9
- **It adds support for TypeScript constructs such as `interface` and `type`.**
14
+ ## Options
10
15
 
11
- ## How to Use
16
+ In addition to options provided by ESLint, `interface` and `type` can be used as statement types.
12
17
 
13
- ```jsonc
14
- {
15
- // note you must disable the base rule as it can report incorrect errors
16
- "padding-line-between-statements": "off",
17
- "@typescript-eslint/padding-line-between-statements": [
18
- "error",
19
- {
20
- "blankLine": "always",
21
- "prev": "var",
22
- "next": "return"
23
- }
24
- ]
25
- }
26
- ```
18
+ For example, to add blank lines before interfaces and type definitions:
27
19
 
28
20
  ```jsonc
29
21
  {
30
22
  // Example - Add blank lines before interface and type definitions.
31
- // note you must disable the base rule as it can report incorrect errors
32
23
  "padding-line-between-statements": "off",
33
24
  "@typescript-eslint/padding-line-between-statements": [
34
25
  "error",
@@ -41,24 +32,4 @@ This rule extends the base [`eslint/padding-line-between-statements`](https://es
41
32
  }
42
33
  ```
43
34
 
44
- ## Options
45
-
46
- See [`eslint/padding-line-between-statements` options](https://eslint.org/docs/rules/padding-line-between-statements#options).
47
-
48
- In addition to options provided by ESLint, `interface` and `type` can be used as statement types.
49
-
50
35
  **Note:** ESLint `cjs-export` and `cjs-import` statement types are renamed to `exports` and `require` respectively.
51
-
52
- <sup>
53
-
54
- Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/padding-line-between-statements.md)
55
-
56
- </sup>
57
-
58
- ## Attributes
59
-
60
- - Configs:
61
- - [ ] ✅ Recommended
62
- - [ ] 🔒 Strict
63
- - [x] 🔧 Fixable
64
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `parameter-properties`
1
+ ---
2
+ description: 'Require or disallow parameter properties in class constructors.'
3
+ ---
2
4
 
3
- Require or disallow 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/parameter-properties** for documentation.
4
8
 
5
9
  Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways
6
10
  of declaring and initializing class members.
@@ -482,15 +486,3 @@ class Foo {
482
486
  ## When Not To Use It
483
487
 
484
488
  If you don't care about the using parameter properties in constructors, then you will not need this rule.
485
-
486
- ## Related To
487
-
488
- - TSLint: [no-parameter-properties](https://palantir.github.io/tslint/rules/no-parameter-properties/)
489
-
490
- ## Attributes
491
-
492
- - Configs:
493
- - [ ] ✅ Recommended
494
- - [ ] 🔒 Strict
495
- - [ ] 🔧 Fixable
496
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-as-const`
1
+ ---
2
+ description: 'Enforce the use of `as const` over literal type.'
3
+ ---
2
4
 
3
- Prefer usage of `as const` over literal type.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-as-const** for documentation.
4
8
 
5
9
  This rule recommends usage of `const` assertion when type primitive value is equal to type.
6
10
 
@@ -31,27 +35,6 @@ let foo = { bar: 'baz' };
31
35
 
32
36
  <!--/tabs-->
33
37
 
34
- ## Options
35
-
36
- ```jsonc
37
- // .eslintrc.json
38
- {
39
- "rules": {
40
- "@typescript-eslint/prefer-as-const": "error"
41
- }
42
- }
43
- ```
44
-
45
- This rule is not configurable.
46
-
47
38
  ## When Not To Use It
48
39
 
49
40
  If you are using TypeScript < 3.4
50
-
51
- ## Attributes
52
-
53
- - Configs:
54
- - [x] ✅ Recommended
55
- - [x] 🔒 Strict
56
- - [x] 🔧 Fixable
57
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-enum-initializers`
1
+ ---
2
+ description: 'Require each enum member value to be explicitly initialized.'
3
+ ---
2
4
 
3
- Prefer initializing each enums member value.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-enum-initializers** for documentation.
4
8
 
5
9
  This rule recommends having each `enum`s member value explicitly initialized.
6
10
 
@@ -71,27 +75,6 @@ enum Color {
71
75
  }
72
76
  ```
73
77
 
74
- ## Options
75
-
76
- ```jsonc
77
- // .eslintrc.json
78
- {
79
- "rules": {
80
- "@typescript-eslint/prefer-enum-initializers": "warn"
81
- }
82
- }
83
- ```
84
-
85
- This rule is not configurable.
86
-
87
78
  ## When Not To Use It
88
79
 
89
80
  If you don't care about `enum`s having implicit values you can safely disable this rule.
90
-
91
- ## Attributes
92
-
93
- - Configs:
94
- - [ ] ✅ Recommended
95
- - [ ] 🔒 Strict
96
- - [ ] 🔧 Fixable
97
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-for-of`
1
+ ---
2
+ description: 'Enforce the use of `for-of` loop over the standard `for` loop where possible.'
3
+ ---
2
4
 
3
- Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-for-of** for documentation.
4
8
 
5
9
  This rule recommends a for-of loop when the loop index is only used to read from an array that is being iterated.
6
10
 
@@ -38,31 +42,6 @@ for (let i = 0; i < arr.length; i++) {
38
42
  }
39
43
  ```
40
44
 
41
- ## Options
42
-
43
- ```jsonc
44
- // .eslintrc.json
45
- {
46
- "rules": {
47
- "@typescript-eslint/prefer-for-of": "warn"
48
- }
49
- }
50
- ```
51
-
52
- This rule is not configurable.
53
-
54
45
  ## When Not To Use It
55
46
 
56
47
  If you transpile for browsers that do not support for-of loops, you may wish to use traditional for loops that produce more compact code.
57
-
58
- ## Related To
59
-
60
- - TSLint: ['prefer-for-of'](https://palantir.github.io/tslint/rules/prefer-for-of/)
61
-
62
- ## Attributes
63
-
64
- - Configs:
65
- - [ ] ✅ Recommended
66
- - [x] 🔒 Strict
67
- - [ ] 🔧 Fixable
68
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-function-type`
1
+ ---
2
+ description: 'Enforce using function types instead of interfaces with call signatures.'
3
+ ---
2
4
 
3
- Use function types instead of interfaces with call signatures.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-function-type** for documentation.
4
8
 
5
9
  ## Rule Details
6
10
 
@@ -78,31 +82,6 @@ interface Overloaded {
78
82
  type Intersection = ((data: string) => number) & ((id: number) => string);
79
83
  ```
80
84
 
81
- ## Options
82
-
83
- ```jsonc
84
- // .eslintrc.json
85
- {
86
- "rules": {
87
- "@typescript-eslint/prefer-function-type": "warn"
88
- }
89
- }
90
- ```
91
-
92
- This rule is not configurable.
93
-
94
85
  ## When Not To Use It
95
86
 
96
87
  If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can disable this rule.
97
-
98
- ## Further Reading
99
-
100
- - TSLint: [`callable-types`](https://palantir.github.io/tslint/rules/callable-types/)
101
-
102
- ## Attributes
103
-
104
- - Configs:
105
- - [ ] ✅ Recommended
106
- - [x] 🔒 Strict
107
- - [x] 🔧 Fixable
108
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-includes`
1
+ ---
2
+ description: 'Enforce `includes` method over `indexOf` method.'
3
+ ---
2
4
 
3
- Enforce `includes` method over `indexOf` method.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-includes** for documentation.
4
8
 
5
9
  Until ES5, we were using `String#indexOf` method to check whether a string contains an arbitrary substring or not.
6
10
  Until ES2015, we were using `Array#indexOf` method to check whether an array contains an arbitrary value or not.
@@ -70,27 +74,6 @@ userDefined.includes(value);
70
74
  mismatchExample.indexOf(value) >= 0;
71
75
  ```
72
76
 
73
- ## Options
74
-
75
- ```jsonc
76
- // .eslintrc.json
77
- {
78
- "rules": {
79
- "@typescript-eslint/prefer-includes": "warn"
80
- }
81
- }
82
- ```
83
-
84
- This rule is not configurable.
85
-
86
77
  ## When Not To Use It
87
78
 
88
79
  If you don't want to suggest `includes`, you can safely turn this rule off.
89
-
90
- ## Attributes
91
-
92
- - Configs:
93
- - [ ] ✅ Recommended
94
- - [x] 🔒 Strict
95
- - [x] 🔧 Fixable
96
- - [x] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-literal-enum-member`
1
+ ---
2
+ description: 'Require all enum members to be literal values.'
3
+ ---
2
4
 
3
- Require that all enum members be literal values to prevent unintended enum member name shadow issues.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-literal-enum-member** for documentation.
4
8
 
5
9
  TypeScript allows the value of an enum member to be many different kinds of valid JavaScript expressions. However, because enums create their own scope whereby each enum member becomes a variable in that scope, unexpected values could be used at runtime. Example:
6
10
 
@@ -96,11 +100,3 @@ enum Foo {
96
100
  ## When Not To Use It
97
101
 
98
102
  If you want use anything other than simple literals as an enum value.
99
-
100
- ## Attributes
101
-
102
- - Configs:
103
- - [ ] ✅ Recommended
104
- - [x] 🔒 Strict
105
- - [ ] 🔧 Fixable
106
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-namespace-keyword`
1
+ ---
2
+ description: 'Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.'
3
+ ---
2
4
 
3
- Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-namespace-keyword** for documentation.
4
8
 
5
9
  In an effort to prevent further confusion between custom TypeScript modules and the new ES2015 modules, starting
6
10
  with TypeScript `v1.5` the keyword `namespace` is now the preferred way to declare custom TypeScript modules.
@@ -13,33 +17,8 @@ This rule aims to standardize the way modules are declared.
13
17
 
14
18
  If you are using the ES2015 module syntax, then you will not need this rule.
15
19
 
16
- ## Options
17
-
18
- ```jsonc
19
- // .eslintrc.json
20
- {
21
- "rules": {
22
- "@typescript-eslint/prefer-namespace-keyword": "error"
23
- }
24
- }
25
- ```
26
-
27
- This rule is not configurable.
28
-
29
20
  ## Further Reading
30
21
 
31
22
  - [Modules](https://www.typescriptlang.org/docs/handbook/modules.html)
32
23
  - [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
33
24
  - [Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html)
34
-
35
- ## Related To
36
-
37
- - TSLint: [no-internal-module](https://palantir.github.io/tslint/rules/no-internal-module/)
38
-
39
- ## Attributes
40
-
41
- - Configs:
42
- - [x] ✅ Recommended
43
- - [x] 🔒 Strict
44
- - [x] 🔧 Fixable
45
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-nullish-coalescing`
1
+ ---
2
+ description: 'Enforce using the nullish coalescing operator instead of logical chaining.'
3
+ ---
2
4
 
3
- Enforce the usage of the nullish coalescing operator instead of logical chaining.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-nullish-coalescing** for documentation.
4
8
 
5
9
  TypeScript 3.7 added support for the nullish coalescing operator.
6
10
  This operator allows you to safely cascade a value when dealing with `null` or `undefined`.
@@ -46,6 +50,7 @@ This rule aims enforce the usage of the safer operator.
46
50
  ```ts
47
51
  type Options = [
48
52
  {
53
+ ignoreTernaryTests?: boolean;
49
54
  ignoreConditionalTests?: boolean;
50
55
  ignoreMixedLogicalExpressions?: boolean;
51
56
  },
@@ -53,12 +58,53 @@ type Options = [
53
58
 
54
59
  const defaultOptions = [
55
60
  {
61
+ ignoreTernaryTests: true;
56
62
  ignoreConditionalTests: true,
57
63
  ignoreMixedLogicalExpressions: true,
58
64
  },
59
65
  ];
60
66
  ```
61
67
 
68
+ ### `ignoreTernaryTests`
69
+
70
+ Setting this option to `true` (the default) will cause the rule to ignore any ternary expressions that could be simplified by using the nullish coalescing operator.
71
+
72
+ Incorrect code for `ignoreTernaryTests: false`, and correct code for `ignoreTernaryTests: true`:
73
+
74
+ ```ts
75
+ const foo: any = 'bar';
76
+ foo !== undefined && foo !== null ? foo : 'a string';
77
+ foo === undefined || foo === null ? 'a string' : foo;
78
+ foo == undefined ? 'a string' : foo;
79
+ foo == null ? 'a string' : foo;
80
+
81
+ const foo: string | undefined = 'bar';
82
+ foo !== undefined ? foo : 'a string';
83
+ foo === undefined ? 'a string' : foo;
84
+
85
+ const foo: string | null = 'bar';
86
+ foo !== null ? foo : 'a string';
87
+ foo === null ? 'a string' : foo;
88
+ ```
89
+
90
+ Correct code for `ignoreTernaryTests: false`:
91
+
92
+ ```ts
93
+ const foo: any = 'bar';
94
+ foo ?? 'a string';
95
+ foo ?? 'a string';
96
+ foo ?? 'a string';
97
+ foo ?? 'a string';
98
+
99
+ const foo: string | undefined = 'bar';
100
+ foo ?? 'a string';
101
+ foo ?? 'a string';
102
+
103
+ const foo: string | null = 'bar';
104
+ foo ?? 'a string';
105
+ foo ?? 'a string';
106
+ ```
107
+
62
108
  ### `ignoreConditionalTests`
63
109
 
64
110
  Setting this option to `true` (the default) will cause the rule to ignore any cases that are located within a conditional test.
@@ -141,11 +187,3 @@ If you are not using TypeScript 3.7 (or greater), then you will not be able to u
141
187
 
142
188
  - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html)
143
189
  - [Nullish Coalescing Operator Proposal](https://github.com/tc39/proposal-nullish-coalescing/)
144
-
145
- ## Attributes
146
-
147
- - Configs:
148
- - [ ] ✅ Recommended
149
- - [x] 🔒 Strict
150
- - [ ] 🔧 Fixable
151
- - [x] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-optional-chain`
1
+ ---
2
+ description: 'Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.'
3
+ ---
2
4
 
3
- Prefer using concise optional chain expressions instead of chained logical ands.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-optional-chain** for documentation.
4
8
 
5
9
  TypeScript 3.7 added support for the optional chain operator.
6
10
  This operator allows you to safely access properties and methods on objects when they are potentially `null` or `undefined`.
@@ -61,8 +65,14 @@ foo && foo.a && foo.a.b && foo.a.b.c;
61
65
  foo && foo['a'] && foo['a'].b && foo['a'].b.c;
62
66
  foo && foo.a && foo.a.b && foo.a.b.method && foo.a.b.method();
63
67
 
64
- (((foo || {}).a || {}).b {}).c;
65
- (((foo || {})['a'] || {}).b {}).c;
68
+ // With empty objects
69
+ (((foo || {}).a || {}).b || {}).c;
70
+ (((foo || {})['a'] || {}).b || {}).c;
71
+
72
+ // With negated `or`s
73
+ !foo || !foo.bar;
74
+ !foo || !foo[bar];
75
+ !foo || !foo.bar || !foo.bar.baz || !foo.bar.baz();
66
76
 
67
77
  // this rule also supports converting chained strict nullish checks:
68
78
  foo &&
@@ -81,22 +91,13 @@ foo?.['a']?.b?.c;
81
91
  foo?.a?.b?.method?.();
82
92
 
83
93
  foo?.a?.b?.c?.d?.e;
84
- ```
85
-
86
- **Note:** there are a few edge cases where this rule will false positive. Use your best judgement when evaluating reported errors.
87
-
88
- ## Options
89
94
 
90
- ```jsonc
91
- // .eslintrc.json
92
- {
93
- "rules": {
94
- "@typescript-eslint/prefer-optional-chain": "warn"
95
- }
96
- }
95
+ !foo?.bar;
96
+ !foo?.[bar];
97
+ !foo?.bar?.baz?.();
97
98
  ```
98
99
 
99
- This rule is not configurable.
100
+ **Note:** there are a few edge cases where this rule will false positive. Use your best judgement when evaluating reported errors.
100
101
 
101
102
  ## When Not To Use It
102
103
 
@@ -106,11 +107,3 @@ If you are not using TypeScript 3.7 (or greater), then you will not be able to u
106
107
 
107
108
  - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html)
108
109
  - [Optional Chaining Proposal](https://github.com/tc39/proposal-optional-chaining/)
109
-
110
- ## Attributes
111
-
112
- - Configs:
113
- - [ ] ✅ Recommended
114
- - [x] 🔒 Strict
115
- - [ ] 🔧 Fixable
116
- - [ ] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-readonly-parameter-types`
1
+ ---
2
+ description: 'Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.'
3
+ ---
2
4
 
3
- Requires that function parameters are typed as readonly to prevent accidental mutation of inputs.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-readonly-parameter-types** for documentation.
4
8
 
5
9
  Mutating function arguments can lead to confusing, hard to debug behavior.
6
10
  Whilst it's easy to implicitly remember to not modify function arguments, explicitly typing arguments as readonly provides clear contract to consumers.
@@ -127,19 +131,6 @@ interface Foo {
127
131
 
128
132
  ## Options
129
133
 
130
- ```ts
131
- interface Options {
132
- checkParameterProperties?: boolean;
133
- ignoreInferredTypes?: boolean;
134
- }
135
-
136
- const defaultOptions: Options = {
137
- checkParameterProperties: true,
138
- ignoreInferredTypes: false,
139
- treatMethodsAsReadonly: false,
140
- };
141
- ```
142
-
143
134
  ### `checkParameterProperties`
144
135
 
145
136
  This option allows you to enable or disable the checking of parameter properties.
@@ -191,7 +182,7 @@ Examples of code for this rule with `{ignoreInferredTypes: true}`:
191
182
  ```ts
192
183
  import { acceptsCallback, CallbackOptions } from 'external-dependency';
193
184
 
194
- acceceptsCallback((options: CallbackOptions) => {});
185
+ acceptsCallback((options: CallbackOptions) => {});
195
186
  ```
196
187
 
197
188
  <details>
@@ -214,7 +205,7 @@ export const acceptsCallback: AcceptsCallback;
214
205
  ```ts
215
206
  import { acceptsCallback } from 'external-dependency';
216
207
 
217
- acceceptsCallback(options => {});
208
+ acceptsCallback(options => {});
218
209
  ```
219
210
 
220
211
  <details>
@@ -277,11 +268,3 @@ type MyType = {
277
268
  };
278
269
  function foo(arg: MyType) {}
279
270
  ```
280
-
281
- ## Attributes
282
-
283
- - Configs:
284
- - [ ] ✅ Recommended
285
- - [ ] 🔒 Strict
286
- - [ ] 🔧 Fixable
287
- - [x] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-readonly`
1
+ ---
2
+ description: "Require private members to be marked as `readonly` if they're never modified outside of the constructor."
3
+ ---
2
4
 
3
- Requires that private members are marked as `readonly` if they're never modified outside of the constructor.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-readonly** for documentation.
4
8
 
5
9
  This rule enforces that private members are marked as `readonly` if they're never modified outside of the constructor.
6
10
 
@@ -52,8 +56,6 @@ class Container {
52
56
 
53
57
  ## Options
54
58
 
55
- This rule, in its default state, does not require any argument.
56
-
57
59
  ### `onlyInlineLambdas`
58
60
 
59
61
  You may pass `"onlyInlineLambdas": true` as a rule option within an object to restrict checking only to members immediately assigned a lambda value.
@@ -85,15 +87,3 @@ class Container {
85
87
  private neverModifiedPrivate = 'unchanged';
86
88
  }
87
89
  ```
88
-
89
- ## Related To
90
-
91
- - TSLint: ['prefer-readonly'](https://palantir.github.io/tslint/rules/prefer-readonly)
92
-
93
- ## Attributes
94
-
95
- - Configs:
96
- - [ ] ✅ Recommended
97
- - [ ] 🔒 Strict
98
- - [x] 🔧 Fixable
99
- - [x] 💭 Requires type information
@@ -1,6 +1,10 @@
1
- # `prefer-reduce-type-parameter`
1
+ ---
2
+ description: 'Enforce using type parameter when calling `Array#reduce` instead of casting.'
3
+ ---
2
4
 
3
- Prefer using type parameter when calling `Array#reduce` instead of casting.
5
+ > 🛑 This file is source code, not the primary documentation location! 🛑
6
+ >
7
+ > See **https://typescript-eslint.io/rules/prefer-reduce-type-parameter** for documentation.
4
8
 
5
9
  It's common to call `Array#reduce` with a generic type, such as an array or object, as the initial value.
6
10
  Since these values are empty, their types are not usable:
@@ -51,27 +55,6 @@ Examples of code for this rule:
51
55
  );
52
56
  ```
53
57
 
54
- ## Options
55
-
56
- ```jsonc
57
- // .eslintrc.json
58
- {
59
- "rules": {
60
- "@typescript-eslint/prefer-reduce-type-parameter": "warn"
61
- }
62
- }
63
- ```
64
-
65
- This rule is not configurable.
66
-
67
58
  ## When Not To Use It
68
59
 
69
60
  If you don't want to use typechecking in your linting, you can't use this rule.
70
-
71
- ## Attributes
72
-
73
- - Configs:
74
- - [ ] ✅ Recommended
75
- - [x] 🔒 Strict
76
- - [x] 🔧 Fixable
77
- - [x] 💭 Requires type information