@ttsc/lint 0.13.0 → 0.14.0-dev.20250530.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (498) hide show
  1. package/README.md +955 -85
  2. package/lib/defaultFormat.d.ts +15 -8
  3. package/lib/defaultFormat.js +15 -8
  4. package/lib/defaultFormat.js.map +1 -1
  5. package/lib/index.d.ts +46 -0
  6. package/lib/index.js +60 -37
  7. package/lib/index.js.map +1 -1
  8. package/lib/structures/ITtscLintConfig.d.ts +12 -6
  9. package/lib/structures/TtscLintRuleSetting.d.ts +49 -0
  10. package/lib/structures/{TtscLintRuleOptions.js → TtscLintRuleSetting.js} +1 -1
  11. package/lib/structures/TtscLintRuleSetting.js.map +1 -0
  12. package/lib/structures/format/ITtscLintFormat.d.ts +128 -0
  13. package/lib/structures/{TtscLintRuleMap.js → format/ITtscLintFormat.js} +1 -1
  14. package/lib/structures/format/ITtscLintFormat.js.map +1 -0
  15. package/lib/structures/format/ITtscLintFormatJsDoc.d.ts +17 -0
  16. package/lib/structures/{ITtscLintFormatConfig.js → format/ITtscLintFormatJsDoc.js} +1 -1
  17. package/lib/structures/format/ITtscLintFormatJsDoc.js.map +1 -0
  18. package/lib/structures/format/ITtscLintFormatSortImports.d.ts +54 -0
  19. package/lib/structures/format/ITtscLintFormatSortImports.js +3 -0
  20. package/lib/structures/format/ITtscLintFormatSortImports.js.map +1 -0
  21. package/lib/structures/format/index.d.ts +3 -0
  22. package/lib/structures/format/index.js +20 -0
  23. package/lib/structures/format/index.js.map +1 -0
  24. package/lib/structures/index.d.ts +3 -4
  25. package/lib/structures/index.js +3 -4
  26. package/lib/structures/index.js.map +1 -1
  27. package/lib/structures/rules/ITtscLintBoundariesRuleOptions.d.ts +95 -0
  28. package/lib/structures/rules/ITtscLintBoundariesRuleOptions.js +13 -0
  29. package/lib/structures/rules/ITtscLintBoundariesRuleOptions.js.map +1 -0
  30. package/lib/structures/rules/ITtscLintBoundariesRules.d.ts +75 -0
  31. package/lib/structures/rules/ITtscLintBoundariesRules.js +3 -0
  32. package/lib/structures/rules/ITtscLintBoundariesRules.js.map +1 -0
  33. package/lib/structures/rules/ITtscLintContributorRules.d.ts +16 -0
  34. package/lib/structures/rules/ITtscLintContributorRules.js +3 -0
  35. package/lib/structures/rules/ITtscLintContributorRules.js.map +1 -0
  36. package/lib/structures/rules/ITtscLintCoreRules.d.ts +1229 -0
  37. package/lib/structures/rules/ITtscLintCoreRules.js +3 -0
  38. package/lib/structures/rules/ITtscLintCoreRules.js.map +1 -0
  39. package/lib/structures/rules/ITtscLintCypressRuleOptions.d.ts +17 -0
  40. package/lib/structures/rules/ITtscLintCypressRuleOptions.js +10 -0
  41. package/lib/structures/rules/ITtscLintCypressRuleOptions.js.map +1 -0
  42. package/lib/structures/rules/ITtscLintCypressRules.d.ts +125 -0
  43. package/lib/structures/rules/ITtscLintCypressRules.js +3 -0
  44. package/lib/structures/rules/ITtscLintCypressRules.js.map +1 -0
  45. package/lib/structures/rules/ITtscLintFunctionalRuleOptions.d.ts +154 -0
  46. package/lib/structures/rules/ITtscLintFunctionalRuleOptions.js +13 -0
  47. package/lib/structures/rules/ITtscLintFunctionalRuleOptions.js.map +1 -0
  48. package/lib/structures/rules/ITtscLintFunctionalRules.d.ts +162 -0
  49. package/lib/structures/rules/ITtscLintFunctionalRules.js +3 -0
  50. package/lib/structures/rules/ITtscLintFunctionalRules.js.map +1 -0
  51. package/lib/structures/rules/ITtscLintJestRules.d.ts +190 -0
  52. package/lib/structures/rules/ITtscLintJestRules.js +3 -0
  53. package/lib/structures/rules/ITtscLintJestRules.js.map +1 -0
  54. package/lib/structures/rules/ITtscLintJsdocRules.d.ts +133 -0
  55. package/lib/structures/rules/ITtscLintJsdocRules.js +3 -0
  56. package/lib/structures/rules/ITtscLintJsdocRules.js.map +1 -0
  57. package/lib/structures/rules/ITtscLintJsxA11yRules.d.ts +294 -0
  58. package/lib/structures/rules/ITtscLintJsxA11yRules.js +3 -0
  59. package/lib/structures/rules/ITtscLintJsxA11yRules.js.map +1 -0
  60. package/lib/structures/rules/ITtscLintNextjsRules.d.ts +180 -0
  61. package/lib/structures/rules/ITtscLintNextjsRules.js +3 -0
  62. package/lib/structures/rules/ITtscLintNextjsRules.js.map +1 -0
  63. package/lib/structures/rules/ITtscLintPlaywrightRules.d.ts +312 -0
  64. package/lib/structures/rules/ITtscLintPlaywrightRules.js +3 -0
  65. package/lib/structures/rules/ITtscLintPlaywrightRules.js.map +1 -0
  66. package/lib/structures/rules/ITtscLintPromiseRules.d.ts +179 -0
  67. package/lib/structures/rules/ITtscLintPromiseRules.js +3 -0
  68. package/lib/structures/rules/ITtscLintPromiseRules.js.map +1 -0
  69. package/lib/structures/rules/ITtscLintReactPerfRuleOptions.d.ts +18 -0
  70. package/lib/structures/rules/ITtscLintReactPerfRuleOptions.js +8 -0
  71. package/lib/structures/rules/ITtscLintReactPerfRuleOptions.js.map +1 -0
  72. package/lib/structures/rules/ITtscLintReactPerfRules.d.ts +49 -0
  73. package/lib/structures/rules/ITtscLintReactPerfRules.js +3 -0
  74. package/lib/structures/rules/ITtscLintReactPerfRules.js.map +1 -0
  75. package/lib/structures/rules/ITtscLintReactRuleOptions.d.ts +37 -0
  76. package/lib/structures/rules/ITtscLintReactRuleOptions.js +11 -0
  77. package/lib/structures/rules/ITtscLintReactRuleOptions.js.map +1 -0
  78. package/lib/structures/rules/ITtscLintReactRules.d.ts +276 -0
  79. package/lib/structures/rules/ITtscLintReactRules.js +3 -0
  80. package/lib/structures/rules/ITtscLintReactRules.js.map +1 -0
  81. package/lib/structures/rules/ITtscLintRegexpRules.d.ts +182 -0
  82. package/lib/structures/rules/ITtscLintRegexpRules.js +3 -0
  83. package/lib/structures/rules/ITtscLintRegexpRules.js.map +1 -0
  84. package/lib/structures/rules/ITtscLintRuleOptionsMap.d.ts +65 -0
  85. package/lib/structures/rules/ITtscLintRuleOptionsMap.js +3 -0
  86. package/lib/structures/rules/ITtscLintRuleOptionsMap.js.map +1 -0
  87. package/lib/structures/rules/ITtscLintRules.d.ts +55 -0
  88. package/lib/structures/{TtscLintRule.js → rules/ITtscLintRules.js} +1 -1
  89. package/lib/structures/rules/ITtscLintRules.js.map +1 -0
  90. package/lib/structures/rules/ITtscLintSecurityRules.d.ts +141 -0
  91. package/lib/structures/rules/ITtscLintSecurityRules.js +3 -0
  92. package/lib/structures/rules/ITtscLintSecurityRules.js.map +1 -0
  93. package/lib/structures/rules/ITtscLintSolidRules.d.ts +178 -0
  94. package/lib/structures/rules/ITtscLintSolidRules.js +3 -0
  95. package/lib/structures/rules/ITtscLintSolidRules.js.map +1 -0
  96. package/lib/structures/rules/ITtscLintStorybookRuleOptions.d.ts +20 -0
  97. package/lib/structures/rules/ITtscLintStorybookRuleOptions.js +9 -0
  98. package/lib/structures/rules/ITtscLintStorybookRuleOptions.js.map +1 -0
  99. package/lib/structures/rules/ITtscLintStorybookRules.d.ts +165 -0
  100. package/lib/structures/rules/ITtscLintStorybookRules.js +3 -0
  101. package/lib/structures/rules/ITtscLintStorybookRules.js.map +1 -0
  102. package/lib/structures/rules/ITtscLintTanstackQueryRules.d.ts +88 -0
  103. package/lib/structures/rules/ITtscLintTanstackQueryRules.js +3 -0
  104. package/lib/structures/rules/ITtscLintTanstackQueryRules.js.map +1 -0
  105. package/lib/structures/rules/ITtscLintTestingLibraryRuleOptions.d.ts +21 -0
  106. package/lib/structures/rules/ITtscLintTestingLibraryRuleOptions.js +10 -0
  107. package/lib/structures/rules/ITtscLintTestingLibraryRuleOptions.js.map +1 -0
  108. package/lib/structures/rules/ITtscLintTestingLibraryRules.d.ts +293 -0
  109. package/lib/structures/rules/ITtscLintTestingLibraryRules.js +3 -0
  110. package/lib/structures/rules/ITtscLintTestingLibraryRules.js.map +1 -0
  111. package/lib/structures/rules/ITtscLintTypeScriptRules.d.ts +1074 -0
  112. package/lib/structures/rules/ITtscLintTypeScriptRules.js +3 -0
  113. package/lib/structures/rules/ITtscLintTypeScriptRules.js.map +1 -0
  114. package/lib/structures/rules/ITtscLintUnicornRules.d.ts +997 -0
  115. package/lib/structures/rules/ITtscLintUnicornRules.js +3 -0
  116. package/lib/structures/rules/ITtscLintUnicornRules.js.map +1 -0
  117. package/lib/structures/rules/ITtscLintVitestRules.d.ts +133 -0
  118. package/lib/structures/rules/ITtscLintVitestRules.js +3 -0
  119. package/lib/structures/rules/ITtscLintVitestRules.js.map +1 -0
  120. package/lib/structures/rules/index.d.ts +31 -0
  121. package/lib/structures/rules/index.js +48 -0
  122. package/lib/structures/rules/index.js.map +1 -0
  123. package/linthost/ast_helpers.go +30 -5
  124. package/linthost/compile.go +33 -2
  125. package/linthost/config.go +118 -71
  126. package/linthost/config_format.go +270 -104
  127. package/linthost/directives.go +67 -25
  128. package/linthost/dispatch.go +14 -3
  129. package/linthost/engine.go +160 -40
  130. package/linthost/fix.go +10 -3
  131. package/linthost/flags_gen.go +17 -15
  132. package/linthost/format.go +222 -25
  133. package/linthost/format_editor_settings.go +262 -0
  134. package/linthost/host.go +40 -3
  135. package/linthost/lsp.go +898 -0
  136. package/linthost/print_dispatch.go +5 -2
  137. package/linthost/print_engine.go +5 -5
  138. package/linthost/print_nodes_call.go +149 -67
  139. package/linthost/print_nodes_function.go +27 -2
  140. package/linthost/print_nodes_list.go +40 -5
  141. package/linthost/print_nodes_object.go +1 -1
  142. package/linthost/print_nodes_ternary.go +86 -0
  143. package/linthost/rule_names.go +14 -0
  144. package/linthost/rules_arrays.go +2 -2
  145. package/linthost/rules_boundaries.go +532 -0
  146. package/linthost/rules_camelcase.go +133 -0
  147. package/linthost/rules_complexity.go +95 -0
  148. package/linthost/rules_consistent_return.go +130 -0
  149. package/linthost/rules_console.go +1 -1
  150. package/linthost/rules_core_extra.go +739 -0
  151. package/linthost/rules_curly.go +70 -0
  152. package/linthost/rules_cypress.go +608 -0
  153. package/linthost/rules_debugger.go +2 -2
  154. package/linthost/rules_default_case.go +39 -0
  155. package/linthost/rules_default_case_last.go +46 -0
  156. package/linthost/rules_dupes.go +3 -3
  157. package/linthost/rules_empty.go +3 -3
  158. package/linthost/rules_escape.go +44 -24
  159. package/linthost/rules_eval.go +2 -2
  160. package/linthost/rules_finally.go +2 -2
  161. package/linthost/rules_format_arrow_parens.go +167 -0
  162. package/linthost/rules_format_bracket_spacing.go +117 -0
  163. package/linthost/rules_format_clause_join.go +172 -0
  164. package/linthost/rules_format_declaration_header.go +595 -0
  165. package/linthost/rules_format_indent.go +372 -0
  166. package/linthost/rules_format_jsdoc.go +5 -5
  167. package/linthost/rules_format_orphan_semi.go +106 -0
  168. package/linthost/rules_format_parameter_properties.go +175 -0
  169. package/linthost/rules_format_print_width.go +66 -55
  170. package/linthost/rules_format_quote_props.go +169 -0
  171. package/linthost/rules_format_quotes.go +76 -30
  172. package/linthost/rules_format_semi.go +186 -11
  173. package/linthost/rules_format_sort_imports.go +437 -118
  174. package/linthost/rules_format_statement_split.go +343 -0
  175. package/linthost/rules_format_ternary_nullish_parens.go +77 -0
  176. package/linthost/rules_format_trailing_comma.go +22 -3
  177. package/linthost/rules_format_whitespace.go +336 -0
  178. package/linthost/rules_functional.go +967 -0
  179. package/linthost/rules_gap.go +24 -45
  180. package/linthost/rules_grouped_accessor_pairs.go +87 -0
  181. package/linthost/rules_guard_for_in.go +198 -0
  182. package/linthost/rules_id_length.go +77 -0
  183. package/linthost/rules_imports.go +70 -2
  184. package/linthost/rules_init_declarations.go +53 -0
  185. package/linthost/rules_jest.go +618 -0
  186. package/linthost/rules_jsdoc.go +502 -0
  187. package/linthost/rules_jsx_a11y.go +1264 -0
  188. package/linthost/rules_logic.go +12 -12
  189. package/linthost/rules_loops.go +1 -1
  190. package/linthost/rules_max_classes_per_file.go +58 -0
  191. package/linthost/rules_max_depth.go +83 -0
  192. package/linthost/rules_max_lines.go +101 -0
  193. package/linthost/rules_max_lines_per_function.go +57 -0
  194. package/linthost/rules_max_nested_callbacks.go +61 -0
  195. package/linthost/rules_max_params.go +49 -0
  196. package/linthost/rules_max_statements.go +59 -0
  197. package/linthost/rules_misc.go +1 -1
  198. package/linthost/rules_nextjs.go +697 -0
  199. package/linthost/rules_no_else_return.go +75 -0
  200. package/linthost/rules_no_empty_named_blocks.go +91 -0
  201. package/linthost/rules_no_extend_native.go +51 -0
  202. package/linthost/rules_no_import_assign.go +140 -0
  203. package/linthost/rules_no_invalid_this.go +52 -0
  204. package/linthost/rules_no_loop_func.go +85 -0
  205. package/linthost/rules_no_magic_numbers.go +123 -0
  206. package/linthost/rules_no_mixed_operators.go +80 -0
  207. package/linthost/rules_no_param_reassign.go +98 -0
  208. package/linthost/rules_no_redeclare.go +270 -0
  209. package/linthost/rules_no_restricted_imports.go +105 -0
  210. package/linthost/rules_no_restricted_syntax.go +49 -0
  211. package/linthost/rules_no_shadow.go +147 -0
  212. package/linthost/rules_no_unreachable.go +77 -0
  213. package/linthost/rules_no_useless_assignment.go +120 -0
  214. package/linthost/rules_no_useless_constructor.go +245 -0
  215. package/linthost/rules_no_useless_return.go +51 -0
  216. package/linthost/rules_params.go +1 -1
  217. package/linthost/rules_playwright.go +788 -0
  218. package/linthost/rules_prefer_arrow_callback.go +124 -0
  219. package/linthost/rules_prefer_destructuring.go +98 -0
  220. package/linthost/rules_prefer_named_capture_group.go +129 -0
  221. package/linthost/rules_prefer_rest_params.go +94 -0
  222. package/linthost/rules_problems.go +41 -30
  223. package/linthost/rules_promise.go +1057 -2
  224. package/linthost/rules_protos.go +2 -2
  225. package/linthost/rules_react.go +773 -0
  226. package/linthost/rules_react_extras.go +227 -0
  227. package/linthost/rules_react_hooks.go +848 -0
  228. package/linthost/rules_react_perf.go +293 -0
  229. package/linthost/rules_react_refresh.go +583 -0
  230. package/linthost/rules_regexp.go +410 -0
  231. package/linthost/rules_security.go +830 -0
  232. package/linthost/rules_self.go +2 -2
  233. package/linthost/rules_solid.go +1073 -0
  234. package/linthost/rules_sort_imports.go +69 -0
  235. package/linthost/rules_sort_keys.go +134 -0
  236. package/linthost/rules_storybook.go +1176 -0
  237. package/linthost/rules_strings.go +4 -4
  238. package/linthost/rules_suggestions.go +38 -38
  239. package/linthost/rules_tanstack_query.go +844 -0
  240. package/linthost/rules_testing_library.go +1204 -0
  241. package/linthost/rules_throw.go +1 -1
  242. package/linthost/rules_ts.go +19 -19
  243. package/linthost/rules_ts_async.go +399 -0
  244. package/linthost/rules_ts_class_literal_property_style.go +115 -0
  245. package/linthost/rules_ts_consistent_type_exports.go +256 -0
  246. package/linthost/rules_ts_explicit_function_return_type.go +67 -0
  247. package/linthost/rules_ts_extra.go +159 -36
  248. package/linthost/rules_ts_no_base_to_string.go +218 -0
  249. package/linthost/rules_ts_no_confusing_void.go +72 -0
  250. package/linthost/rules_ts_no_deprecated.go +195 -0
  251. package/linthost/rules_ts_no_for_in_array.go +84 -0
  252. package/linthost/rules_ts_no_magic_numbers.go +124 -0
  253. package/linthost/rules_ts_no_meaningless_void_operator.go +84 -0
  254. package/linthost/rules_ts_no_misused_spread.go +104 -0
  255. package/linthost/rules_ts_no_redundant_type_constituents.go +113 -0
  256. package/linthost/rules_ts_no_restricted_types.go +62 -0
  257. package/linthost/rules_ts_no_unnecessary_boolean_literal_compare.go +129 -0
  258. package/linthost/rules_ts_no_unnecessary_condition.go +250 -0
  259. package/linthost/rules_ts_no_unnecessary_qualifier.go +118 -0
  260. package/linthost/rules_ts_no_unnecessary_template_expression.go +178 -0
  261. package/linthost/rules_ts_no_unnecessary_type_arguments.go +234 -0
  262. package/linthost/rules_ts_no_unnecessary_type_assertion.go +157 -0
  263. package/linthost/rules_ts_no_unsafe_argument.go +82 -0
  264. package/linthost/rules_ts_no_unsafe_assignment.go +102 -0
  265. package/linthost/rules_ts_no_unsafe_call.go +82 -0
  266. package/linthost/rules_ts_no_unsafe_enum_comparison.go +235 -0
  267. package/linthost/rules_ts_no_unsafe_member_access.go +58 -0
  268. package/linthost/rules_ts_no_unsafe_return.go +126 -0
  269. package/linthost/rules_ts_no_unsafe_unary_minus.go +81 -0
  270. package/linthost/rules_ts_no_useless_constructor.go +52 -0
  271. package/linthost/rules_ts_non_nullable_type_assertion_style.go +108 -0
  272. package/linthost/rules_ts_parameter_properties.go +38 -0
  273. package/linthost/rules_ts_prefer_find.go +178 -0
  274. package/linthost/rules_ts_prefer_includes.go +255 -0
  275. package/linthost/rules_ts_prefer_nullish_coalescing.go +104 -0
  276. package/linthost/rules_ts_prefer_optional_chain.go +228 -0
  277. package/linthost/rules_ts_prefer_promise_reject_errors.go +176 -0
  278. package/linthost/rules_ts_prefer_readonly.go +73 -0
  279. package/linthost/rules_ts_prefer_reduce_type_parameter.go +116 -0
  280. package/linthost/rules_ts_prefer_regexp_exec.go +122 -0
  281. package/linthost/rules_ts_prefer_return_this_type.go +135 -0
  282. package/linthost/rules_ts_prefer_string_starts_ends_with.go +360 -0
  283. package/linthost/rules_ts_promise_function_async.go +77 -0
  284. package/linthost/rules_ts_related_getter_setter_pairs.go +113 -0
  285. package/linthost/rules_ts_require_array_sort_compare.go +96 -0
  286. package/linthost/rules_ts_restrict_plus_operands.go +127 -0
  287. package/linthost/rules_ts_restrict_template_expressions.go +95 -0
  288. package/linthost/rules_ts_simple.go +387 -0
  289. package/linthost/rules_ts_sort_type_constituents.go +144 -0
  290. package/linthost/rules_ts_strict_boolean_expressions.go +157 -0
  291. package/linthost/rules_ts_switch_exhaustiveness_check.go +147 -0
  292. package/linthost/rules_ts_unbound_method.go +126 -0
  293. package/linthost/rules_tsdoc.go +136 -0
  294. package/linthost/rules_unicorn_better_regex.go +27 -0
  295. package/linthost/rules_unicorn_catch_error_name.go +46 -0
  296. package/linthost/rules_unicorn_consistent_assert.go +47 -0
  297. package/linthost/rules_unicorn_consistent_date_clone.go +54 -0
  298. package/linthost/rules_unicorn_consistent_destructuring.go +25 -0
  299. package/linthost/rules_unicorn_consistent_empty_array_spread.go +62 -0
  300. package/linthost/rules_unicorn_consistent_existence_index_check.go +80 -0
  301. package/linthost/rules_unicorn_consistent_function_scoping.go +25 -0
  302. package/linthost/rules_unicorn_consistent_template_literal_escape.go +25 -0
  303. package/linthost/rules_unicorn_custom_error_definition.go +138 -0
  304. package/linthost/rules_unicorn_empty_brace_spaces.go +73 -0
  305. package/linthost/rules_unicorn_error_message.go +64 -0
  306. package/linthost/rules_unicorn_escape_case.go +51 -0
  307. package/linthost/rules_unicorn_expiring_todo_comments.go +78 -0
  308. package/linthost/rules_unicorn_explicit_length_check.go +88 -0
  309. package/linthost/rules_unicorn_filename_case.go +29 -0
  310. package/linthost/rules_unicorn_import_style.go +28 -0
  311. package/linthost/rules_unicorn_isolated_functions.go +29 -0
  312. package/linthost/rules_unicorn_new_for_builtins.go +87 -0
  313. package/linthost/rules_unicorn_no_abusive_eslint_disable.go +63 -0
  314. package/linthost/rules_unicorn_no_accessor_recursion.go +115 -0
  315. package/linthost/rules_unicorn_no_anonymous_default_export.go +74 -0
  316. package/linthost/rules_unicorn_no_array_callback_reference.go +65 -0
  317. package/linthost/rules_unicorn_no_array_for_each.go +40 -0
  318. package/linthost/rules_unicorn_no_array_method_this_argument.go +61 -0
  319. package/linthost/rules_unicorn_no_array_reduce.go +41 -0
  320. package/linthost/rules_unicorn_no_array_reverse.go +44 -0
  321. package/linthost/rules_unicorn_no_array_sort.go +43 -0
  322. package/linthost/rules_unicorn_no_await_expression_member.go +40 -0
  323. package/linthost/rules_unicorn_no_await_in_promise_methods.go +69 -0
  324. package/linthost/rules_unicorn_no_console_spaces.go +61 -0
  325. package/linthost/rules_unicorn_no_document_cookie.go +41 -0
  326. package/linthost/rules_unicorn_no_empty_file.go +44 -0
  327. package/linthost/rules_unicorn_no_for_loop.go +102 -0
  328. package/linthost/rules_unicorn_no_hex_escape.go +42 -0
  329. package/linthost/rules_unicorn_no_immediate_mutation.go +90 -0
  330. package/linthost/rules_unicorn_no_instanceof_builtins.go +66 -0
  331. package/linthost/rules_unicorn_no_invalid_fetch_options.go +79 -0
  332. package/linthost/rules_unicorn_no_invalid_remove_event_listener.go +51 -0
  333. package/linthost/rules_unicorn_no_keyword_prefix.go +101 -0
  334. package/linthost/rules_unicorn_no_lonely_if.go +44 -0
  335. package/linthost/rules_unicorn_no_magic_array_flat_depth.go +51 -0
  336. package/linthost/rules_unicorn_no_named_default.go +54 -0
  337. package/linthost/rules_unicorn_no_negated_condition.go +85 -0
  338. package/linthost/rules_unicorn_no_negation_in_equality_check.go +50 -0
  339. package/linthost/rules_unicorn_no_nested_ternary.go +43 -0
  340. package/linthost/rules_unicorn_no_new_array.go +30 -0
  341. package/linthost/rules_unicorn_no_new_buffer.go +31 -0
  342. package/linthost/rules_unicorn_no_null.go +24 -0
  343. package/linthost/rules_unicorn_no_object_as_default_parameter.go +48 -0
  344. package/linthost/rules_unicorn_no_process_exit.go +43 -0
  345. package/linthost/rules_unicorn_no_single_promise_in_promise_methods.go +59 -0
  346. package/linthost/rules_unicorn_no_static_only_class.go +56 -0
  347. package/linthost/rules_unicorn_no_thenable.go +74 -0
  348. package/linthost/rules_unicorn_no_this_assignment.go +35 -0
  349. package/linthost/rules_unicorn_no_typeof_undefined.go +58 -0
  350. package/linthost/rules_unicorn_no_unnecessary_array_flat_depth.go +49 -0
  351. package/linthost/rules_unicorn_no_unnecessary_array_splice_count.go +70 -0
  352. package/linthost/rules_unicorn_no_unnecessary_await.go +51 -0
  353. package/linthost/rules_unicorn_no_unnecessary_polyfills.go +32 -0
  354. package/linthost/rules_unicorn_no_unnecessary_slice_end.go +48 -0
  355. package/linthost/rules_unicorn_no_unreadable_array_destructuring.go +115 -0
  356. package/linthost/rules_unicorn_no_unreadable_iife.go +50 -0
  357. package/linthost/rules_unicorn_no_unused_properties.go +30 -0
  358. package/linthost/rules_unicorn_no_useless_collection_argument.go +63 -0
  359. package/linthost/rules_unicorn_no_useless_error_capture_stack_trace.go +46 -0
  360. package/linthost/rules_unicorn_no_useless_fallback_in_spread.go +81 -0
  361. package/linthost/rules_unicorn_no_useless_iterator_to_array.go +72 -0
  362. package/linthost/rules_unicorn_no_useless_length_check.go +144 -0
  363. package/linthost/rules_unicorn_no_useless_promise_resolve_reject.go +81 -0
  364. package/linthost/rules_unicorn_no_useless_spread.go +67 -0
  365. package/linthost/rules_unicorn_no_useless_switch_case.go +55 -0
  366. package/linthost/rules_unicorn_no_useless_undefined.go +55 -0
  367. package/linthost/rules_unicorn_no_zero_fractions.go +52 -0
  368. package/linthost/rules_unicorn_number_literal_case.go +69 -0
  369. package/linthost/rules_unicorn_numeric_separators_style.go +75 -0
  370. package/linthost/rules_unicorn_prefer_add_event_listener.go +66 -0
  371. package/linthost/rules_unicorn_prefer_array_find.go +51 -0
  372. package/linthost/rules_unicorn_prefer_array_flat.go +52 -0
  373. package/linthost/rules_unicorn_prefer_array_flat_map.go +63 -0
  374. package/linthost/rules_unicorn_prefer_array_index_of.go +147 -0
  375. package/linthost/rules_unicorn_prefer_array_some.go +67 -0
  376. package/linthost/rules_unicorn_prefer_at.go +77 -0
  377. package/linthost/rules_unicorn_prefer_bigint_literals.go +77 -0
  378. package/linthost/rules_unicorn_prefer_blob_reading_methods.go +44 -0
  379. package/linthost/rules_unicorn_prefer_class_fields.go +93 -0
  380. package/linthost/rules_unicorn_prefer_classlist_toggle.go +120 -0
  381. package/linthost/rules_unicorn_prefer_code_point.go +49 -0
  382. package/linthost/rules_unicorn_prefer_date_now.go +78 -0
  383. package/linthost/rules_unicorn_prefer_default_parameters.go +144 -0
  384. package/linthost/rules_unicorn_prefer_dom_node_append.go +40 -0
  385. package/linthost/rules_unicorn_prefer_dom_node_dataset.go +55 -0
  386. package/linthost/rules_unicorn_prefer_dom_node_remove.go +41 -0
  387. package/linthost/rules_unicorn_prefer_dom_node_text_content.go +37 -0
  388. package/linthost/rules_unicorn_prefer_event_target.go +36 -0
  389. package/linthost/rules_unicorn_prefer_export_from.go +129 -0
  390. package/linthost/rules_unicorn_prefer_global_this.go +127 -0
  391. package/linthost/rules_unicorn_prefer_import_meta_properties.go +66 -0
  392. package/linthost/rules_unicorn_prefer_includes.go +149 -0
  393. package/linthost/rules_unicorn_prefer_json_parse_buffer.go +65 -0
  394. package/linthost/rules_unicorn_prefer_keyboard_event_key.go +38 -0
  395. package/linthost/rules_unicorn_prefer_logical_operator_over_ternary.go +48 -0
  396. package/linthost/rules_unicorn_prefer_math_min_max.go +60 -0
  397. package/linthost/rules_unicorn_prefer_math_trunc.go +62 -0
  398. package/linthost/rules_unicorn_prefer_modern_dom_apis.go +47 -0
  399. package/linthost/rules_unicorn_prefer_modern_math_apis.go +70 -0
  400. package/linthost/rules_unicorn_prefer_module.go +50 -0
  401. package/linthost/rules_unicorn_prefer_native_coercion_functions.go +114 -0
  402. package/linthost/rules_unicorn_prefer_negative_index.go +74 -0
  403. package/linthost/rules_unicorn_prefer_node_protocol.go +122 -0
  404. package/linthost/rules_unicorn_prefer_number_properties.go +88 -0
  405. package/linthost/rules_unicorn_prefer_object_from_entries.go +55 -0
  406. package/linthost/rules_unicorn_prefer_optional_catch_binding.go +62 -0
  407. package/linthost/rules_unicorn_prefer_prototype_methods.go +54 -0
  408. package/linthost/rules_unicorn_prefer_query_selector.go +56 -0
  409. package/linthost/rules_unicorn_prefer_reflect_apply.go +36 -0
  410. package/linthost/rules_unicorn_prefer_regexp_test_rule.go +80 -0
  411. package/linthost/rules_unicorn_prefer_response_static_json.go +53 -0
  412. package/linthost/rules_unicorn_prefer_set_has.go +42 -0
  413. package/linthost/rules_unicorn_prefer_set_size.go +48 -0
  414. package/linthost/rules_unicorn_prefer_simple_condition_first.go +34 -0
  415. package/linthost/rules_unicorn_prefer_single_call.go +96 -0
  416. package/linthost/rules_unicorn_prefer_spread.go +51 -0
  417. package/linthost/rules_unicorn_prefer_string_raw.go +43 -0
  418. package/linthost/rules_unicorn_prefer_string_replace_all.go +95 -0
  419. package/linthost/rules_unicorn_prefer_string_slice.go +43 -0
  420. package/linthost/rules_unicorn_prefer_string_starts_ends_with.go +148 -0
  421. package/linthost/rules_unicorn_prefer_string_trim_start_end.go +48 -0
  422. package/linthost/rules_unicorn_prefer_structured_clone.go +71 -0
  423. package/linthost/rules_unicorn_prefer_switch.go +103 -0
  424. package/linthost/rules_unicorn_prefer_ternary.go +71 -0
  425. package/linthost/rules_unicorn_prefer_top_level_await.go +72 -0
  426. package/linthost/rules_unicorn_prefer_type_error.go +127 -0
  427. package/linthost/rules_unicorn_prevent_abbreviations.go +127 -0
  428. package/linthost/rules_unicorn_relative_url_style.go +49 -0
  429. package/linthost/rules_unicorn_require_array_join_separator.go +45 -0
  430. package/linthost/rules_unicorn_require_module_attributes.go +54 -0
  431. package/linthost/rules_unicorn_require_module_specifiers.go +55 -0
  432. package/linthost/rules_unicorn_require_number_to_fixed_digits_argument.go +43 -0
  433. package/linthost/rules_unicorn_require_post_message_target_origin.go +44 -0
  434. package/linthost/rules_unicorn_string_content.go +27 -0
  435. package/linthost/rules_unicorn_switch_case_braces.go +42 -0
  436. package/linthost/rules_unicorn_switch_case_break_position.go +31 -0
  437. package/linthost/rules_unicorn_template_indent.go +28 -0
  438. package/linthost/rules_unicorn_text_encoding_identifier_case.go +72 -0
  439. package/linthost/rules_unicorn_throw_new_error.go +61 -0
  440. package/linthost/rules_var.go +10 -4
  441. package/linthost/rules_vitest.go +568 -0
  442. package/package.json +3 -3
  443. package/plugin/main.go +49 -3
  444. package/rule/astutil/astutil.go +10 -3
  445. package/rule/rule.go +12 -10
  446. package/src/defaultFormat.ts +17 -10
  447. package/src/index.ts +65 -43
  448. package/src/structures/ITtscLintConfig.ts +14 -8
  449. package/src/structures/TtscLintRuleSetting.ts +55 -0
  450. package/src/structures/format/ITtscLintFormat.ts +141 -0
  451. package/src/structures/format/ITtscLintFormatJsDoc.ts +18 -0
  452. package/src/structures/format/ITtscLintFormatSortImports.ts +62 -0
  453. package/src/structures/format/index.ts +3 -0
  454. package/src/structures/index.ts +3 -4
  455. package/src/structures/rules/ITtscLintBoundariesRuleOptions.ts +117 -0
  456. package/src/structures/rules/ITtscLintBoundariesRules.ts +91 -0
  457. package/src/structures/rules/ITtscLintContributorRules.ts +20 -0
  458. package/src/structures/rules/ITtscLintCoreRules.ts +1378 -0
  459. package/src/structures/rules/ITtscLintCypressRuleOptions.ts +18 -0
  460. package/src/structures/rules/ITtscLintCypressRules.ts +141 -0
  461. package/src/structures/rules/ITtscLintFunctionalRuleOptions.ts +200 -0
  462. package/src/structures/rules/ITtscLintFunctionalRules.ts +197 -0
  463. package/src/structures/rules/ITtscLintJestRules.ts +209 -0
  464. package/src/structures/rules/ITtscLintJsdocRules.ts +146 -0
  465. package/src/structures/rules/ITtscLintJsxA11yRules.ts +331 -0
  466. package/src/structures/rules/ITtscLintNextjsRules.ts +201 -0
  467. package/src/structures/rules/ITtscLintPlaywrightRules.ts +343 -0
  468. package/src/structures/rules/ITtscLintPromiseRules.ts +196 -0
  469. package/src/structures/rules/ITtscLintReactPerfRuleOptions.ts +19 -0
  470. package/src/structures/rules/ITtscLintReactPerfRules.ts +53 -0
  471. package/src/structures/rules/ITtscLintReactRuleOptions.ts +41 -0
  472. package/src/structures/rules/ITtscLintReactRules.ts +308 -0
  473. package/src/structures/rules/ITtscLintRegexpRules.ts +204 -0
  474. package/src/structures/rules/ITtscLintRuleOptionsMap.ts +88 -0
  475. package/src/structures/rules/ITtscLintRules.ts +77 -0
  476. package/src/structures/rules/ITtscLintSecurityRules.ts +155 -0
  477. package/src/structures/rules/ITtscLintSolidRules.ts +199 -0
  478. package/src/structures/rules/ITtscLintStorybookRuleOptions.ts +22 -0
  479. package/src/structures/rules/ITtscLintStorybookRules.ts +184 -0
  480. package/src/structures/rules/ITtscLintTanstackQueryRules.ts +96 -0
  481. package/src/structures/rules/ITtscLintTestingLibraryRuleOptions.ts +23 -0
  482. package/src/structures/rules/ITtscLintTestingLibraryRules.ts +325 -0
  483. package/src/structures/rules/ITtscLintTypeScriptRules.ts +1172 -0
  484. package/src/structures/rules/ITtscLintUnicornRules.ts +1143 -0
  485. package/src/structures/rules/ITtscLintVitestRules.ts +146 -0
  486. package/src/structures/rules/index.ts +31 -0
  487. package/lib/structures/ITtscLintFormatConfig.d.ts +0 -153
  488. package/lib/structures/ITtscLintFormatConfig.js.map +0 -1
  489. package/lib/structures/TtscLintRule.d.ts +0 -17
  490. package/lib/structures/TtscLintRule.js.map +0 -1
  491. package/lib/structures/TtscLintRuleMap.d.ts +0 -46
  492. package/lib/structures/TtscLintRuleMap.js.map +0 -1
  493. package/lib/structures/TtscLintRuleOptions.d.ts +0 -137
  494. package/lib/structures/TtscLintRuleOptions.js.map +0 -1
  495. package/src/structures/ITtscLintFormatConfig.ts +0 -168
  496. package/src/structures/TtscLintRule.ts +0 -160
  497. package/src/structures/TtscLintRuleMap.ts +0 -55
  498. package/src/structures/TtscLintRuleOptions.ts +0 -151
@@ -0,0 +1,1229 @@
1
+ import type { TtscLintRuleSetting } from "../TtscLintRuleSetting";
2
+ /**
3
+ * Generic ESLint-compatible rules that apply to both JavaScript and TypeScript
4
+ * source.
5
+ *
6
+ * Every rule listed here corresponds 1-to-1 with an ESLint core rule of the
7
+ * same kebab-case id. TypeScript-only rules and `@typescript-eslint` extension
8
+ * rules do **not** live here — they belong to {@link ITtscLintTypeScriptRules}.
9
+ *
10
+ * Keeping the core family namespace-free means projects migrating from ESLint
11
+ * can paste their rule severities into a `ttsc.lint.config.ts` file without
12
+ * renaming anything.
13
+ *
14
+ * The fix availability noted in each rule's JSDoc applies when `ttsc fix` or
15
+ * the LSP code action is invoked; a rule marked _Autofixable_ may still produce
16
+ * diagnostics that require human review for edge cases.
17
+ *
18
+ * @reference https://eslint.org/docs/latest/rules/
19
+ */
20
+ export interface ITtscLintCoreRules {
21
+ /**
22
+ * Require block statements for every `if`, `else`, `while`, `for`, and `do`
23
+ * body — reject the single-statement shorthand.
24
+ *
25
+ * @reference https://eslint.org/docs/latest/rules/curly
26
+ */
27
+ curly?: TtscLintRuleSetting;
28
+ /**
29
+ * Require `switch` statements to include a `default` clause.
30
+ *
31
+ * A switch without `default` silently drops every discriminant value that no
32
+ * `case` label matched. The rule forces the catch-all branch to be written
33
+ * out so unhandled cases become an intentional decision instead of a hidden
34
+ * fall-through.
35
+ *
36
+ * @reference https://eslint.org/docs/latest/rules/default-case
37
+ */
38
+ "default-case"?: TtscLintRuleSetting;
39
+ /**
40
+ * Require the `default` clause of a `switch` statement to appear after every
41
+ * explicit `case` label.
42
+ *
43
+ * Placing `default` ahead of a `case` reverses the visual order of the labels
44
+ * and changes the fall-through path — running `default` and then falling into
45
+ * the next `case` is almost always a misordering rather than intent.
46
+ *
47
+ * @reference https://eslint.org/docs/latest/rules/default-case-last
48
+ */
49
+ "default-case-last"?: TtscLintRuleSetting;
50
+ /**
51
+ * Reject identifier declarations that aren't camelCase or PascalCase —
52
+ * snake_case bindings are flagged.
53
+ *
54
+ * @reference https://eslint.org/docs/latest/rules/camelcase
55
+ */
56
+ camelcase?: TtscLintRuleSetting;
57
+ /**
58
+ * Reject function bodies whose cyclomatic complexity exceeds twenty (default
59
+ * ESLint threshold).
60
+ *
61
+ * @reference https://eslint.org/docs/latest/rules/complexity
62
+ */
63
+ complexity?: TtscLintRuleSetting;
64
+ /**
65
+ * Reject functions where some `return` statements return a value and others
66
+ * (explicit bare `return;` or implicit fall-through) do not.
67
+ *
68
+ * @reference https://eslint.org/docs/latest/rules/consistent-return
69
+ */
70
+ "consistent-return"?: TtscLintRuleSetting;
71
+ /**
72
+ * Reject `(req, opt = 1, req2)` and similar parameter lists where a required
73
+ * parameter follows an optional or default-valued one.
74
+ *
75
+ * The call site cannot omit the trailing required parameter, so the optional
76
+ * becomes positionally required too — almost always an accidental ordering.
77
+ *
78
+ * @reference https://eslint.org/docs/latest/rules/default-param-last
79
+ */
80
+ "default-param-last"?: TtscLintRuleSetting;
81
+ /**
82
+ * Prefer dot access (`obj.value`) over bracket access (`obj["value"]`) when
83
+ * the string key is a valid JavaScript identifier.
84
+ *
85
+ * Bracket access remains accepted for reserved words, dynamic keys, or keys
86
+ * containing characters that cannot appear in an identifier.
87
+ *
88
+ * @reference https://eslint.org/docs/latest/rules/dot-notation
89
+ */
90
+ "dot-notation"?: TtscLintRuleSetting;
91
+ /**
92
+ * Require strict equality operators `===` / `!==` over `==` / `!=`.
93
+ *
94
+ * Loose equality performs implicit type coercion that frequently hides bugs.
95
+ *
96
+ * @reference https://eslint.org/docs/latest/rules/eqeqeq
97
+ */
98
+ eqeqeq?: TtscLintRuleSetting;
99
+ /**
100
+ * Reject `for` statements whose update clause moves the counter away from the
101
+ * termination condition, such as `for (let i = 0; i < 10; i--)`. Such loops
102
+ * either never run or never terminate.
103
+ *
104
+ * @reference https://eslint.org/docs/latest/rules/for-direction
105
+ */
106
+ "for-direction"?: TtscLintRuleSetting;
107
+ /**
108
+ * Require a `get` accessor's body to return a value on every reachable exit.
109
+ * A getter that falls through returns `undefined` to the caller, which is
110
+ * almost never the intent and turns into a silent bug that only surfaces when
111
+ * the property is finally read.
112
+ *
113
+ * @reference https://eslint.org/docs/latest/rules/getter-return
114
+ */
115
+ "getter-return"?: TtscLintRuleSetting;
116
+ /**
117
+ * Require the `get` and `set` accessors of a single property to be declared
118
+ * adjacent in the class body.
119
+ *
120
+ * When the read and write halves of a property are split apart by unrelated
121
+ * members, a reader scanning the class has to chase the pair across the body
122
+ * — and patches to one half are easy to make without noticing the other.
123
+ *
124
+ * @reference https://eslint.org/docs/latest/rules/grouped-accessor-pairs
125
+ */
126
+ "grouped-accessor-pairs"?: TtscLintRuleSetting;
127
+ /**
128
+ * Require the body of every `for (key in obj)` loop to begin with a guard
129
+ * against inherited keys: `Object.hasOwn(obj, key)` or the older
130
+ * `Object.prototype.hasOwnProperty.call(obj, key)`. The inverted-guard
131
+ * early-skip shape `if (!Object.hasOwn(...)) continue;` is also accepted.
132
+ *
133
+ * Without the guard the loop processes every enumerable name on the prototype
134
+ * chain — including monkey-patches someone else attached to
135
+ * `Object.prototype` — so an unguarded body silently leaks work onto
136
+ * inherited entries.
137
+ *
138
+ * @reference https://eslint.org/docs/latest/rules/guard-for-in
139
+ */
140
+ "guard-for-in"?: TtscLintRuleSetting;
141
+ /**
142
+ * Reject identifier names shorter than two characters.
143
+ *
144
+ * @reference https://eslint.org/docs/latest/rules/id-length
145
+ */
146
+ "id-length"?: TtscLintRuleSetting;
147
+ /**
148
+ * Require every `var` / `let` declaration to be initialized at its
149
+ * declaration site.
150
+ *
151
+ * @reference https://eslint.org/docs/latest/rules/init-declarations
152
+ */
153
+ "init-declarations"?: TtscLintRuleSetting;
154
+ /**
155
+ * Reject a source file that declares more than one class.
156
+ *
157
+ * @reference https://eslint.org/docs/latest/rules/max-classes-per-file
158
+ */
159
+ "max-classes-per-file"?: TtscLintRuleSetting;
160
+ /**
161
+ * Reject block-statement nesting deeper than four levels inside a function.
162
+ *
163
+ * @reference https://eslint.org/docs/latest/rules/max-depth
164
+ */
165
+ "max-depth"?: TtscLintRuleSetting;
166
+ /**
167
+ * Reject a source file whose total line count exceeds three hundred.
168
+ *
169
+ * @reference https://eslint.org/docs/latest/rules/max-lines
170
+ */
171
+ "max-lines"?: TtscLintRuleSetting;
172
+ /**
173
+ * Reject a function whose body spans more than fifty lines.
174
+ *
175
+ * @reference https://eslint.org/docs/latest/rules/max-lines-per-function
176
+ */
177
+ "max-lines-per-function"?: TtscLintRuleSetting;
178
+ /**
179
+ * Reject callback nesting deeper than ten inside a single function.
180
+ *
181
+ * @reference https://eslint.org/docs/latest/rules/max-nested-callbacks
182
+ */
183
+ "max-nested-callbacks"?: TtscLintRuleSetting;
184
+ /**
185
+ * Reject function declarations whose parameter list grows beyond three. Long
186
+ * parameter lists are hard to read at the call site because positional
187
+ * arguments lose their names; folding them into an options object recovers
188
+ * the names and lets callers pass a subset.
189
+ *
190
+ * Every function-like declaration is checked: function declarations, function
191
+ * expressions, arrow functions, methods, accessors, and constructors. The
192
+ * threshold is fixed at three to match the ESLint default; rule options are
193
+ * deferred.
194
+ *
195
+ * @reference https://eslint.org/docs/latest/rules/max-params
196
+ */
197
+ "max-params"?: TtscLintRuleSetting;
198
+ /**
199
+ * Reject function bodies whose statement count exceeds ten.
200
+ *
201
+ * @reference https://eslint.org/docs/latest/rules/max-statements
202
+ */
203
+ "max-statements"?: TtscLintRuleSetting;
204
+ /**
205
+ * Reject calls to `alert`, `confirm`, and `prompt`.
206
+ *
207
+ * These browser dialogs block the main thread and are almost always debugging
208
+ * leftovers or placeholders for a proper UI component.
209
+ *
210
+ * @reference https://eslint.org/docs/latest/rules/no-alert
211
+ */
212
+ "no-alert"?: TtscLintRuleSetting;
213
+ /**
214
+ * Reject `Array(...)` and `new Array(...)` constructor calls in favor of
215
+ * array literals.
216
+ *
217
+ * `Array(n)` and `[n]` behave differently for a single numeric argument, and
218
+ * the array literal is uniformly clearer.
219
+ *
220
+ * @reference https://eslint.org/docs/latest/rules/no-array-constructor
221
+ */
222
+ "no-array-constructor"?: TtscLintRuleSetting;
223
+ /**
224
+ * Reject `new Promise(async (resolve, reject) => { ... })`.
225
+ *
226
+ * Promises thrown asynchronously inside the executor are dropped silently
227
+ * because the constructor has already returned the outer Promise. Use a
228
+ * regular function and call `reject` explicitly.
229
+ *
230
+ * @reference https://eslint.org/docs/latest/rules/no-async-promise-executor
231
+ */
232
+ "no-async-promise-executor"?: TtscLintRuleSetting;
233
+ /**
234
+ * Reject `await` expressions evaluated inside a loop body. The loop runs
235
+ * strictly serially because each iteration blocks on the previous one's
236
+ * microtask hop; when the operations are independent the equivalent
237
+ * `Promise.all([…])` is dramatically faster. The rule intentionally exempts
238
+ * `for await … of` because the awaitable iterator is the loop's whole reason
239
+ * for existing.
240
+ *
241
+ * @reference https://eslint.org/docs/latest/rules/no-await-in-loop
242
+ */
243
+ "no-await-in-loop"?: TtscLintRuleSetting;
244
+ /**
245
+ * Reject bitwise operators (`&`, `|`, `^`, `~`, `<<`, `>>`, `>>>`).
246
+ *
247
+ * Bitwise operators are almost always typos for the logical operators (`&&`,
248
+ * `||`); enable when the codebase has no legitimate bit-twiddling.
249
+ *
250
+ * @reference https://eslint.org/docs/latest/rules/no-bitwise
251
+ */
252
+ "no-bitwise"?: TtscLintRuleSetting;
253
+ /**
254
+ * Reject `arguments.caller` and `arguments.callee`, both deprecated
255
+ * properties forbidden in strict mode.
256
+ *
257
+ * They defeat engine optimizations and break under ES modules, where strict
258
+ * mode is implicit.
259
+ *
260
+ * @reference https://eslint.org/docs/latest/rules/no-caller
261
+ */
262
+ "no-caller"?: TtscLintRuleSetting;
263
+ /**
264
+ * Reject lexical declarations (`let`, `const`, `class`, `function`) inside
265
+ * `case` or `default` clauses without their own block, since the declaration
266
+ * shares the whole `switch` scope and leaks into sibling clauses.
267
+ *
268
+ * Wrap the case body in `{ ... }` to introduce a fresh block.
269
+ *
270
+ * @reference https://eslint.org/docs/latest/rules/no-case-declarations
271
+ */
272
+ "no-case-declarations"?: TtscLintRuleSetting;
273
+ /**
274
+ * Reject reassigning a class binding (`class C {}; C = ...`).
275
+ *
276
+ * The declaration name is effectively final; overwriting it silently leaves
277
+ * other call sites pointing at the original class.
278
+ *
279
+ * @reference https://eslint.org/docs/latest/rules/no-class-assign
280
+ */
281
+ "no-class-assign"?: TtscLintRuleSetting;
282
+ /**
283
+ * Reject comparisons against `-0` (`x === -0`, `x < -0`, etc.).
284
+ *
285
+ * `===` treats `+0` and `-0` as equal, so the comparison never distinguishes
286
+ * them; use `Object.is(x, -0)` when the sign of zero actually matters.
287
+ *
288
+ * @reference https://eslint.org/docs/latest/rules/no-compare-neg-zero
289
+ */
290
+ "no-compare-neg-zero"?: TtscLintRuleSetting;
291
+ /**
292
+ * Reject assignment expressions inside conditions, such as `if (x = y)` —
293
+ * almost always a typo for `==` / `===`.
294
+ *
295
+ * @reference https://eslint.org/docs/latest/rules/no-cond-assign
296
+ */
297
+ "no-cond-assign"?: TtscLintRuleSetting;
298
+ /**
299
+ * Reject calls to `console.*`.
300
+ *
301
+ * Typically configured as `"warning"` so leftover logging stays visible
302
+ * without breaking the build.
303
+ *
304
+ * @reference https://eslint.org/docs/latest/rules/no-console
305
+ */
306
+ "no-console"?: TtscLintRuleSetting;
307
+ /**
308
+ * Reject conditions whose value can be determined statically, such as `while
309
+ * (true)` or `if (false)`, in `if`, `while`, `do/while`, `for`, and ternary
310
+ * expressions.
311
+ *
312
+ * The default `checkLoops` configuration still permits intentional infinite
313
+ * loops in a few forms; see upstream for the matrix.
314
+ *
315
+ * @reference https://eslint.org/docs/latest/rules/no-constant-condition
316
+ */
317
+ "no-constant-condition"?: TtscLintRuleSetting;
318
+ /**
319
+ * Reject `continue` statements.
320
+ *
321
+ * Stylistic policy preferring early returns or restructured loops over
322
+ * `continue`.
323
+ *
324
+ * @reference https://eslint.org/docs/latest/rules/no-continue
325
+ */
326
+ "no-continue"?: TtscLintRuleSetting;
327
+ /**
328
+ * Reject `return X;` (with a value) inside a class constructor. The returned
329
+ * value is ignored when the constructor is invoked with `new` unless it
330
+ * happens to be an object; relying on that behavior is always a
331
+ * misunderstanding of the constructor protocol.
332
+ *
333
+ * @reference https://eslint.org/docs/latest/rules/no-constructor-return
334
+ */
335
+ "no-constructor-return"?: TtscLintRuleSetting;
336
+ /**
337
+ * Reject ASCII control characters (`\x00`–`\x1F`) inside regular expression
338
+ * literals and `RegExp` strings.
339
+ *
340
+ * They render invisibly in source and almost always indicate an accidental
341
+ * paste or a missed `\t` / `\n` escape.
342
+ *
343
+ * @reference https://eslint.org/docs/latest/rules/no-control-regex
344
+ */
345
+ "no-control-regex"?: TtscLintRuleSetting;
346
+ /**
347
+ * Reject `debugger` statements.
348
+ *
349
+ * Typically configured as `"error"` so accidental debugger leftovers fail CI.
350
+ *
351
+ * @reference https://eslint.org/docs/latest/rules/no-debugger
352
+ */
353
+ "no-debugger"?: TtscLintRuleSetting;
354
+ /**
355
+ * Reject `delete` applied to plain variable bindings (`delete x`).
356
+ *
357
+ * The operation is forbidden in strict mode (and therefore in ES modules) and
358
+ * never has the intended effect on `let` / `const` / `var` declarations.
359
+ *
360
+ * @reference https://eslint.org/docs/latest/rules/no-delete-var
361
+ */
362
+ "no-delete-var"?: TtscLintRuleSetting;
363
+ /**
364
+ * Reject `function f(a, a)` and similar parameter lists that declare the same
365
+ * name twice.
366
+ *
367
+ * The function cannot bind both arguments and fails in strict mode.
368
+ *
369
+ * @reference https://eslint.org/docs/latest/rules/no-dupe-args
370
+ */
371
+ "no-dupe-args"?: TtscLintRuleSetting;
372
+ /**
373
+ * Reject two declarations of the same member on a single class. The later
374
+ * declaration silently overwrites the earlier one at runtime; the syntax
375
+ * permits it but the result is never what the author intended. A getter and a
376
+ * setter for the same property coexist; an instance member and a static
377
+ * member with the same name coexist.
378
+ *
379
+ * @reference https://eslint.org/docs/latest/rules/no-dupe-class-members
380
+ */
381
+ "no-dupe-class-members"?: TtscLintRuleSetting;
382
+ /**
383
+ * Reject `if (a) {} else if (a) {}` — the second branch is unreachable
384
+ * because the first condition already handled it.
385
+ *
386
+ * @reference https://eslint.org/docs/latest/rules/no-dupe-else-if
387
+ */
388
+ "no-dupe-else-if"?: TtscLintRuleSetting;
389
+ /**
390
+ * Reject `{ a: 1, a: 2 }` — duplicate property keys in an object literal
391
+ * silently overwrite earlier values.
392
+ *
393
+ * @reference https://eslint.org/docs/latest/rules/no-dupe-keys
394
+ */
395
+ "no-dupe-keys"?: TtscLintRuleSetting;
396
+ /**
397
+ * Reject the same `case` label appearing twice in a `switch` — later
398
+ * duplicates are unreachable.
399
+ *
400
+ * @reference https://eslint.org/docs/latest/rules/no-duplicate-case
401
+ */
402
+ "no-duplicate-case"?: TtscLintRuleSetting;
403
+ /**
404
+ * Reject two import declarations that resolve to the same module specifier.
405
+ * The runtime sees one module load either way; the duplicated declaration is
406
+ * purely noise at the head of the file and obscures the dependency graph.
407
+ *
408
+ * @reference https://eslint.org/docs/latest/rules/no-duplicate-imports
409
+ */
410
+ "no-duplicate-imports"?: TtscLintRuleSetting;
411
+ /**
412
+ * Reject an `else` block whose preceding `if` branch already terminates
413
+ * control flow with `return`, `throw`, `break`, or `continue` — flatten the
414
+ * body into the surrounding scope.
415
+ *
416
+ * @reference https://eslint.org/docs/latest/rules/no-else-return
417
+ */
418
+ "no-else-return"?: TtscLintRuleSetting;
419
+ /**
420
+ * Reject empty blocks (`if (x) {}`, `while (x) {}`, `try {} catch (e) {}`
421
+ * etc.) that almost always indicate forgotten code.
422
+ *
423
+ * @reference https://eslint.org/docs/latest/rules/no-empty
424
+ */
425
+ "no-empty"?: TtscLintRuleSetting;
426
+ /**
427
+ * Reject empty regex character classes (`[]`).
428
+ *
429
+ * An empty class never matches anything, so the entire pattern can never
430
+ * succeed; the negated form `[^]` (matches any character) is allowed.
431
+ *
432
+ * @reference https://eslint.org/docs/latest/rules/no-empty-character-class
433
+ */
434
+ "no-empty-character-class"?: TtscLintRuleSetting;
435
+ /**
436
+ * Reject empty function and method bodies (`function f() {}`, `() => {}`).
437
+ *
438
+ * Use `() => undefined` or a leading TODO comment when the empty body is
439
+ * intentional.
440
+ *
441
+ * @reference https://eslint.org/docs/latest/rules/no-empty-function
442
+ */
443
+ "no-empty-function"?: TtscLintRuleSetting;
444
+ /**
445
+ * Reject empty named import or export clauses — `import {} from "x"`, `import
446
+ * name, {} from "x"`, and `export {}` — which bind nothing.
447
+ *
448
+ * The empty-only import shape leaves just the side-effect load and is better
449
+ * written as `import "x"`; the default-plus-empty form should drop the empty
450
+ * clause; and a bare `export {}` either restates module-ness redundantly or
451
+ * marks an otherwise non-module file in a way that has cleaner alternatives.
452
+ * The stricter sibling rule `typescript/no-useless-empty-export` fires only
453
+ * when another module-syntax statement is already present.
454
+ *
455
+ * @reference https://eslint.org/docs/latest/rules/no-empty-named-blocks
456
+ */
457
+ "no-empty-named-blocks"?: TtscLintRuleSetting;
458
+ /**
459
+ * Reject empty destructuring patterns (`const {} = obj`, `function f([])
460
+ * {}`), which bind nothing and are usually mid-edit typos.
461
+ *
462
+ * @reference https://eslint.org/docs/latest/rules/no-empty-pattern
463
+ */
464
+ "no-empty-pattern"?: TtscLintRuleSetting;
465
+ /**
466
+ * Reject empty `static {}` class initialization blocks.
467
+ *
468
+ * @reference https://eslint.org/docs/latest/rules/no-empty-static-block
469
+ */
470
+ "no-empty-static-block"?: TtscLintRuleSetting;
471
+ /**
472
+ * Reject loose null comparisons (`x == null`).
473
+ *
474
+ * Use `x === null` or the explicit `x === null || x === undefined`.
475
+ *
476
+ * Pairs with `eqeqeq` but kept separate so the loose null shortcut can be
477
+ * allowed under `"smart"`-style `eqeqeq` exceptions.
478
+ *
479
+ * @reference https://eslint.org/docs/latest/rules/no-eq-null
480
+ */
481
+ "no-eq-null"?: TtscLintRuleSetting;
482
+ /**
483
+ * Reject `eval(...)` and indirect `eval` calls — almost always a security or
484
+ * correctness bug.
485
+ *
486
+ * @reference https://eslint.org/docs/latest/rules/no-eval
487
+ */
488
+ "no-eval"?: TtscLintRuleSetting;
489
+ /**
490
+ * Reject reassigning the parameter of a `catch` clause (`catch (e) { e = ...
491
+ * }`), which loses the original error reference.
492
+ *
493
+ * @reference https://eslint.org/docs/latest/rules/no-ex-assign
494
+ */
495
+ "no-ex-assign"?: TtscLintRuleSetting;
496
+ /**
497
+ * Reject assignments to a built-in prototype such as `Array.prototype.foo =
498
+ * bar`. Only `<Builtin>.prototype.<key> = …` is flagged; assigning to
499
+ * `Object.foo = …` (a static property) is left alone.
500
+ *
501
+ * @reference https://eslint.org/docs/latest/rules/no-extend-native
502
+ */
503
+ "no-extend-native"?: TtscLintRuleSetting;
504
+ /**
505
+ * Reject unnecessary `Function.prototype.bind()` calls — for example, binding
506
+ * without arguments or binding an arrow function (which ignores `this`).
507
+ *
508
+ * @reference https://eslint.org/docs/latest/rules/no-extra-bind
509
+ */
510
+ "no-extra-bind"?: TtscLintRuleSetting;
511
+ /**
512
+ * Reject redundant boolean casts such as `!!Boolean(x)`, `if (Boolean(x))`,
513
+ * or `Boolean(!!x)`.
514
+ *
515
+ * @reference https://eslint.org/docs/latest/rules/no-extra-boolean-cast
516
+ */
517
+ "no-extra-boolean-cast"?: TtscLintRuleSetting;
518
+ /**
519
+ * Reject `switch` case fall-through unless preceded by an explicit `// falls
520
+ * through` comment.
521
+ *
522
+ * @reference https://eslint.org/docs/latest/rules/no-fallthrough
523
+ */
524
+ "no-fallthrough"?: TtscLintRuleSetting;
525
+ /**
526
+ * Reject reassignment of function declarations (`function f() {}; f = 0;`).
527
+ *
528
+ * The hoisted binding looks final to most readers; overwriting it makes the
529
+ * original implementation unreachable from other references.
530
+ *
531
+ * @reference https://eslint.org/docs/latest/rules/no-func-assign
532
+ */
533
+ "no-func-assign"?: TtscLintRuleSetting;
534
+ /**
535
+ * Reject common implicit-coercion idioms (`!!x`, `+x`, `"" + x`) in favor of
536
+ * the explicit `Boolean(x)` / `Number(x)` / `String(x)` conversions. The
537
+ * explicit forms are more readable and avoid surprise around primitive edge
538
+ * cases.
539
+ *
540
+ * @reference https://eslint.org/docs/latest/rules/no-implicit-coercion
541
+ */
542
+ "no-implicit-coercion"?: TtscLintRuleSetting;
543
+ /**
544
+ * Reject writes to a binding introduced by an `import` declaration —
545
+ * assignment (`x = …`), compound assignment, or increment/decrement of an
546
+ * imported name, plus property mutations of a namespace import (`ns.foo =
547
+ * …`). Imported bindings are read-only at runtime; mutating them either
548
+ * throws under strict mode or silently desynchronises the module's view of
549
+ * its own exports.
550
+ *
551
+ * @reference https://eslint.org/docs/latest/rules/no-import-assign
552
+ */
553
+ "no-import-assign"?: TtscLintRuleSetting;
554
+ /**
555
+ * Reject `function` and `var` declarations nested in non-function blocks
556
+ * (loops, `if`, etc.) — they hoist in surprising ways.
557
+ *
558
+ * @reference https://eslint.org/docs/latest/rules/no-inner-declarations
559
+ */
560
+ "no-inner-declarations"?: TtscLintRuleSetting;
561
+ /**
562
+ * Reject `this` references outside any function-like, class method, or
563
+ * class-static-block context.
564
+ *
565
+ * @reference https://eslint.org/docs/latest/rules/no-invalid-this
566
+ */
567
+ "no-invalid-this"?: TtscLintRuleSetting;
568
+ /**
569
+ * Reject irregular whitespace characters (zero-width space, non-breaking
570
+ * space, etc.) in source — typically copy-paste artifacts from rich-text
571
+ * editors.
572
+ *
573
+ * @reference https://eslint.org/docs/latest/rules/no-irregular-whitespace
574
+ */
575
+ "no-irregular-whitespace"?: TtscLintRuleSetting;
576
+ /**
577
+ * Reject the legacy `__iterator__` property — a SpiderMonkey-only extension
578
+ * predating ES2015 iterators.
579
+ *
580
+ * Use `Symbol.iterator` or a generator.
581
+ *
582
+ * @reference https://eslint.org/docs/latest/rules/no-iterator
583
+ */
584
+ "no-iterator"?: TtscLintRuleSetting;
585
+ /**
586
+ * Reject labeled statements (`outer: for (...) { break outer; }`).
587
+ *
588
+ * Labels obscure control flow; prefer extracting the inner loop into a
589
+ * function and using `return`, or refactoring with a flag variable.
590
+ *
591
+ * @reference https://eslint.org/docs/latest/rules/no-labels
592
+ */
593
+ "no-labels"?: TtscLintRuleSetting;
594
+ /**
595
+ * Reject standalone `{ ... }` blocks that introduce no lexical scope distinct
596
+ * from the surrounding block.
597
+ *
598
+ * Blocks that actually declare `let`, `const`, `class`, or `function` (in
599
+ * strict mode) are exempt, since those declarations need the inner scope.
600
+ *
601
+ * @reference https://eslint.org/docs/latest/rules/no-lone-blocks
602
+ */
603
+ "no-lone-blocks"?: TtscLintRuleSetting;
604
+ /**
605
+ * Reject `if (cond) { if (...) { ... } }` where the inner `if` is the only
606
+ * statement in an `else` — prefer `else if`.
607
+ *
608
+ * @reference https://eslint.org/docs/latest/rules/no-lonely-if
609
+ */
610
+ "no-lonely-if"?: TtscLintRuleSetting;
611
+ /**
612
+ * Reject function declarations defined inside the body of a loop. Each
613
+ * iteration of the loop allocates a fresh function whose closure captures the
614
+ * surrounding `let`/`var` binding — a class of bugs where every captured
615
+ * function reads the iteration's final value instead of its own.
616
+ *
617
+ * @reference https://eslint.org/docs/latest/rules/no-loop-func
618
+ */
619
+ "no-loop-func"?: TtscLintRuleSetting;
620
+ /**
621
+ * Reject numeric literals whose source text cannot round-trip through
622
+ * `Number` without losing digits, including overflow.
623
+ *
624
+ * @reference https://eslint.org/docs/latest/rules/no-loss-of-precision
625
+ */
626
+ "no-loss-of-precision"?: TtscLintRuleSetting;
627
+ /**
628
+ * Reject inline numeric literals outside `const` initializer position. `0`,
629
+ * `1`, `-1`, array indices, and enum values are exempt.
630
+ *
631
+ * @reference https://eslint.org/docs/latest/rules/no-magic-numbers
632
+ */
633
+ "no-magic-numbers"?: TtscLintRuleSetting;
634
+ /**
635
+ * Reject regex character classes that contain combined Unicode sequences
636
+ * (e.g. surrogate pairs) which most readers will not realize represent
637
+ * multiple code units.
638
+ *
639
+ * @reference https://eslint.org/docs/latest/rules/no-misleading-character-class
640
+ */
641
+ "no-misleading-character-class"?: TtscLintRuleSetting;
642
+ /**
643
+ * Reject mixing operators of different precedence families in the same
644
+ * expression without explicit parentheses around the inner sub-expression.
645
+ * The famous case is `a && b || c`: readers expect left-to-right grouping but
646
+ * the parser sees `(a && b) || c` because `&&` binds tighter than `||`.
647
+ *
648
+ * The conservative baseline only flags the highest-confusion mixes — logical
649
+ * mixed with a different logical (`&&` next to `||` / `??`), and bitwise
650
+ * (`&`, `|`, `^`) next to a comparison or logical. Wrapping the inner
651
+ * sub-expression in parens suppresses the report.
652
+ *
653
+ * @reference https://eslint.org/docs/latest/rules/no-mixed-operators
654
+ */
655
+ "no-mixed-operators"?: TtscLintRuleSetting;
656
+ /**
657
+ * Reject chained assignment such as `a = b = 0`, which obscures intent and
658
+ * surprises readers who expect comparison.
659
+ *
660
+ * @reference https://eslint.org/docs/latest/rules/no-multi-assign
661
+ */
662
+ "no-multi-assign"?: TtscLintRuleSetting;
663
+ /**
664
+ * Reject backslash-newline multiline string literals; use template literals
665
+ * instead.
666
+ *
667
+ * @reference https://eslint.org/docs/latest/rules/no-multi-str
668
+ */
669
+ "no-multi-str"?: TtscLintRuleSetting;
670
+ /**
671
+ * Reject `if (!cond) { ... } else { ... }` — flip the branches so the
672
+ * positive condition reads first.
673
+ *
674
+ * @reference https://eslint.org/docs/latest/rules/no-negated-condition
675
+ */
676
+ "no-negated-condition"?: TtscLintRuleSetting;
677
+ /**
678
+ * Reject ternary expressions nested in other ternaries (`a ? b : c ? d : e`),
679
+ * which are hard to read at a glance.
680
+ *
681
+ * @reference https://eslint.org/docs/latest/rules/no-nested-ternary
682
+ */
683
+ "no-nested-ternary"?: TtscLintRuleSetting;
684
+ /**
685
+ * Reject `new` expressions whose return value is not assigned or used — the
686
+ * object is created only for its constructor side effects.
687
+ *
688
+ * @reference https://eslint.org/docs/latest/rules/no-new
689
+ */
690
+ "no-new"?: TtscLintRuleSetting;
691
+ /**
692
+ * Reject `new Function(...)` and `Function(...)` calls, which effectively
693
+ * evaluate a string and have the same risks as `eval`.
694
+ *
695
+ * @reference https://eslint.org/docs/latest/rules/no-new-func
696
+ */
697
+ "no-new-func"?: TtscLintRuleSetting;
698
+ /**
699
+ * Reject primitive wrapper constructors `new String(...)`, `new Number(...)`,
700
+ * `new Boolean(...)`.
701
+ *
702
+ * The resulting objects compare unequal to their primitive counterparts.
703
+ *
704
+ * @reference https://eslint.org/docs/latest/rules/no-new-wrappers
705
+ */
706
+ "no-new-wrappers"?: TtscLintRuleSetting;
707
+ /**
708
+ * Reject `new Symbol(...)`. `Symbol` is a function but not a constructor;
709
+ * calling it with `new` throws a TypeError at runtime. The upstream rule was
710
+ * renamed `no-new-native-nonconstructor`; the legacy name remains the more
711
+ * readable pointer for this specific Symbol check.
712
+ *
713
+ * @reference https://eslint.org/docs/latest/rules/no-new-symbol
714
+ */
715
+ "no-new-symbol"?: TtscLintRuleSetting;
716
+ /**
717
+ * Reject calling global non-callable objects as functions, such as `Math()`
718
+ * or `JSON()`.
719
+ *
720
+ * @reference https://eslint.org/docs/latest/rules/no-obj-calls
721
+ */
722
+ "no-obj-calls"?: TtscLintRuleSetting;
723
+ /**
724
+ * Reject `new Object()` and `Object()` constructor calls; use an object
725
+ * literal `{}` instead.
726
+ *
727
+ * @reference https://eslint.org/docs/latest/rules/no-object-constructor
728
+ */
729
+ "no-object-constructor"?: TtscLintRuleSetting;
730
+ /**
731
+ * Reject legacy octal literals (`0123`).
732
+ *
733
+ * Use the `0o123` prefix when an octal literal is actually intended.
734
+ *
735
+ * @reference https://eslint.org/docs/latest/rules/no-octal
736
+ */
737
+ "no-octal"?: TtscLintRuleSetting;
738
+ /**
739
+ * Reject octal escape sequences in string literals (`"\251"`, `"\07"`).
740
+ *
741
+ * Deprecated and forbidden in strict mode; use Unicode (`©`) or hex (`\xA9`)
742
+ * escapes.
743
+ *
744
+ * @reference https://eslint.org/docs/latest/rules/no-octal-escape
745
+ */
746
+ "no-octal-escape"?: TtscLintRuleSetting;
747
+ /**
748
+ * Reject reassigning a function parameter inside the body of the function it
749
+ * belongs to. The parameter name stops pointing at the caller's argument
750
+ * after the write. Property mutations (`param.foo = …`) are not flagged.
751
+ *
752
+ * @reference https://eslint.org/docs/latest/rules/no-param-reassign
753
+ */
754
+ "no-param-reassign"?: TtscLintRuleSetting;
755
+ /**
756
+ * Reject `++` and `--` operators.
757
+ *
758
+ * Prefer `+= 1` / `-= 1` to keep statements expression-only and avoid ASI
759
+ * surprises.
760
+ *
761
+ * @reference https://eslint.org/docs/latest/rules/no-plusplus
762
+ */
763
+ "no-plusplus"?: TtscLintRuleSetting;
764
+ /**
765
+ * Reject `return` inside the Promise executor function — the value is
766
+ * ignored.
767
+ *
768
+ * @reference https://eslint.org/docs/latest/rules/no-promise-executor-return
769
+ */
770
+ "no-promise-executor-return"?: TtscLintRuleSetting;
771
+ /**
772
+ * Reject access to `obj.__proto__`; use `Object.getPrototypeOf` /
773
+ * `Object.setPrototypeOf`.
774
+ *
775
+ * @reference https://eslint.org/docs/latest/rules/no-proto
776
+ */
777
+ "no-proto"?: TtscLintRuleSetting;
778
+ /**
779
+ * Reject `obj.hasOwnProperty(key)` and other direct `Object.prototype`
780
+ * builtins on user objects, since the property may be shadowed.
781
+ *
782
+ * Use `Object.prototype.hasOwnProperty.call(obj, key)` or `Object.hasOwn`.
783
+ *
784
+ * @reference https://eslint.org/docs/latest/rules/no-prototype-builtins
785
+ */
786
+ "no-prototype-builtins"?: TtscLintRuleSetting;
787
+ /**
788
+ * Reject declaring the same binding more than once in the same scope (`var x
789
+ * = 1; var x = 2;`, two `function foo()` declarations side by side, or a
790
+ * parameter rebound by a later `var` in the body). The second declaration
791
+ * silently overwrites the first; shadowing the binding in a nested scope is
792
+ * left alone.
793
+ *
794
+ * @reference https://eslint.org/docs/latest/rules/no-redeclare
795
+ */
796
+ "no-redeclare"?: TtscLintRuleSetting;
797
+ /**
798
+ * Reject more than one consecutive literal space in a regex; use `{N}`
799
+ * quantifiers for clarity.
800
+ *
801
+ * @reference https://eslint.org/docs/latest/rules/no-regex-spaces
802
+ */
803
+ "no-regex-spaces"?: TtscLintRuleSetting;
804
+ /**
805
+ * Reject `import` declarations targeting any module specifier in the project
806
+ * denylist.
807
+ *
808
+ * @reference https://eslint.org/docs/latest/rules/no-restricted-imports
809
+ */
810
+ "no-restricted-imports"?: TtscLintRuleSetting;
811
+ /**
812
+ * Reject AST node kinds listed in the project denylist.
813
+ *
814
+ * @reference https://eslint.org/docs/latest/rules/no-restricted-syntax
815
+ */
816
+ "no-restricted-syntax"?: TtscLintRuleSetting;
817
+ /**
818
+ * Reject assignment expressions used as the operand of `return` (`return x =
819
+ * 1`) — almost always a typo for `===`.
820
+ *
821
+ * @reference https://eslint.org/docs/latest/rules/no-return-assign
822
+ */
823
+ "no-return-assign"?: TtscLintRuleSetting;
824
+ /**
825
+ * Reject `javascript:` URLs in string literals — they execute their body as
826
+ * code on browser navigation, and security scanners treat them as an `eval`
827
+ * equivalent.
828
+ *
829
+ * @reference https://eslint.org/docs/latest/rules/no-script-url
830
+ */
831
+ "no-script-url"?: TtscLintRuleSetting;
832
+ /**
833
+ * Reject `x = x` and destructuring forms that copy a value to itself — almost
834
+ * always a typo.
835
+ *
836
+ * @reference https://eslint.org/docs/latest/rules/no-self-assign
837
+ */
838
+ "no-self-assign"?: TtscLintRuleSetting;
839
+ /**
840
+ * Reject comparing a value to itself (`x === x`). Use `Number.isNaN(x)` to
841
+ * test for `NaN`.
842
+ *
843
+ * @reference https://eslint.org/docs/latest/rules/no-self-compare
844
+ */
845
+ "no-self-compare"?: TtscLintRuleSetting;
846
+ /**
847
+ * Reject comma expressions (`a, b`) outside the heads of `for` statements.
848
+ *
849
+ * @reference https://eslint.org/docs/latest/rules/no-sequences
850
+ */
851
+ "no-sequences"?: TtscLintRuleSetting;
852
+ /**
853
+ * Reject explicit `return` from a setter — setters' return values are
854
+ * ignored.
855
+ *
856
+ * @reference https://eslint.org/docs/latest/rules/no-setter-return
857
+ */
858
+ "no-setter-return"?: TtscLintRuleSetting;
859
+ /**
860
+ * Reject a variable declaration that shadows a same-name binding in an
861
+ * enclosing scope.
862
+ *
863
+ * @reference https://eslint.org/docs/latest/rules/no-shadow
864
+ */
865
+ "no-shadow"?: TtscLintRuleSetting;
866
+ /**
867
+ * Reject redeclaring restricted globals (`NaN`, `Infinity`, `undefined`,
868
+ * etc.).
869
+ *
870
+ * @reference https://eslint.org/docs/latest/rules/no-shadow-restricted-names
871
+ */
872
+ "no-shadow-restricted-names"?: TtscLintRuleSetting;
873
+ /**
874
+ * Reject array literals with elision (`[, 1, , 3]`), which read surprisingly
875
+ * and rarely express intent.
876
+ *
877
+ * @reference https://eslint.org/docs/latest/rules/no-sparse-arrays
878
+ */
879
+ "no-sparse-arrays"?: TtscLintRuleSetting;
880
+ /**
881
+ * Reject `${expr}` inside ordinary single- or double-quoted strings — almost
882
+ * always a missing template-literal backtick.
883
+ *
884
+ * @reference https://eslint.org/docs/latest/rules/no-template-curly-in-string
885
+ */
886
+ "no-template-curly-in-string"?: TtscLintRuleSetting;
887
+ /**
888
+ * Reject `this` (or `super.x`) references that precede the first `super()`
889
+ * call in a derived constructor. The runtime throws a ReferenceError on the
890
+ * first such access; catching it at lint time avoids a class of bugs that
891
+ * only surface after the constructor is actually called.
892
+ *
893
+ * @reference https://eslint.org/docs/latest/rules/no-this-before-super
894
+ */
895
+ "no-this-before-super"?: TtscLintRuleSetting;
896
+ /**
897
+ * Reject throwing non-Error operands (`throw "boom"`, `throw 1`).
898
+ *
899
+ * @reference https://eslint.org/docs/latest/rules/no-throw-literal
900
+ */
901
+ "no-throw-literal"?: TtscLintRuleSetting;
902
+ /**
903
+ * Reject initializing a variable to the literal `undefined` (`let x =
904
+ * undefined`) — declaring without an initializer has the same effect.
905
+ *
906
+ * @reference https://eslint.org/docs/latest/rules/no-undef-init
907
+ */
908
+ "no-undef-init"?: TtscLintRuleSetting;
909
+ /**
910
+ * Reject use of the global `undefined` identifier; use the `void 0`
911
+ * expression or omit the value.
912
+ *
913
+ * @reference https://eslint.org/docs/latest/rules/no-undefined
914
+ */
915
+ "no-undefined"?: TtscLintRuleSetting;
916
+ /**
917
+ * Reject `cond ? true : false` and similar ternaries that can be simplified
918
+ * to a boolean coercion or the condition itself.
919
+ *
920
+ * @reference https://eslint.org/docs/latest/rules/no-unneeded-ternary
921
+ */
922
+ "no-unneeded-ternary"?: TtscLintRuleSetting;
923
+ /**
924
+ * Reject statements that follow an unconditional `return`, `throw`, `break`,
925
+ * or `continue` in the same block — control flow has already left the block,
926
+ * so any later statement is dead code.
927
+ *
928
+ * The conservative baseline scans the immediate statement list of a block (or
929
+ * the top-level source / module body) only; hoistable function declarations
930
+ * following the terminator are exempt because they are hoisted above the
931
+ * unreachable point.
932
+ *
933
+ * @reference https://eslint.org/docs/latest/rules/no-unreachable
934
+ */
935
+ "no-unreachable"?: TtscLintRuleSetting;
936
+ /**
937
+ * Reject `return` and `throw` inside a `finally` block, which override any
938
+ * earlier `return`/`throw` from the corresponding `try`/`catch`.
939
+ *
940
+ * @reference https://eslint.org/docs/latest/rules/no-unsafe-finally
941
+ */
942
+ "no-unsafe-finally"?: TtscLintRuleSetting;
943
+ /**
944
+ * Reject `!key in obj` and `!a instanceof B` where the `!` binds tighter than
945
+ * the relational operator and silently coerces the left operand to a
946
+ * boolean.
947
+ *
948
+ * Wrap in parens (`!(key in obj)`) when the negation is genuinely intended.
949
+ *
950
+ * @reference https://eslint.org/docs/latest/rules/no-unsafe-negation
951
+ */
952
+ "no-unsafe-negation"?: TtscLintRuleSetting;
953
+ /**
954
+ * Reject member access or call expressions that chain off an optional chain
955
+ * without continuing the chain. `(obj?.foo).bar` throws a TypeError if obj is
956
+ * null/undefined; the chain must continue with `?.` to remain safe.
957
+ *
958
+ * @reference https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining
959
+ */
960
+ "no-unsafe-optional-chaining"?: TtscLintRuleSetting;
961
+ /**
962
+ * Reject expression statements with no observable effect, like a bare `x;` or
963
+ * `'use strict' && f();`.
964
+ *
965
+ * @reference https://eslint.org/docs/latest/rules/no-unused-expressions
966
+ */
967
+ "no-unused-expressions"?: TtscLintRuleSetting;
968
+ /**
969
+ * Reject labels that no `break` or `continue` statement references.
970
+ *
971
+ * Usually the targeted statement was renamed or removed but the label was
972
+ * left behind.
973
+ *
974
+ * @reference https://eslint.org/docs/latest/rules/no-unused-labels
975
+ */
976
+ "no-unused-labels"?: TtscLintRuleSetting;
977
+ /**
978
+ * Reject an assignment whose value is immediately overwritten by the very
979
+ * next statement without an intervening read of the same identifier. The
980
+ * conservative baseline only fires on two syntactically adjacent `x =
981
+ * <expr>;` statements where the left-hand sides are the same bare identifier
982
+ * and the second statement's right-hand side does not reference `x` itself —
983
+ * almost always a leftover from refactoring.
984
+ *
985
+ * @reference https://eslint.org/docs/latest/rules/no-useless-assignment
986
+ */
987
+ "no-useless-assignment"?: TtscLintRuleSetting;
988
+ /**
989
+ * Reject unnecessary `.call()` / `.apply()` calls (such as `f.call(undefined,
990
+ * x)`).
991
+ *
992
+ * @reference https://eslint.org/docs/latest/rules/no-useless-call
993
+ */
994
+ "no-useless-call"?: TtscLintRuleSetting;
995
+ /**
996
+ * Reject `catch (e) { throw e }` patterns that only rethrow the caught error
997
+ * without adding context or handling.
998
+ *
999
+ * @reference https://eslint.org/docs/latest/rules/no-useless-catch
1000
+ */
1001
+ "no-useless-catch"?: TtscLintRuleSetting;
1002
+ /**
1003
+ * Reject computed property keys whose expression is a literal identifier (`{
1004
+ * ["foo"]: 1 }`).
1005
+ *
1006
+ * @reference https://eslint.org/docs/latest/rules/no-useless-computed-key
1007
+ */
1008
+ "no-useless-computed-key"?: TtscLintRuleSetting;
1009
+ /**
1010
+ * Reject `"a" + "b"` and similar concatenations where every operand is a
1011
+ * literal string.
1012
+ *
1013
+ * @reference https://eslint.org/docs/latest/rules/no-useless-concat
1014
+ */
1015
+ "no-useless-concat"?: TtscLintRuleSetting;
1016
+ /**
1017
+ * Reject empty constructor bodies (`class X { constructor() {} }`) that add
1018
+ * nothing over the implicit constructor.
1019
+ *
1020
+ * @reference https://eslint.org/docs/latest/rules/no-useless-constructor
1021
+ */
1022
+ "no-useless-constructor"?: TtscLintRuleSetting;
1023
+ /**
1024
+ * Reject unnecessary escape sequences in strings and regex literals, such as
1025
+ * `"\."` or `/\,/`. Autofixable.
1026
+ *
1027
+ * @reference https://eslint.org/docs/latest/rules/no-useless-escape
1028
+ */
1029
+ "no-useless-escape"?: TtscLintRuleSetting;
1030
+ /**
1031
+ * Reject `{ x: x }` destructuring renames that bind back to the same name.
1032
+ * Autofixable.
1033
+ *
1034
+ * @reference https://eslint.org/docs/latest/rules/no-useless-rename
1035
+ */
1036
+ "no-useless-rename"?: TtscLintRuleSetting;
1037
+ /**
1038
+ * Reject a bare `return;` whose only effect is to end a function body that
1039
+ * would have returned anyway. The conservative baseline only fires on the
1040
+ * last statement of a function-like's immediate body — earlier `return;`
1041
+ * inside a branch or loop may still be load-bearing.
1042
+ *
1043
+ * @reference https://eslint.org/docs/latest/rules/no-useless-return
1044
+ */
1045
+ "no-useless-return"?: TtscLintRuleSetting;
1046
+ /**
1047
+ * Reject `var` declarations.
1048
+ *
1049
+ * Use `let` for mutable bindings and `const` for immutable ones. Autofixable
1050
+ * to `let`.
1051
+ *
1052
+ * @reference https://eslint.org/docs/latest/rules/no-var
1053
+ */
1054
+ "no-var"?: TtscLintRuleSetting;
1055
+ /**
1056
+ * Reject `with (...)` statements.
1057
+ *
1058
+ * `with` is forbidden in strict mode (and therefore in modules), defeats
1059
+ * lexical scoping, and blocks engine optimization.
1060
+ *
1061
+ * @reference https://eslint.org/docs/latest/rules/no-with
1062
+ */
1063
+ "no-with"?: TtscLintRuleSetting;
1064
+ /**
1065
+ * Reject `{ foo: foo }` and similar object-literal shorthand candidates in
1066
+ * favor of `{ foo }`. Autofixable.
1067
+ *
1068
+ * @reference https://eslint.org/docs/latest/rules/object-shorthand
1069
+ */
1070
+ "object-shorthand"?: TtscLintRuleSetting;
1071
+ /**
1072
+ * Prefer compound assignment (`x += y`) over the long form (`x = x + y`)
1073
+ * where the two are equivalent.
1074
+ *
1075
+ * @reference https://eslint.org/docs/latest/rules/operator-assignment
1076
+ */
1077
+ "operator-assignment"?: TtscLintRuleSetting;
1078
+ /**
1079
+ * Reject `function() { ... }` expressions passed as callback arguments —
1080
+ * prefer the arrow form.
1081
+ *
1082
+ * @reference https://eslint.org/docs/latest/rules/prefer-arrow-callback
1083
+ */
1084
+ "prefer-arrow-callback"?: TtscLintRuleSetting;
1085
+ /**
1086
+ * Require `const` for variables that are never reassigned after declaration.
1087
+ * Autofixable for single-declaration `let`s.
1088
+ *
1089
+ * @reference https://eslint.org/docs/latest/rules/prefer-const
1090
+ */
1091
+ "prefer-const"?: TtscLintRuleSetting;
1092
+ /**
1093
+ * Reject single-property and single-index variable declarations (`const a =
1094
+ * obj.a`, `const x = arr[0]`) that destructuring would replace verbatim.
1095
+ *
1096
+ * @reference https://eslint.org/docs/latest/rules/prefer-destructuring
1097
+ */
1098
+ "prefer-destructuring"?: TtscLintRuleSetting;
1099
+ /**
1100
+ * Prefer the `**` operator over `Math.pow(base, exp)`.
1101
+ *
1102
+ * @reference https://eslint.org/docs/latest/rules/prefer-exponentiation-operator
1103
+ */
1104
+ "prefer-exponentiation-operator"?: TtscLintRuleSetting;
1105
+ /**
1106
+ * Prefer `for..of` over a traditional `for (let i = 0; i < arr.length; i++)`
1107
+ * loop when the index is never used inside the body.
1108
+ *
1109
+ * @reference https://eslint.org/docs/latest/rules/prefer-for-of
1110
+ */
1111
+ "prefer-for-of"?: TtscLintRuleSetting;
1112
+ /**
1113
+ * Prefer `Object.hasOwn(obj, key)` over
1114
+ * `Object.prototype.hasOwnProperty.call(obj, key)`. The new helper is
1115
+ * shorter, less error-prone, and matches the form linters elsewhere
1116
+ * recommend.
1117
+ *
1118
+ * @reference https://eslint.org/docs/latest/rules/prefer-object-has-own
1119
+ */
1120
+ "prefer-object-has-own"?: TtscLintRuleSetting;
1121
+ /**
1122
+ * Prefer object-spread `{ ...a, ...b }` over `Object.assign({}, a, b)`. Only
1123
+ * fires when the first argument is an empty object literal — mutating
1124
+ * `Object.assign(target, …)` calls are left alone because the spread form
1125
+ * does not preserve their observable side effects.
1126
+ *
1127
+ * @reference https://eslint.org/docs/latest/rules/prefer-object-spread
1128
+ */
1129
+ "prefer-object-spread"?: TtscLintRuleSetting;
1130
+ /**
1131
+ * Reject regex literals with unnamed capturing groups `(...)` — prefer named
1132
+ * groups `(?<name>...)`.
1133
+ *
1134
+ * @reference https://eslint.org/docs/latest/rules/prefer-named-capture-group
1135
+ */
1136
+ "prefer-named-capture-group"?: TtscLintRuleSetting;
1137
+ /**
1138
+ * Prefer ES2015+ numeric literal forms (`0b…`, `0o…`, `0x…`) over
1139
+ * `parseInt(string, 2 | 8 | 16)`. The literal form is shorter, type- safe at
1140
+ * lint time, and not subject to runtime radix mismatches.
1141
+ *
1142
+ * @reference https://eslint.org/docs/latest/rules/prefer-numeric-literals
1143
+ */
1144
+ "prefer-numeric-literals"?: TtscLintRuleSetting;
1145
+ /**
1146
+ * Reject reading from `arguments` in a non-arrow function body — prefer the
1147
+ * ES2015 rest-parameter form `(...args)`, which declares the variadic
1148
+ * contract on the signature and yields a real array.
1149
+ *
1150
+ * @reference https://eslint.org/docs/latest/rules/prefer-rest-params
1151
+ */
1152
+ "prefer-rest-params"?: TtscLintRuleSetting;
1153
+ /**
1154
+ * Prefer spread arguments `f(...args)` over `f.apply(null, args)`.
1155
+ *
1156
+ * Only flags `apply` calls whose `this` argument is provably the same
1157
+ * receiver (or `null` / `undefined`); calls that genuinely rebind `this` are
1158
+ * left alone.
1159
+ *
1160
+ * @reference https://eslint.org/docs/latest/rules/prefer-spread
1161
+ */
1162
+ "prefer-spread"?: TtscLintRuleSetting;
1163
+ /**
1164
+ * Prefer template literals over string concatenation when any operand is
1165
+ * non-literal.
1166
+ *
1167
+ * @reference https://eslint.org/docs/latest/rules/prefer-template
1168
+ */
1169
+ "prefer-template"?: TtscLintRuleSetting;
1170
+ /**
1171
+ * Require an explicit radix argument for `parseInt(str, radix)`.
1172
+ *
1173
+ * Without it, `"0123"` parses as decimal or octal depending on the engine.
1174
+ *
1175
+ * @reference https://eslint.org/docs/latest/rules/radix
1176
+ */
1177
+ radix?: TtscLintRuleSetting;
1178
+ /**
1179
+ * Require generator functions to contain at least one `yield`. A `yield`-less
1180
+ * generator is almost always a typo.
1181
+ *
1182
+ * @reference https://eslint.org/docs/latest/rules/require-yield
1183
+ */
1184
+ "require-yield"?: TtscLintRuleSetting;
1185
+ /**
1186
+ * Reject import specifiers within a single `import` declaration that aren't
1187
+ * alphabetically sorted.
1188
+ *
1189
+ * @reference https://eslint.org/docs/latest/rules/sort-imports
1190
+ */
1191
+ "sort-imports"?: TtscLintRuleSetting;
1192
+ /**
1193
+ * Reject object-literal property keys that aren't alphabetically sorted.
1194
+ *
1195
+ * @reference https://eslint.org/docs/latest/rules/sort-keys
1196
+ */
1197
+ "sort-keys"?: TtscLintRuleSetting;
1198
+ /**
1199
+ * Require `Number.isNaN` / `isNaN` for `NaN` checks; restrict `typeof`
1200
+ * comparisons to the documented strings.
1201
+ *
1202
+ * @reference https://eslint.org/docs/latest/rules/use-isnan
1203
+ */
1204
+ "use-isnan"?: TtscLintRuleSetting;
1205
+ /**
1206
+ * Restrict the right-hand operand of `typeof` to the documented strings
1207
+ * (`"number"`, `"object"`, ...) so `typeof x === "undefiend"` typos are
1208
+ * caught.
1209
+ *
1210
+ * @reference https://eslint.org/docs/latest/rules/valid-typeof
1211
+ */
1212
+ "valid-typeof"?: TtscLintRuleSetting;
1213
+ /**
1214
+ * Require `var` declarations to be hoisted to the top of their scope by hand,
1215
+ * mirroring how the engine treats them.
1216
+ *
1217
+ * Has no effect when `no-var` forbids `var` altogether.
1218
+ *
1219
+ * @reference https://eslint.org/docs/latest/rules/vars-on-top
1220
+ */
1221
+ "vars-on-top"?: TtscLintRuleSetting;
1222
+ /**
1223
+ * Reject Yoda-style comparisons (`if (42 === x)`); use `if (x === 42)` so the
1224
+ * variable comes first.
1225
+ *
1226
+ * @reference https://eslint.org/docs/latest/rules/yoda
1227
+ */
1228
+ yoda?: TtscLintRuleSetting;
1229
+ }