@ttsc/lint 0.30.4 → 0.31.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.
- package/README.md +753 -741
- package/go.mod +7 -5
- package/internal/rulecode/rule_code_allocator_is_order_independent_and_append_only_test.go +119 -0
- package/internal/rulecode/rule_code_allocator_rejects_invalid_or_exhausted_ledgers_test.go +60 -0
- package/internal/rulecode/rulecode.go +18 -0
- package/lib/createTtscPlugin.d.ts +84 -0
- package/lib/createTtscPlugin.js +2704 -0
- package/lib/createTtscPlugin.js.map +1 -0
- package/lib/index.d.ts +1 -74
- package/lib/index.js +4 -2644
- package/lib/index.js.map +1 -1
- package/lib/internal/configEvaluatorFailure.d.ts +17 -9
- package/lib/internal/configEvaluatorFailure.js +17 -9
- package/lib/internal/configEvaluatorFailure.js.map +1 -1
- package/lib/internal/lintTrace.d.ts +18 -0
- package/lib/internal/lintTrace.js +99 -0
- package/lib/internal/lintTrace.js.map +1 -0
- package/lib/internal/normalizeContributors.d.ts +25 -0
- package/lib/internal/normalizeContributors.js +65 -0
- package/lib/internal/normalizeContributors.js.map +1 -0
- package/lib/structures/ITtscLintConfig.d.ts +25 -8
- package/lib/structures/ITtscLintPlugin.d.ts +13 -8
- package/lib/structures/ITtscLintPluginConfig.d.ts +18 -7
- package/lib/structures/ITtscLintPluginMeta.d.ts +10 -7
- package/lib/structures/TtscLintRuleSetting.d.ts +18 -13
- package/lib/structures/TtscLintSeverity.d.ts +5 -0
- package/lib/structures/format/ITtscLintFormat.d.ts +14 -8
- package/lib/structures/format/ITtscLintFormatJsDoc.d.ts +8 -1
- package/lib/structures/format/ITtscLintFormatSortImports.d.ts +14 -8
- package/lib/structures/rules/ITtscLintBoundariesRuleOptions.d.ts +133 -25
- package/lib/structures/rules/ITtscLintBoundariesRuleOptions.js +3 -3
- package/lib/structures/rules/ITtscLintBoundariesRules.d.ts +10 -5
- package/lib/structures/rules/ITtscLintContributorRules.d.ts +20 -13
- package/lib/structures/rules/ITtscLintCoreRuleOptions.d.ts +212 -24
- package/lib/structures/rules/ITtscLintCoreRules.d.ts +92 -72
- package/lib/structures/rules/ITtscLintCypressRuleOptions.d.ts +8 -1
- package/lib/structures/rules/ITtscLintCypressRules.d.ts +24 -21
- package/lib/structures/rules/ITtscLintFunctionalRuleOptions.d.ts +140 -24
- package/lib/structures/rules/ITtscLintFunctionalRules.d.ts +20 -12
- package/lib/structures/rules/ITtscLintJestRules.d.ts +22 -16
- package/lib/structures/rules/ITtscLintJsdocRules.d.ts +5 -0
- package/lib/structures/rules/ITtscLintJsxA11yRules.d.ts +24 -21
- package/lib/structures/rules/ITtscLintNextjsRules.d.ts +40 -42
- package/lib/structures/rules/ITtscLintPlaywrightRules.d.ts +24 -14
- package/lib/structures/rules/ITtscLintPromiseRules.d.ts +23 -14
- package/lib/structures/rules/ITtscLintReactPerfRuleOptions.d.ts +8 -1
- package/lib/structures/rules/ITtscLintReactPerfRules.d.ts +18 -15
- package/lib/structures/rules/ITtscLintReactRuleOptions.d.ts +14 -4
- package/lib/structures/rules/ITtscLintReactRules.d.ts +33 -27
- package/lib/structures/rules/ITtscLintRegexpRules.d.ts +18 -4
- package/lib/structures/rules/ITtscLintRuleOptionsMap.d.ts +88 -15
- package/lib/structures/rules/ITtscLintRules.d.ts +13 -9
- package/lib/structures/rules/ITtscLintSecurityRules.d.ts +33 -23
- package/lib/structures/rules/ITtscLintSolidRules.d.ts +57 -47
- package/lib/structures/rules/ITtscLintStorybookRuleOptions.d.ts +10 -2
- package/lib/structures/rules/ITtscLintStorybookRules.d.ts +52 -62
- package/lib/structures/rules/ITtscLintTanstackQueryRules.d.ts +34 -30
- package/lib/structures/rules/ITtscLintTestingLibraryRuleOptions.d.ts +12 -3
- package/lib/structures/rules/ITtscLintTestingLibraryRules.d.ts +20 -15
- package/lib/structures/rules/ITtscLintTypeScriptRuleOptions.d.ts +105 -16
- package/lib/structures/rules/ITtscLintTypeScriptRules.d.ts +62 -51
- package/lib/structures/rules/ITtscLintUnicornRuleOptions.d.ts +234 -46
- package/lib/structures/rules/ITtscLintUnicornRules.d.ts +97 -44
- package/lib/structures/rules/ITtscLintVitestRules.d.ts +19 -11
- package/lib/structures/rules/TtscLintContributorOverlay.d.ts +34 -0
- package/lib/structures/rules/TtscLintContributorOverlay.js +3 -0
- package/lib/structures/rules/TtscLintContributorOverlay.js.map +1 -0
- package/lib/structures/rules/index.d.ts +1 -0
- package/lib/structures/rules/index.js +1 -0
- package/lib/structures/rules/index.js.map +1 -1
- package/linthost/all_rule_names_returns_sorted_caller_owned_enumeration_test.go +72 -0
- package/linthost/as_bool_rejects_non_boolean_value_test.go +39 -0
- package/linthost/as_int_accepts_all_integer_types_and_rejects_fractional_test.go +77 -0
- package/linthost/as_string_rejects_non_string_value_test.go +35 -0
- package/linthost/as_string_slice_rejects_non_array_and_non_string_elements_test.go +45 -0
- package/linthost/ast_helpers.go +28 -89
- package/linthost/ast_helpers_destructuring_target_rejects_reads_inside_member_and_call_test.go +61 -0
- package/linthost/ast_selector_expression_class_excludes_type_literals_test.go +32 -0
- package/linthost/ast_selector_matcher.go +5 -0
- package/linthost/ast_selector_parser.go +5 -0
- package/linthost/astutil_find_keyword_is_identifier_aware_test.go +89 -0
- package/linthost/astutil_keyword_start_locates_leading_keyword_test.go +79 -0
- package/linthost/astutil_node_text_strips_leading_trivia_test.go +48 -0
- package/linthost/astutil_token_range_strips_leading_trivia_test.go +58 -0
- package/linthost/async_query_event_and_util_promises_test.go +55 -0
- package/linthost/await_thenable_await_expression_offers_exact_suggestion_test.go +40 -0
- package/linthost/await_thenable_await_union_with_promise_allows_test.go +42 -0
- package/linthost/await_thenable_await_using_async_disposable_allows_test.go +65 -0
- package/linthost/await_thenable_await_using_async_method_under_dispose_symbol_reports_test.go +57 -0
- package/linthost/await_thenable_await_using_helpers_test.go +44 -0
- package/linthost/await_thenable_await_using_multi_declarator_reports_only_sync_resource_test.go +65 -0
- package/linthost/await_thenable_await_using_protocol_abstractions_allows_test.go +67 -0
- package/linthost/await_thenable_await_using_protocol_abstractions_reports_test.go +75 -0
- package/linthost/await_thenable_await_using_sync_disposable_reports_test.go +62 -0
- package/linthost/await_thenable_await_using_sync_only_union_reports_test.go +64 -0
- package/linthost/await_thenable_await_using_union_with_async_disposable_allows_test.go +56 -0
- package/linthost/await_thenable_awaitability_type_parameter_boundaries_test.go +51 -0
- package/linthost/await_thenable_for_await_of_async_iterable_allows_test.go +63 -0
- package/linthost/await_thenable_for_await_of_protocol_abstractions_allows_test.go +67 -0
- package/linthost/await_thenable_for_await_of_protocol_abstractions_reports_test.go +75 -0
- package/linthost/await_thenable_for_await_of_sync_iterable_reports_test.go +65 -0
- package/linthost/await_thenable_for_await_of_sync_only_union_reports_test.go +55 -0
- package/linthost/await_thenable_preserves_migrated_all_family_contexts_test.go +20 -0
- package/linthost/await_thenable_promise_aggregator_awaitable_inputs_allow_test.go +50 -0
- package/linthost/await_thenable_promise_aggregator_container_shapes_report_test.go +53 -0
- package/linthost/await_thenable_promise_aggregator_generic_constraint_reports_test.go +45 -0
- package/linthost/await_thenable_promise_aggregator_iteration_yields_allow_test.go +50 -0
- package/linthost/await_thenable_promise_aggregator_iteration_yields_report_test.go +64 -0
- package/linthost/await_thenable_promise_aggregator_literal_members_report_test.go +56 -0
- package/linthost/await_thenable_promise_aggregator_native_identity_test.go +60 -0
- package/linthost/await_thenable_promise_aggregator_native_methods_report_test.go +50 -0
- package/linthost/await_thenable_promise_aggregator_noniterable_boundaries_allow_test.go +39 -0
- package/linthost/await_thenable_protocol_members_must_be_callable_test.go +70 -0
- package/linthost/await_thenable_structural_thenable_signature_boundary_test.go +53 -0
- package/linthost/ban_ts_comment_block_comment_ignores_directive_before_last_line_test.go +32 -0
- package/linthost/ban_ts_comment_block_comment_reports_directive_on_last_line_test.go +57 -0
- package/linthost/ban_ts_comment_block_comment_splits_last_line_on_all_line_terminators_test.go +55 -0
- package/linthost/ban_ts_comment_default_allows_described_expect_error_test.go +27 -0
- package/linthost/ban_ts_comment_default_allows_ts_check_test.go +26 -0
- package/linthost/ban_ts_comment_default_allows_ts_nocheck_after_first_statement_test.go +32 -0
- package/linthost/ban_ts_comment_default_does_not_fix_ts_ignore_test.go +25 -0
- package/linthost/ban_ts_comment_default_reports_ignore_with_upgrade_message_test.go +56 -0
- package/linthost/ban_ts_comment_default_reports_indented_ignore_with_position_test.go +39 -0
- package/linthost/ban_ts_comment_default_reports_ts_nocheck_before_code_test.go +44 -0
- package/linthost/ban_ts_comment_default_reports_ts_nocheck_without_statements_test.go +34 -0
- package/linthost/ban_ts_comment_default_requires_description_for_bare_expect_error_test.go +51 -0
- package/linthost/ban_ts_comment_description_length_counts_grapheme_clusters_test.go +58 -0
- package/linthost/ban_ts_comment_description_length_follows_unicode_16_graphemes_test.go +91 -0
- package/linthost/ban_ts_comment_follows_regex_in_nested_template_test.go +39 -0
- package/linthost/ban_ts_comment_ignores_directive_text_inside_strings_and_templates_test.go +48 -0
- package/linthost/ban_ts_comment_ignores_prose_and_near_miss_comments_test.go +34 -0
- package/linthost/ban_ts_comment_option_description_format_accepts_matching_description_test.go +36 -0
- package/linthost/ban_ts_comment_option_description_format_checks_length_first_test.go +49 -0
- package/linthost/ban_ts_comment_option_description_format_reports_mismatch_test.go +46 -0
- package/linthost/ban_ts_comment_option_empty_object_directive_allows_directive_test.go +26 -0
- package/linthost/ban_ts_comment_option_expect_error_false_allows_directive_test.go +28 -0
- package/linthost/ban_ts_comment_option_expect_error_true_reports_despite_description_test.go +41 -0
- package/linthost/ban_ts_comment_option_invalid_description_format_keeps_length_gate_test.go +52 -0
- package/linthost/ban_ts_comment_option_minimum_description_length_boundary_test.go +67 -0
- package/linthost/ban_ts_comment_option_ts_check_true_reports_pragma_anywhere_test.go +50 -0
- package/linthost/ban_ts_comment_option_ts_ignore_allow_with_description_test.go +57 -0
- package/linthost/ban_ts_comment_option_ts_nocheck_allow_with_description_test.go +57 -0
- package/linthost/ban_ts_comment_option_ts_nocheck_false_allows_directive_test.go +27 -0
- package/linthost/ban_ts_comment_option_unrecognized_value_keeps_default_policy_test.go +53 -0
- package/linthost/ban_ts_comment_pragma_ignores_block_comments_test.go +33 -0
- package/linthost/ban_ts_comment_pragma_requires_two_or_three_slashes_test.go +49 -0
- package/linthost/ban_ts_comment_pragma_wins_over_error_suppression_match_test.go +29 -0
- package/linthost/ban_ts_comment_preserves_migrated_defaults_and_options_test.go +29 -0
- package/linthost/ban_ts_comment_respects_inline_disable_next_line_test.go +28 -0
- package/linthost/ban_ts_comment_suggestion_compiler_error_boundary_test.go +56 -0
- package/linthost/ban_ts_comment_suggestion_rewrites_block_comment_ignore_test.go +40 -0
- package/linthost/ban_ts_comment_suggestion_rewrites_many_slash_line_comment_test.go +41 -0
- package/linthost/base_chain_walk_crosses_generic_boundary_test.go +165 -0
- package/linthost/behavioral_witness_audit_accepts_production_prerequisite_kinds_test.go +57 -0
- package/linthost/behavioral_witness_audit_publishes_one_deterministic_route_per_rule_test.go +45 -0
- package/linthost/behavioral_witness_audit_rejects_inert_public_rule_test.go +46 -0
- package/linthost/behavioral_witness_audit_rejects_invalid_non_canonical_candidate_test.go +49 -0
- package/linthost/behavioral_witness_coverage_test.go +379 -0
- package/linthost/behavioral_witness_kind_follows_rule_checker_requirement_test.go +69 -0
- package/linthost/binding_diagnostic_sites_helpers_test.go +31 -0
- package/linthost/blank_line_between_statements_returns_false_for_out_of_range_test.go +51 -0
- package/linthost/block_has_non_statement_comment_returns_false_for_out_of_range_test.go +56 -0
- package/linthost/block_has_non_statement_comment_skips_nil_stmts_test.go +42 -0
- package/linthost/boundaries_dependencies_alias_resolution_test.go +60 -0
- package/linthost/boundaries_dependencies_bare_core_builtin_test.go +36 -0
- package/linthost/boundaries_dependencies_command_test.go +67 -0
- package/linthost/boundaries_dependencies_declaration_file_test.go +50 -0
- package/linthost/boundaries_dependencies_default_test.go +36 -0
- package/linthost/boundaries_dependencies_from_to_test.go +66 -0
- package/linthost/boundaries_dependencies_import_kind_test.go +46 -0
- package/linthost/boundaries_dependencies_import_type_kinds_test.go +56 -0
- package/linthost/boundaries_dependencies_legacy_to_direction_test.go +43 -0
- package/linthost/boundaries_dependencies_local_gates_test.go +43 -0
- package/linthost/boundaries_dependencies_messages_test.go +58 -0
- package/linthost/boundaries_dependencies_options_test.go +66 -0
- package/linthost/boundaries_dependencies_origins_test.go +38 -0
- package/linthost/boundaries_dependencies_path_separators_test.go +36 -0
- package/linthost/boundaries_dependencies_policy_order_test.go +41 -0
- package/linthost/boundaries_dependencies_syntax_test.go +86 -0
- package/linthost/boundaries_dependencies_test.go +38 -0
- package/linthost/boundaries_dependencies_visibility_selectors_test.go +52 -0
- package/linthost/boundaries_element_types_deny_only_names_nothing_test.go +36 -0
- package/linthost/boundaries_element_types_ignores_dynamic_syntax_test.go +44 -0
- package/linthost/boundaries_element_types_names_the_allowed_set_test.go +40 -0
- package/linthost/boundaries_element_types_rejects_disallowed_import_test.go +43 -0
- package/linthost/boundaries_entry_point_rejects_non_entry_import_test.go +43 -0
- package/linthost/boundaries_external_deny_only_names_nothing_test.go +25 -0
- package/linthost/boundaries_external_names_the_allowed_set_test.go +30 -0
- package/linthost/boundaries_external_rejects_disallowed_package_test.go +34 -0
- package/linthost/boundaries_helpers_test.go +162 -0
- package/linthost/boundaries_no_private_rejects_cross_element_private_import_test.go +39 -0
- package/linthost/boundaries_no_unknown_rejects_unknown_import_target_test.go +43 -0
- package/linthost/check_observations.go +236 -0
- package/linthost/check_observations_retains_failed_program_and_raw_inputs_test.go +266 -0
- package/linthost/check_serve.go +23 -3
- package/linthost/check_serve_reuses_program_and_matches_cold_cycles_test.go +168 -0
- package/linthost/check_tag_names_publishes_canonical_hints_test.go +62 -0
- package/linthost/check_tag_names_test.go +30 -0
- package/linthost/check_values_test.go +31 -0
- package/linthost/command_build_emits_project_output_test.go +55 -0
- package/linthost/command_build_rejects_conflicting_emit_flags_test.go +32 -0
- package/linthost/command_check_applies_a_forwarded_null_reset_test.go +62 -0
- package/linthost/command_check_applies_forwarded_tsgo_flag_test.go +61 -0
- package/linthost/command_check_corpus_clean_project_exits_zero_test.go +41 -0
- package/linthost/command_check_corpus_ignores_future_optional_flags_test.go +34 -0
- package/linthost/command_check_corpus_reports_unknown_rule_names_test.go +25 -0
- package/linthost/command_check_honors_no_restricted_syntax_options_test.go +59 -0
- package/linthost/command_check_no_param_reassign_honors_props_config_test.go +46 -0
- package/linthost/command_check_no_restricted_imports_uses_real_config_options_test.go +53 -0
- package/linthost/command_check_preserves_compiler_argument_cwd_test.go +78 -0
- package/linthost/command_check_preserves_severity_exit_contract_test.go +54 -0
- package/linthost/command_check_rejects_invalid_no_param_reassign_options_before_linting_test.go +85 -0
- package/linthost/command_check_rejects_invalid_no_restricted_imports_options_before_linting_test.go +52 -0
- package/linthost/command_check_rejects_invalid_no_restricted_syntax_selector_test.go +41 -0
- package/linthost/command_check_relates_files_to_the_project_directory_test.go +40 -0
- package/linthost/command_check_reports_imported_sibling_workspace_source_test.go +45 -0
- package/linthost/command_check_reports_lint_diagnostic_test.go +44 -0
- package/linthost/command_check_reports_the_malformed_brace_it_used_to_bless_test.go +31 -0
- package/linthost/command_check_scopes_extends_rule_options_per_file_test.go +70 -0
- package/linthost/command_check_uses_parser_context_for_comment_consumers_test.go +61 -0
- package/linthost/command_check_warns_unknown_rules_test.go +41 -0
- package/linthost/command_fix_applies_both_lint_and_format_rule_edits_test.go +51 -0
- package/linthost/command_fix_applies_native_autofixes_test.go +48 -0
- package/linthost/command_fix_leaves_suggestion_only_rules_unchanged_test.go +46 -0
- package/linthost/command_fix_owns_its_source_reached_through_a_link_test.go +63 -0
- package/linthost/command_fix_rejects_emit_flag_test.go +39 -0
- package/linthost/command_fix_reports_but_never_rewrites_imported_sibling_source_test.go +65 -0
- package/linthost/command_fix_skips_default_formatting_that_format_applies_test.go +87 -0
- package/linthost/command_fix_unicorn_prevent_abbreviations_keeps_cross_file_merges_diagnostic_only_test.go +44 -0
- package/linthost/command_fix_unicorn_prevent_abbreviations_reparses_and_is_idempotent_test.go +37 -0
- package/linthost/command_fix_unicorn_switch_case_break_position_converges_and_is_idempotent_test.go +58 -0
- package/linthost/command_fix_unicorn_template_indent_converges_and_is_idempotent_test.go +43 -0
- package/linthost/command_format_applies_format_block_reflow_test.go +50 -0
- package/linthost/command_format_applies_format_rule_edits_test.go +54 -0
- package/linthost/command_format_arg_hugging_test.go +329 -0
- package/linthost/command_format_array_of_arrays_break_test.go +62 -0
- package/linthost/command_format_blank_line_in_list_test.go +69 -0
- package/linthost/command_format_brace_ownership_negative_twins_test.go +94 -0
- package/linthost/command_format_cedes_chained_arrow_body_test.go +50 -0
- package/linthost/command_format_cedes_closing_brace_under_wrapped_head_test.go +54 -0
- package/linthost/command_format_class_heritage_break_test.go +108 -0
- package/linthost/command_format_converges_on_leading_semi_guard_in_callback_test.go +69 -0
- package/linthost/command_format_decorated_declaration_indent_is_idempotent_test.go +57 -0
- package/linthost/command_format_default_import_single_specifier_break_test.go +26 -0
- package/linthost/command_format_display_width_test.go +33 -0
- package/linthost/command_format_expands_expression_nested_block_test.go +86 -0
- package/linthost/command_format_expression_nested_block_honors_crlf_test.go +39 -0
- package/linthost/command_format_fixture_corpus_test.go +179 -0
- package/linthost/command_format_honors_entry_ignores_alongside_rules_test.go +79 -0
- package/linthost/command_format_import_multi_specifier_from_overflow_break_test.go +27 -0
- package/linthost/command_format_indent_idempotency_helper_test.go +57 -0
- package/linthost/command_format_keeps_commented_statement_body_whole_test.go +23 -0
- package/linthost/command_format_keeps_empty_expression_nested_block_test.go +29 -0
- package/linthost/command_format_lays_out_a_statement_body_test.go +90 -0
- package/linthost/command_format_leaves_a_braceless_control_flow_body_alone_test.go +30 -0
- package/linthost/command_format_leaves_imported_sibling_source_untouched_test.go +68 -0
- package/linthost/command_format_leaves_prettier_shaped_mapped_types_untouched_test.go +39 -0
- package/linthost/command_format_leaves_prettier_shaped_type_members_untouched_test.go +41 -0
- package/linthost/command_format_leaves_token_spacing_untouched_test.go +66 -0
- package/linthost/command_format_multiple_callbacks_test.go +150 -0
- package/linthost/command_format_nested_ternary_indent_test.go +67 -0
- package/linthost/command_format_nested_ternary_parens_test.go +74 -0
- package/linthost/command_format_numeric_array_fill_test.go +94 -0
- package/linthost/command_format_preserves_braceless_for_body_indent_test.go +28 -0
- package/linthost/command_format_preserves_braceless_if_try_body_indent_test.go +30 -0
- package/linthost/command_format_preserves_class_typeparam_heritage_inline_test.go +27 -0
- package/linthost/command_format_preserves_comments_in_reflow_test.go +66 -0
- package/linthost/command_format_preserves_crlf_across_reflow_rules_test.go +73 -0
- package/linthost/command_format_preserves_generic_arg_multiline_type_literal_indent_test.go +30 -0
- package/linthost/command_format_preserves_generic_arg_type_literal_indent_test.go +30 -0
- package/linthost/command_format_preserves_interface_qualified_heritage_own_line_test.go +28 -0
- package/linthost/command_format_preserves_intersection_generic_type_literal_indent_test.go +36 -0
- package/linthost/command_format_preserves_multi_type_heritage_empty_body_test.go +28 -0
- package/linthost/command_format_preserves_multiline_type_param_heritage_test.go +30 -0
- package/linthost/command_format_preserves_nested_variable_type_literal_indent_test.go +27 -0
- package/linthost/command_format_preserves_param_type_literal_indent_test.go +62 -0
- package/linthost/command_format_preserves_union_member_type_literal_indent_test.go +28 -0
- package/linthost/command_format_print_width_abstains_inside_binary_expression_test.go +84 -0
- package/linthost/command_format_print_width_cascades_with_semi_and_quotes_test.go +62 -0
- package/linthost/command_format_print_width_converges_on_unbraced_control_flow_test.go +176 -0
- package/linthost/command_format_rejects_emit_flag_test.go +39 -0
- package/linthost/command_format_respects_resolved_entry_applicability_test.go +219 -0
- package/linthost/command_format_restores_class_member_indent_from_flat_test.go +61 -0
- package/linthost/command_format_restores_closing_braces_from_flat_test.go +64 -0
- package/linthost/command_format_restores_decorated_member_indent_from_flat_test.go +61 -0
- package/linthost/command_format_restores_decorated_namespace_class_indent_from_flat_test.go +62 -0
- package/linthost/command_format_restores_decorated_nested_class_indent_from_flat_test.go +64 -0
- package/linthost/command_format_restores_decorated_nested_function_indent_from_flat_test.go +60 -0
- package/linthost/command_format_restores_decorated_nested_interface_indent_from_flat_test.go +59 -0
- package/linthost/command_format_restores_nested_class_indent_from_flat_test.go +60 -0
- package/linthost/command_format_restores_stranded_brace_from_one_line_block_test.go +140 -0
- package/linthost/command_format_restores_switch_indent_from_flat_test.go +63 -0
- package/linthost/command_format_return_typed_arrow_hug_test.go +74 -0
- package/linthost/command_format_round2_coverage_test.go +57 -0
- package/linthost/command_format_round2_hug_fixes_test.go +70 -0
- package/linthost/command_format_round3_force_break_test.go +49 -0
- package/linthost/command_format_settles_a_member_terminator_on_a_padded_line_test.go +34 -0
- package/linthost/command_format_single_specifier_abstain_does_not_block_multi_break_test.go +56 -0
- package/linthost/command_format_single_specifier_stays_inline_test.go +60 -0
- package/linthost/command_format_split_call_collapses_flat_once_isolated_test.go +54 -0
- package/linthost/command_format_spread_comment_test.go +36 -0
- package/linthost/command_format_stranded_brace_honors_crlf_test.go +51 -0
- package/linthost/command_format_structural_rules_are_idempotent_on_their_own_output_test.go +51 -0
- package/linthost/command_format_structural_rules_converge_on_headline_input_test.go +56 -0
- package/linthost/command_format_structural_rules_converge_on_nested_block_test.go +56 -0
- package/linthost/command_format_switch_case_block_indent_test.go +80 -0
- package/linthost/command_format_terminates_a_split_interface_member_test.go +34 -0
- package/linthost/command_format_test_call_hug_test.go +92 -0
- package/linthost/command_format_wrapped_function_body_indent_test.go +43 -0
- package/linthost/command_lint_corpus_semantics_helpers_test.go +29 -0
- package/linthost/command_prints_version_test.go +38 -0
- package/linthost/command_rejects_conflicting_emit_flags_test.go +33 -0
- package/linthost/command_rejects_unknown_test.go +32 -0
- package/linthost/command_requires_argument_test.go +32 -0
- package/linthost/command_transform_normalizes_dot_segments_in_file_path_test.go +49 -0
- package/linthost/command_transform_outputs_requested_file_test.go +43 -0
- package/linthost/command_transform_requires_file_test.go +32 -0
- package/linthost/comment_scan.go +3 -2
- package/linthost/comment_scan_handles_malformed_parser_recovery_test.go +59 -0
- package/linthost/comment_scan_uses_parser_lexical_ranges_across_source_modes_test.go +109 -0
- package/linthost/compile.go +177 -38
- package/linthost/compile_user_pattern_caches_option_regex_test.go +70 -0
- package/linthost/config.go +954 -269
- package/linthost/config_cache_does_not_memoize_failed_evaluation_test.go +63 -0
- package/linthost/config_cache_portable_dependency_policies_test.go +471 -0
- package/linthost/config_cache_preserves_pattern_precedence_test.go +96 -0
- package/linthost/config_cache_reuses_evaluation_until_content_changes_test.go +81 -0
- package/linthost/config_fixture_helpers_test.go +70 -0
- package/linthost/config_format.go +5 -5
- package/linthost/config_glob.go +517 -0
- package/linthost/config_glob_bounds_matching_work_test.go +115 -0
- package/linthost/config_glob_preserves_expansion_semantics_test.go +128 -0
- package/linthost/config_glob_preserves_stored_case_recovery_test.go +64 -0
- package/linthost/config_json.go +85 -0
- package/linthost/config_loader_sources_escape_every_literal_percent_test.go +81 -0
- package/linthost/config_store_option_fold_honors_both_entry_orders_test.go +70 -0
- package/linthost/config_store_resolves_options_with_entry_scope_test.go +95 -0
- package/linthost/config_store_severity_only_override_inherits_matching_options_test.go +53 -0
- package/linthost/config_store_validates_every_scoped_option_variant_test.go +55 -0
- package/linthost/consistent_return_accepts_functions_that_return_on_every_path_through_switch_and_try_test.go +43 -0
- package/linthost/context_report_range_suggestion_separates_opt_in_edits_test.go +76 -0
- package/linthost/contrib_adapter.go +3 -1
- package/linthost/contrib_adapter_to_internal_text_edits_returns_nil_for_empty_input_test.go +34 -0
- package/linthost/contrib_adapter_to_internal_text_edits_round_trips_three_edits_test.go +40 -0
- package/linthost/contributor_ast_only_marker_skips_standalone_checker_test.go +52 -0
- package/linthost/contributor_bootstrap_is_single_owner_for_reusable_main_test.go +425 -0
- package/linthost/contributor_cannot_mutate_later_invocation_options_test.go +55 -0
- package/linthost/contributor_diagnostic_ranges_are_bounded_test.go +139 -0
- package/linthost/contributor_generic_accepts_options_method_keeps_legacy_payload_test.go +81 -0
- package/linthost/contributor_metadata_panic_is_rejected_test.go +84 -0
- package/linthost/contributor_optionless_marker_rejects_payload_test.go +63 -0
- package/linthost/contributor_panics_preserve_other_rules_in_process_test.go +111 -0
- package/linthost/contributor_range_fix_bounds_diagnostic_independently_from_edit_test.go +52 -0
- package/linthost/contributor_report_related_reaches_finding_test.go +101 -0
- package/linthost/contributor_rule_decodes_options_through_public_context_test.go +75 -0
- package/linthost/contributor_rule_opt_out_skips_declaration_files_test.go +56 -0
- package/linthost/contributor_rule_receives_and_reports_configured_severity_test.go +65 -0
- package/linthost/contributor_rules_visit_declaration_files_by_default_test.go +50 -0
- package/linthost/contributor_tagged_rule_marks_findings_test.go +78 -0
- package/linthost/contributor_type_aware_marker_keeps_checker_test.go +50 -0
- package/linthost/contributor_without_tag_marker_leaves_findings_untagged_test.go +61 -0
- package/linthost/cypress_assertion_before_screenshot_allows_immediately_prior_assertion_test.go +33 -0
- package/linthost/cypress_assertion_before_screenshot_allows_same_chain_assertion_test.go +31 -0
- package/linthost/cypress_assertion_before_screenshot_reports_unchecked_screenshot_test.go +34 -0
- package/linthost/cypress_assertion_before_screenshot_reports_unrelated_prior_assertion_test.go +36 -0
- package/linthost/cypress_finding_helpers_test.go +14 -0
- package/linthost/cypress_no_and_reports_chain_starting_and_test.go +35 -0
- package/linthost/cypress_no_assigning_return_values_reports_cy_assignment_test.go +35 -0
- package/linthost/cypress_no_async_before_reports_async_before_each_test.go +37 -0
- package/linthost/cypress_no_async_tests_reports_async_it_test.go +37 -0
- package/linthost/cypress_no_chained_get_reports_second_get_test.go +34 -0
- package/linthost/cypress_no_debug_reports_debug_command_test.go +34 -0
- package/linthost/cypress_no_force_reports_force_true_option_test.go +34 -0
- package/linthost/cypress_no_pause_reports_pause_command_test.go +34 -0
- package/linthost/cypress_no_unnecessary_waiting_reports_numeric_wait_test.go +35 -0
- package/linthost/cypress_no_xpath_reports_xpath_command_test.go +34 -0
- package/linthost/cypress_require_data_selectors_reports_class_selector_test.go +36 -0
- package/linthost/cypress_unsafe_to_chain_command_reports_action_middle_test.go +35 -0
- package/linthost/declaration_file_allowlist_names_are_registered_rules_test.go +50 -0
- package/linthost/default_case_accepts_block_comment_marker_test.go +28 -0
- package/linthost/default_case_accepts_case_insensitive_marker_test.go +28 -0
- package/linthost/default_case_accepts_empty_switch_test.go +24 -0
- package/linthost/default_case_accepts_existing_default_clause_test.go +29 -0
- package/linthost/default_case_accepts_no_default_marker_test.go +28 -0
- package/linthost/default_case_custom_pattern_replaces_default_marker_test.go +30 -0
- package/linthost/default_case_helpers_test.go +58 -0
- package/linthost/default_case_honors_custom_comment_pattern_test.go +28 -0
- package/linthost/default_case_invalid_comment_pattern_falls_back_to_default_test.go +28 -0
- package/linthost/default_case_rejects_marker_with_trailing_text_test.go +28 -0
- package/linthost/default_case_rejects_unrelated_trailing_comment_test.go +28 -0
- package/linthost/default_case_reports_switch_without_default_test.go +27 -0
- package/linthost/default_case_requires_marker_to_be_last_comment_test.go +30 -0
- package/linthost/diagnostic_codes_distinguish_former_collision_across_cli_and_lsp_test.go +97 -0
- package/linthost/dispatch.go +29 -9
- package/linthost/dispatch_array_literal_breaks_when_overflows_test.go +38 -0
- package/linthost/dispatch_array_literal_falls_back_when_element_nil_test.go +53 -0
- package/linthost/dispatch_array_literal_falls_back_when_elements_nil_test.go +48 -0
- package/linthost/dispatch_array_literal_flat_when_fits_test.go +34 -0
- package/linthost/dispatch_array_literal_returns_empty_for_nil_node_test.go +31 -0
- package/linthost/dispatch_arrow_function_block_body_reindents_consistently_test.go +41 -0
- package/linthost/dispatch_arrow_function_returns_covered_for_nil_node_test.go +38 -0
- package/linthost/dispatch_arrow_function_returns_verbatim_for_nil_body_test.go +46 -0
- package/linthost/dispatch_block_collapses_empty_body_to_braces_test.go +40 -0
- package/linthost/dispatch_block_keeps_covered_for_single_line_statements_test.go +42 -0
- package/linthost/dispatch_block_preserves_blank_line_between_statements_test.go +41 -0
- package/linthost/dispatch_block_reports_uncovered_for_comment_only_body_test.go +37 -0
- package/linthost/dispatch_block_reports_uncovered_for_inter_statement_comment_test.go +37 -0
- package/linthost/dispatch_block_returns_covered_for_nil_node_test.go +34 -0
- package/linthost/dispatch_block_returns_verbatim_for_nil_statement_test.go +47 -0
- package/linthost/dispatch_block_returns_verbatim_for_nil_statements_test.go +44 -0
- package/linthost/dispatch_call_breaks_expression_body_arrow_argument_when_overflows_test.go +44 -0
- package/linthost/dispatch_call_breaks_hugged_object_when_flat_form_overflows_test.go +42 -0
- package/linthost/dispatch_call_explodes_when_hugged_callback_header_overflows_test.go +45 -0
- package/linthost/dispatch_call_explodes_when_hugged_object_header_overflows_test.go +43 -0
- package/linthost/dispatch_call_expression_breaks_arguments_when_overflows_test.go +40 -0
- package/linthost/dispatch_call_expression_flat_when_fits_test.go +33 -0
- package/linthost/dispatch_call_hugs_last_callback_argument_test.go +41 -0
- package/linthost/dispatch_call_keeps_hugged_object_flat_when_it_fits_test.go +40 -0
- package/linthost/dispatch_expression_statement_returns_covered_for_nil_node_test.go +36 -0
- package/linthost/dispatch_expression_statement_returns_verbatim_for_dirty_tail_test.go +44 -0
- package/linthost/dispatch_expression_statement_returns_verbatim_for_nil_expression_test.go +44 -0
- package/linthost/dispatch_function_expression_block_body_reindents_test.go +43 -0
- package/linthost/dispatch_function_expression_returns_covered_for_nil_node_test.go +36 -0
- package/linthost/dispatch_function_expression_returns_verbatim_for_nil_body_test.go +44 -0
- package/linthost/dispatch_function_like_returns_verbatim_for_out_of_range_body_test.go +50 -0
- package/linthost/dispatch_function_like_taints_covered_for_multiline_signature_test.go +38 -0
- package/linthost/dispatch_import_declaration_falls_back_for_default_import_test.go +32 -0
- package/linthost/dispatch_import_declaration_falls_back_for_import_attributes_test.go +33 -0
- package/linthost/dispatch_import_declaration_falls_back_for_namespace_import_test.go +37 -0
- package/linthost/dispatch_import_declaration_falls_back_for_side_effect_import_test.go +36 -0
- package/linthost/dispatch_import_declaration_omits_semicolon_when_absent_test.go +37 -0
- package/linthost/dispatch_import_declaration_preserves_type_only_keyword_test.go +34 -0
- package/linthost/dispatch_import_declaration_returns_empty_for_nil_node_test.go +30 -0
- package/linthost/dispatch_import_declaration_threads_clauses_test.go +35 -0
- package/linthost/dispatch_named_exports_breaks_when_overflows_test.go +38 -0
- package/linthost/dispatch_named_exports_falls_back_when_elements_nil_test.go +49 -0
- package/linthost/dispatch_named_exports_falls_back_when_specifier_nil_test.go +51 -0
- package/linthost/dispatch_named_exports_flat_when_fits_test.go +33 -0
- package/linthost/dispatch_named_exports_returns_empty_for_nil_node_test.go +31 -0
- package/linthost/dispatch_named_imports_breaks_when_overflows_test.go +37 -0
- package/linthost/dispatch_named_imports_falls_back_when_elements_nil_test.go +50 -0
- package/linthost/dispatch_named_imports_falls_back_when_specifier_nil_test.go +54 -0
- package/linthost/dispatch_named_imports_flat_when_fits_test.go +34 -0
- package/linthost/dispatch_named_imports_returns_empty_for_nil_node_test.go +30 -0
- package/linthost/dispatch_nested_callback_reflows_at_every_depth_test.go +52 -0
- package/linthost/dispatch_new_expression_breaks_arguments_when_overflows_test.go +39 -0
- package/linthost/dispatch_new_expression_flat_when_fits_test.go +36 -0
- package/linthost/dispatch_object_literal_breaks_when_overflows_test.go +40 -0
- package/linthost/dispatch_object_literal_falls_back_when_properties_nil_test.go +49 -0
- package/linthost/dispatch_object_literal_falls_back_when_property_nil_test.go +52 -0
- package/linthost/dispatch_object_literal_flat_when_fits_test.go +33 -0
- package/linthost/dispatch_object_literal_returns_empty_for_nil_node_test.go +31 -0
- package/linthost/dispatch_parenthesized_expression_reflows_inner_test.go +42 -0
- package/linthost/dispatch_parenthesized_expression_returns_covered_for_nil_node_test.go +35 -0
- package/linthost/dispatch_parenthesized_expression_returns_verbatim_for_nil_inner_test.go +44 -0
- package/linthost/dispatch_reports_uncovered_for_multiline_verbatim_subtree_test.go +42 -0
- package/linthost/dispatch_return_statement_reflows_returned_expression_test.go +45 -0
- package/linthost/dispatch_return_statement_returns_covered_for_nil_node_test.go +36 -0
- package/linthost/dispatch_return_statement_returns_verbatim_for_bare_return_test.go +41 -0
- package/linthost/dispatch_return_statement_returns_verbatim_for_dirty_tail_test.go +43 -0
- package/linthost/dispatch_verbatim_fallback_preserves_unknown_kinds_test.go +41 -0
- package/linthost/display_width.go +29 -5
- package/linthost/display_width_after_last_newline_measures_tail_test.go +33 -0
- package/linthost/display_width_from_column_expands_tabs_to_stops_test.go +49 -0
- package/linthost/display_width_matches_prettier_get_string_width_test.go +124 -0
- package/linthost/display_width_oracle_preconditions_test.go +32 -0
- package/linthost/doc_join_returns_nil_for_empty_parts_test.go +33 -0
- package/linthost/dot_notation_declines_fix_when_comment_in_bracket_span_test.go +40 -0
- package/linthost/dot_notation_fix_bracket_to_dot_for_identifier_key_test.go +27 -0
- package/linthost/dot_notation_fix_keeps_bracket_for_reserved_word_test.go +28 -0
- package/linthost/dot_notation_fix_spaces_decimal_integer_receiver_test.go +76 -0
- package/linthost/dot_notation_offers_reserved_word_collapse_as_suggestion_test.go +36 -0
- package/linthost/dot_notation_offers_withheld_bracket_collapse_as_suggestion_test.go +37 -0
- package/linthost/dot_notation_skips_invalid_identifier_key_test.go +27 -0
- package/linthost/editor_format_overrides_accepts_utf8_bom_test.go +155 -0
- package/linthost/editor_format_overrides_combined_sections_follow_source_order_test.go +58 -0
- package/linthost/editor_format_overrides_drive_idempotent_output_test.go +69 -0
- package/linthost/editor_format_overrides_duplicate_language_section_uses_last_value_test.go +55 -0
- package/linthost/editor_format_overrides_equivalent_exact_sections_use_last_scope_test.go +52 -0
- package/linthost/editor_format_overrides_language_section_wins_test.go +37 -0
- package/linthost/editor_format_overrides_normalize_full_language_selectors_test.go +44 -0
- package/linthost/editor_format_overrides_reads_vscode_settings_test.go +45 -0
- package/linthost/editor_format_overrides_reject_malformed_language_selectors_test.go +36 -0
- package/linthost/editor_format_overrides_single_language_precedence_is_deterministic_test.go +51 -0
- package/linthost/editor_format_overrides_supported_language_ids_test.go +60 -0
- package/linthost/empty_tags_test.go +27 -0
- package/linthost/engine.go +523 -91
- package/linthost/engine_accepts_null_tuple_slot_as_absent_options_test.go +37 -0
- package/linthost/engine_accepts_payload_for_option_rule_test.go +36 -0
- package/linthost/engine_accepts_severity_only_optionless_rule_test.go +28 -0
- package/linthost/engine_align_uses_current_column_test.go +27 -0
- package/linthost/engine_block_disable_after_code_does_not_suppress_earlier_same_line_test.go +47 -0
- package/linthost/engine_conditional_group_empty_renders_nothing_test.go +24 -0
- package/linthost/engine_conditional_group_falls_back_to_last_option_test.go +30 -0
- package/linthost/engine_conditional_group_picks_first_fitting_option_test.go +31 -0
- package/linthost/engine_crlf_terminator_emits_carriage_returns_test.go +24 -0
- package/linthost/engine_dedupes_duplicate_kinds_in_visits_test.go +64 -0
- package/linthost/engine_detects_files_without_enabled_rules_test.go +40 -0
- package/linthost/engine_directive_accepts_typescript_namespace_prefix_test.go +48 -0
- package/linthost/engine_directive_after_template_expression_test.go +37 -0
- package/linthost/engine_directive_records_unknown_rule_in_unknown_channel_test.go +65 -0
- package/linthost/engine_directive_rejects_legacy_typescript_eslint_prefix_test.go +50 -0
- package/linthost/engine_directive_without_rules_disables_all_rules_on_target_line_test.go +57 -0
- package/linthost/engine_disable_line_multiline_block_comment_targets_end_line_test.go +50 -0
- package/linthost/engine_dispatches_only_to_interested_rules_test.go +81 -0
- package/linthost/engine_end_of_line_defaults_to_lf_when_empty_test.go +23 -0
- package/linthost/engine_fits_first_line_counts_flat_group_lines_test.go +25 -0
- package/linthost/engine_fits_first_line_stops_at_first_break_test.go +85 -0
- package/linthost/engine_fits_measures_conditional_group_as_first_option_test.go +25 -0
- package/linthost/engine_fits_rejects_forced_break_group_test.go +22 -0
- package/linthost/engine_fits_returns_false_when_remaining_negative_test.go +21 -0
- package/linthost/engine_fits_treats_indent_align_as_transparent_in_flat_test.go +34 -0
- package/linthost/engine_flatten_resolves_breaks_to_flat_form_test.go +57 -0
- package/linthost/engine_group_break_flag_forces_broken_layout_test.go +29 -0
- package/linthost/engine_group_breaks_when_overflows_width_test.go +30 -0
- package/linthost/engine_group_collapses_when_fits_width_test.go +28 -0
- package/linthost/engine_hardline_forces_break_regardless_of_width_test.go +23 -0
- package/linthost/engine_ifbreak_picks_broken_branch_when_group_breaks_test.go +32 -0
- package/linthost/engine_ifbreak_picks_flat_branch_when_group_fits_test.go +28 -0
- package/linthost/engine_ignores_directive_text_inside_strings_test.go +45 -0
- package/linthost/engine_ignores_jsx_text_inline_disable_markers_test.go +54 -0
- package/linthost/engine_indent_compounds_inside_group_test.go +20 -0
- package/linthost/engine_line_suffix_attaches_to_next_break_test.go +33 -0
- package/linthost/engine_line_suffix_drain_preserves_embedded_newline_test.go +23 -0
- package/linthost/engine_line_suffix_drains_inline_when_no_break_follows_test.go +28 -0
- package/linthost/engine_line_suffix_flush_preserves_embedded_newline_test.go +28 -0
- package/linthost/engine_literalline_emits_newline_at_column_zero_test.go +24 -0
- package/linthost/engine_preserves_migrated_disable_directive_population_test.go +46 -0
- package/linthost/engine_print_width_defaults_when_zero_test.go +39 -0
- package/linthost/engine_quarantines_panicking_rule_per_file_test.go +110 -0
- package/linthost/engine_records_unknown_rules_test.go +42 -0
- package/linthost/engine_recovers_from_rule_panic_test.go +68 -0
- package/linthost/engine_rejects_legacy_typescript_eslint_prefix_test.go +39 -0
- package/linthost/engine_rejects_optionless_payload_while_rule_is_off_test.go +37 -0
- package/linthost/engine_rejects_payload_shapes_for_optionless_rule_test.go +46 -0
- package/linthost/engine_requires_type_checker_for_contributor_rule_test.go +43 -0
- package/linthost/engine_requires_type_checker_for_prefer_const_test.go +33 -0
- package/linthost/engine_requires_type_checker_for_type_aware_rule_test.go +35 -0
- package/linthost/engine_respects_block_disable_enable_test.go +48 -0
- package/linthost/engine_respects_eslint_disable_line_test.go +45 -0
- package/linthost/engine_respects_eslint_disable_next_line_test.go +48 -0
- package/linthost/engine_respects_lint_disable_next_line_alias_test.go +46 -0
- package/linthost/engine_run_parallel_matches_serial_finding_set_test.go +86 -0
- package/linthost/engine_runs_format_rules_on_declaration_files_test.go +37 -0
- package/linthost/engine_runs_opt_in_rules_on_declaration_files_test.go +39 -0
- package/linthost/engine_skips_off_rules_test.go +41 -0
- package/linthost/engine_skips_type_checker_for_ast_only_rule_test.go +35 -0
- package/linthost/engine_skips_value_rules_on_declaration_files_test.go +40 -0
- package/linthost/engine_softline_emits_newline_when_group_breaks_test.go +23 -0
- package/linthost/engine_softline_renders_empty_when_flat_test.go +22 -0
- package/linthost/engine_starting_indent_offsets_break_decision_test.go +29 -0
- package/linthost/engine_tab_width_defaults_when_zero_test.go +24 -0
- package/linthost/engine_text_renders_verbatim_test.go +29 -0
- package/linthost/engine_text_with_embedded_newline_forces_break_test.go +24 -0
- package/linthost/engine_use_tabs_emits_remainder_spaces_test.go +27 -0
- package/linthost/engine_use_tabs_emits_tab_characters_test.go +24 -0
- package/linthost/eqeqeq_offers_unsafe_operator_rewrite_as_suggestion_test.go +45 -0
- package/linthost/expect_matchers_without_argument_do_not_panic_test.go +50 -0
- package/linthost/file_path_from_uri_preserves_literal_percent_escapes_test.go +36 -0
- package/linthost/file_url_matches_node_shape_test.go +64 -0
- package/linthost/files_selector_scopes_rules_away_from_an_imported_sibling_test.go +70 -0
- package/linthost/filter_format_findings_keeps_only_format_rule_findings_test.go +56 -0
- package/linthost/filter_known_flags_preserves_known_values_and_skips_unknowns_test.go +49 -0
- package/linthost/filter_known_flags_resolves_names_case_insensitively_test.go +43 -0
- package/linthost/filter_lint_findings_drops_format_rule_findings_test.go +43 -0
- package/linthost/find_lint_config_file_discovers_nearest_ancestor_test.go +37 -0
- package/linthost/find_lint_config_file_discovers_plain_lint_config_test.go +37 -0
- package/linthost/find_lint_config_file_falls_back_to_cwd_for_out_of_tree_tsconfig_test.go +43 -0
- package/linthost/find_lint_config_file_prefers_nearest_directory_test.go +38 -0
- package/linthost/find_lint_config_file_rejects_same_directory_conflicts_test.go +38 -0
- package/linthost/find_lint_config_file_uses_tsconfig_directory_when_outside_cwd_test.go +45 -0
- package/linthost/find_lint_entry_accepts_sorted_check_plugin_payload_test.go +53 -0
- package/linthost/fix.go +37 -11
- package/linthost/fix_eqeqeq_replaces_same_type_literal_operator_test.go +26 -0
- package/linthost/fix_eqeqeq_replaces_typeof_operator_test.go +26 -0
- package/linthost/fix_eqeqeq_requires_both_operands_to_share_a_primitive_kind_test.go +29 -0
- package/linthost/fix_eqeqeq_skips_unsafe_identifier_comparison_test.go +25 -0
- package/linthost/fix_interleaved_import_type_and_bracket_spacing_stays_valid_test.go +113 -0
- package/linthost/fix_no_extra_bind_removes_safe_member_and_call_syntax_test.go +45 -0
- package/linthost/fix_no_extra_bind_skips_effectful_or_commented_removals_test.go +55 -0
- package/linthost/fix_no_extra_non_null_assertion_drops_trailing_bang_test.go +39 -0
- package/linthost/fix_no_import_type_side_effects_hoists_type_keyword_test.go +29 -0
- package/linthost/fix_no_import_type_side_effects_preserves_leading_comment_test.go +30 -0
- package/linthost/fix_no_import_type_side_effects_skips_comment_import_keyword_test.go +31 -0
- package/linthost/fix_no_import_type_side_effects_skips_mixed_import_test.go +28 -0
- package/linthost/fix_no_unnecessary_type_constraint_disambiguates_cts_generic_arrow_test.go +20 -0
- package/linthost/fix_no_unnecessary_type_constraint_disambiguates_mts_generic_arrow_test.go +20 -0
- package/linthost/fix_no_unnecessary_type_constraint_disambiguates_tsx_generic_arrow_test.go +20 -0
- package/linthost/fix_no_unnecessary_type_constraint_drops_extends_clause_test.go +28 -0
- package/linthost/fix_no_unnecessary_type_constraint_keeps_default_unambiguous_test.go +20 -0
- package/linthost/fix_no_unnecessary_type_constraint_keeps_multiple_parameters_unambiguous_test.go +20 -0
- package/linthost/fix_no_unnecessary_type_constraint_keeps_non_arrow_declarations_minimal_test.go +28 -0
- package/linthost/fix_no_unnecessary_type_constraint_keeps_ts_generic_arrow_minimal_test.go +20 -0
- package/linthost/fix_no_unnecessary_type_constraint_preserves_comma_comments_test.go +22 -0
- package/linthost/fix_no_unnecessary_type_constraint_preserves_existing_trailing_comma_test.go +20 -0
- package/linthost/fix_no_useless_escape_drops_backslash_test.go +28 -0
- package/linthost/fix_no_useless_escape_drops_nondigit_neighbors_of_octal_exemption_test.go +31 -0
- package/linthost/fix_no_useless_escape_skips_backslash_digit_escapes_test.go +48 -0
- package/linthost/fix_no_useless_escape_skips_tagged_template_test.go +29 -0
- package/linthost/fix_no_useless_escape_skips_template_substitution_escape_test.go +45 -0
- package/linthost/fix_no_useless_rename_drops_rename_tail_test.go +39 -0
- package/linthost/fix_no_useless_rename_skips_string_literal_alias_test.go +34 -0
- package/linthost/fix_no_var_fixes_despite_label_before_test.go +30 -0
- package/linthost/fix_no_var_fixes_despite_member_name_before_test.go +29 -0
- package/linthost/fix_no_var_fixes_despite_object_key_before_test.go +30 -0
- package/linthost/fix_no_var_fixes_despite_type_reference_before_test.go +32 -0
- package/linthost/fix_no_var_keeps_bindings_observable_by_direct_eval_test.go +41 -0
- package/linthost/fix_no_var_preserves_script_global_object_bindings_test.go +30 -0
- package/linthost/fix_no_var_replaces_closure_reference_without_loop_test.go +30 -0
- package/linthost/fix_no_var_replaces_for_header_binding_test.go +31 -0
- package/linthost/fix_no_var_replaces_for_in_header_binding_test.go +31 -0
- package/linthost/fix_no_var_replaces_for_of_header_binding_test.go +31 -0
- package/linthost/fix_no_var_replaces_loop_local_without_closure_test.go +30 -0
- package/linthost/fix_no_var_replaces_namespace_block_binding_test.go +28 -0
- package/linthost/fix_no_var_replaces_reassigned_binding_test.go +30 -0
- package/linthost/fix_no_var_replaces_reference_in_nested_block_test.go +30 -0
- package/linthost/fix_no_var_replaces_reference_inside_with_body_test.go +30 -0
- package/linthost/fix_no_var_replaces_same_block_references_test.go +30 -0
- package/linthost/fix_no_var_replaces_same_case_clause_references_test.go +30 -0
- package/linthost/fix_no_var_replaces_unique_binding_test.go +30 -0
- package/linthost/fix_no_var_replaces_var_keyword_test.go +28 -0
- package/linthost/fix_no_var_skips_block_scope_escape_test.go +37 -0
- package/linthost/fix_no_var_skips_catch_binding_redeclaration_test.go +36 -0
- package/linthost/fix_no_var_skips_class_field_capture_in_loop_test.go +38 -0
- package/linthost/fix_no_var_skips_cross_case_reference_test.go +36 -0
- package/linthost/fix_no_var_skips_cross_scope_same_name_over_decline_test.go +36 -0
- package/linthost/fix_no_var_skips_deferred_self_reference_in_init_test.go +45 -0
- package/linthost/fix_no_var_skips_direct_self_reference_in_init_test.go +37 -0
- package/linthost/fix_no_var_skips_for_header_closure_capture_test.go +38 -0
- package/linthost/fix_no_var_skips_for_header_multi_declarator_test.go +32 -0
- package/linthost/fix_no_var_skips_for_header_redeclaration_test.go +36 -0
- package/linthost/fix_no_var_skips_for_header_use_after_loop_test.go +37 -0
- package/linthost/fix_no_var_skips_for_in_annex_b_initializer_test.go +33 -0
- package/linthost/fix_no_var_skips_for_in_header_expression_self_reference_test.go +37 -0
- package/linthost/fix_no_var_skips_for_of_destructuring_header_test.go +32 -0
- package/linthost/fix_no_var_skips_for_of_header_closure_capture_test.go +38 -0
- package/linthost/fix_no_var_skips_for_of_header_expression_self_reference_test.go +36 -0
- package/linthost/fix_no_var_skips_function_declaration_redeclaration_test.go +39 -0
- package/linthost/fix_no_var_skips_function_scope_escape_test.go +28 -0
- package/linthost/fix_no_var_skips_iife_self_reference_in_init_test.go +39 -0
- package/linthost/fix_no_var_skips_let_as_binding_name_test.go +32 -0
- package/linthost/fix_no_var_skips_loop_closure_capture_test.go +37 -0
- package/linthost/fix_no_var_skips_mixed_destructure_redeclaration_test.go +38 -0
- package/linthost/fix_no_var_skips_mixed_destructure_use_before_test.go +36 -0
- package/linthost/fix_no_var_skips_parameter_redeclaration_test.go +28 -0
- package/linthost/fix_no_var_skips_redeclaration_test.go +37 -0
- package/linthost/fix_no_var_skips_shorthand_value_before_test.go +37 -0
- package/linthost/fix_no_var_skips_single_statement_position_test.go +33 -0
- package/linthost/fix_no_var_skips_typeof_self_reference_in_init_test.go +38 -0
- package/linthost/fix_no_var_skips_use_before_declaration_test.go +36 -0
- package/linthost/fix_no_var_skips_use_before_for_header_test.go +36 -0
- package/linthost/fix_no_var_skips_while_loop_closure_capture_test.go +35 -0
- package/linthost/fix_no_var_skips_with_statement_body_test.go +35 -0
- package/linthost/fix_no_wrapper_object_types_replaces_typename_test.go +28 -0
- package/linthost/fix_no_wrapper_object_types_replaces_unshadowed_const_test.go +30 -0
- package/linthost/fix_no_wrapper_object_types_skips_function_shadow_test.go +27 -0
- package/linthost/fix_no_wrapper_object_types_skips_import_equals_shadow_test.go +26 -0
- package/linthost/fix_no_wrapper_object_types_skips_imported_name_test.go +26 -0
- package/linthost/fix_no_wrapper_object_types_skips_user_shadowed_name_test.go +27 -0
- package/linthost/fix_object_shorthand_drops_value_tail_test.go +28 -0
- package/linthost/fix_object_shorthand_preserves_the_prototype_setter_test.go +28 -0
- package/linthost/fix_prefer_as_const_preserves_comment_before_literal_type_test.go +27 -0
- package/linthost/fix_prefer_as_const_replaces_angle_bracket_type_with_const_test.go +27 -0
- package/linthost/fix_prefer_as_const_replaces_literal_type_with_const_test.go +27 -0
- package/linthost/fix_prefer_as_const_replaces_parenthesized_literal_assertion_test.go +28 -0
- package/linthost/fix_prefer_as_const_replaces_parenthesized_literal_type_test.go +28 -0
- package/linthost/fix_prefer_as_const_skips_null_literal_assertion_test.go +26 -0
- package/linthost/fix_prefer_as_const_skips_property_annotation_rewrite_test.go +27 -0
- package/linthost/fix_prefer_as_const_skips_template_literal_assertion_test.go +28 -0
- package/linthost/fix_prefer_as_const_skips_variable_annotation_rewrite_test.go +27 -0
- package/linthost/fix_prefer_const_counts_nested_write_in_shorthand_default_test.go +25 -0
- package/linthost/fix_prefer_const_keeps_nonlocal_rewrites_diagnostic_only_test.go +54 -0
- package/linthost/fix_prefer_const_preserves_assertion_wrapped_assignment_targets_test.go +68 -0
- package/linthost/fix_prefer_const_replaces_let_with_fresh_for_of_binding_test.go +29 -0
- package/linthost/fix_prefer_const_replaces_single_let_keyword_test.go +26 -0
- package/linthost/fix_prefer_const_replaces_wholly_stable_destructuring_keyword_test.go +26 -0
- package/linthost/fix_prefer_const_skips_destructuring_assignment_targets_test.go +42 -0
- package/linthost/fix_prefer_const_skips_for_in_reassignment_test.go +28 -0
- package/linthost/fix_prefer_const_skips_for_of_reassignment_test.go +29 -0
- package/linthost/fix_prefer_const_skips_multi_declaration_list_test.go +32 -0
- package/linthost/fix_prefer_namespace_keyword_replaces_module_keyword_test.go +29 -0
- package/linthost/fix_regexp_no_useless_flag_deletes_the_flag_it_named_test.go +74 -0
- package/linthost/fix_regexp_no_useless_quantifier_drops_exactly_one_repeat_test.go +57 -0
- package/linthost/fix_regexp_no_useless_two_nums_quantifier_collapses_equal_bounds_test.go +50 -0
- package/linthost/fix_regexp_no_zero_quantifier_stays_diagnostic_only_test.go +39 -0
- package/linthost/fix_regexp_prefer_d_replaces_spelled_out_digit_class_test.go +49 -0
- package/linthost/fix_regexp_prefer_plus_quantifier_replaces_open_ended_one_test.go +45 -0
- package/linthost/fix_regexp_prefer_question_quantifier_replaces_zero_to_one_test.go +43 -0
- package/linthost/fix_regexp_prefer_star_quantifier_replaces_open_ended_zero_test.go +43 -0
- package/linthost/fix_regexp_prefer_w_replaces_spelled_out_word_class_test.go +46 -0
- package/linthost/fix_regexp_require_unicode_regexp_offers_u_and_v_suggestions_test.go +71 -0
- package/linthost/fix_regexp_require_unicode_sets_regexp_offers_the_v_flag_test.go +76 -0
- package/linthost/fix_regexp_sort_flags_rewrites_flag_run_in_canonical_order_test.go +48 -0
- package/linthost/fix_regexp_withholds_a_rewrite_the_regex_parser_rejects_test.go +62 -0
- package/linthost/fix_security_detect_new_buffer_offers_three_successors_test.go +93 -0
- package/linthost/fix_security_detect_pseudo_random_bytes_proves_automatic_rename_test.go +95 -0
- package/linthost/fix_select_text_edit_groups_collapses_duplicate_edit_within_finding_test.go +42 -0
- package/linthost/fix_select_text_edit_groups_drops_partially_overlapped_finding_whole_test.go +43 -0
- package/linthost/fix_select_text_edit_groups_drops_self_overlapping_finding_test.go +32 -0
- package/linthost/fix_select_text_edit_groups_keeps_disjoint_multi_edit_finding_whole_test.go +41 -0
- package/linthost/fix_select_text_edits_drops_coincident_zero_width_insert_test.go +57 -0
- package/linthost/fix_select_text_edits_drops_duplicate_edits_test.go +38 -0
- package/linthost/fix_select_text_edits_drops_overlapping_ranges_test.go +32 -0
- package/linthost/fix_solid_imports_rewrites_sole_specifier_module_test.go +65 -0
- package/linthost/fix_solid_no_react_specific_props_renames_react_props_test.go +66 -0
- package/linthost/fix_storybook_no_renderer_packages_offers_framework_packages_test.go +95 -0
- package/linthost/fix_tsx_grammar_keeps_jsx_while_rewriting_var_and_let_test.go +36 -0
- package/linthost/flags_gen.go +2 -2
- package/linthost/for_direction_honors_a_negated_compound_step_test.go +37 -0
- package/linthost/format.go +14 -4
- package/linthost/format_arrow_parens_abstains_on_comment_near_trailing_comma_test.go +68 -0
- package/linthost/format_arrow_parens_abstains_on_param_comment_test.go +44 -0
- package/linthost/format_arrow_parens_avoid_keeps_return_type_parens_test.go +24 -0
- package/linthost/format_arrow_parens_avoid_keeps_type_parameter_parens_test.go +23 -0
- package/linthost/format_arrow_parens_idempotent_on_wrapped_test.go +24 -0
- package/linthost/format_arrow_parens_keeps_destructured_param_under_avoid_test.go +24 -0
- package/linthost/format_arrow_parens_keeps_ineligible_trailing_comma_params_test.go +66 -0
- package/linthost/format_arrow_parens_keeps_trailing_comma_param_under_always_test.go +48 -0
- package/linthost/format_arrow_parens_keeps_typed_param_under_avoid_test.go +24 -0
- package/linthost/format_arrow_parens_strips_async_single_param_test.go +26 -0
- package/linthost/format_arrow_parens_strips_single_param_under_avoid_test.go +24 -0
- package/linthost/format_arrow_parens_strips_trailing_comma_param_under_avoid_test.go +51 -0
- package/linthost/format_arrow_parens_strips_wrapped_param_before_list_comma_test.go +32 -0
- package/linthost/format_arrow_parens_wraps_bare_single_param_test.go +25 -0
- package/linthost/format_block_absent_keeps_format_rules_off_test.go +42 -0
- package/linthost/format_block_default_severity_off_keeps_format_rules_out_of_check_test.go +48 -0
- package/linthost/format_block_drops_format_rule_in_rules_map_test.go +45 -0
- package/linthost/format_block_expands_nil_raw_to_empty_map_test.go +32 -0
- package/linthost/format_block_jsdoc_false_skips_rule_test.go +37 -0
- package/linthost/format_block_propagates_jsdoc_sort_tags_option_test.go +59 -0
- package/linthost/format_block_propagates_prettier_options_to_rule_test.go +159 -0
- package/linthost/format_block_propagates_sort_imports_options_test.go +70 -0
- package/linthost/format_block_rejects_empty_sort_imports_order_test.go +37 -0
- package/linthost/format_block_rejects_invalid_jsdoc_options_test.go +68 -0
- package/linthost/format_block_rejects_invalid_severity_test.go +33 -0
- package/linthost/format_block_rejects_invalid_trailing_comma_value_test.go +36 -0
- package/linthost/format_block_rejects_non_array_sort_imports_order_test.go +32 -0
- package/linthost/format_block_rejects_non_bool_or_object_jsdoc_test.go +36 -0
- package/linthost/format_block_rejects_non_bool_or_object_sort_imports_test.go +30 -0
- package/linthost/format_block_rejects_non_bool_semi_test.go +32 -0
- package/linthost/format_block_rejects_non_bool_single_quote_test.go +31 -0
- package/linthost/format_block_rejects_non_bool_sort_imports_options_test.go +45 -0
- package/linthost/format_block_rejects_non_bool_use_tabs_test.go +31 -0
- package/linthost/format_block_rejects_non_int_print_width_test.go +31 -0
- package/linthost/format_block_rejects_non_int_tab_width_test.go +32 -0
- package/linthost/format_block_rejects_non_string_end_of_line_test.go +48 -0
- package/linthost/format_block_rejects_non_string_trailing_comma_test.go +32 -0
- package/linthost/format_block_rejects_unknown_key_test.go +39 -0
- package/linthost/format_block_rejects_unknown_sort_imports_key_test.go +36 -0
- package/linthost/format_block_severity_warning_enables_check_diagnostics_test.go +48 -0
- package/linthost/format_block_sort_imports_false_keeps_rule_off_test.go +27 -0
- package/linthost/format_block_sort_imports_true_enables_defaults_test.go +37 -0
- package/linthost/format_block_targets_option_accepting_rules_test.go +90 -0
- package/linthost/format_block_threads_end_of_line_into_sort_imports_test.go +55 -0
- package/linthost/format_block_wins_over_vscode_settings_test.go +36 -0
- package/linthost/format_brace_continuation_corrects_a_pushed_keyword_at_the_wrong_column_test.go +28 -0
- package/linthost/format_brace_continuation_honors_crlf_end_of_line_test.go +29 -0
- package/linthost/format_brace_continuation_indents_a_pushed_keyword_to_its_statement_test.go +27 -0
- package/linthost/format_brace_continuation_is_idempotent_in_both_directions_test.go +32 -0
- package/linthost/format_brace_continuation_leaves_an_if_without_an_else_alone_test.go +23 -0
- package/linthost/format_brace_continuation_normalizes_a_zero_width_gap_test.go +27 -0
- package/linthost/format_brace_continuation_pulls_catch_and_finally_onto_their_braces_test.go +28 -0
- package/linthost/format_brace_continuation_pulls_do_while_onto_the_closing_brace_test.go +27 -0
- package/linthost/format_brace_continuation_pulls_else_onto_the_closing_brace_test.go +27 -0
- package/linthost/format_brace_continuation_pulls_finally_onto_a_try_without_a_catch_test.go +28 -0
- package/linthost/format_brace_continuation_pushes_a_do_while_off_a_statement_body_test.go +28 -0
- package/linthost/format_brace_continuation_pushes_else_off_a_statement_consequent_test.go +28 -0
- package/linthost/format_brace_continuation_pushes_past_a_brace_terminated_non_block_test.go +28 -0
- package/linthost/format_brace_continuation_pushes_past_a_label_prefix_test.go +48 -0
- package/linthost/format_brace_continuation_settles_a_shared_line_through_the_cascade_test.go +44 -0
- package/linthost/format_brace_continuation_skips_a_commented_gap_test.go +28 -0
- package/linthost/format_brace_continuation_waits_for_a_statement_to_own_its_line_test.go +27 -0
- package/linthost/format_bracket_spacing_idempotent_on_padded_test.go +23 -0
- package/linthost/format_bracket_spacing_leaves_a_prettier_shaped_type_literal_alone_test.go +27 -0
- package/linthost/format_bracket_spacing_leaves_empty_object_test.go +74 -0
- package/linthost/format_bracket_spacing_pads_an_unspaced_type_literal_test.go +29 -0
- package/linthost/format_bracket_spacing_pads_destructure_test.go +24 -0
- package/linthost/format_bracket_spacing_pads_import_attributes_test.go +28 -0
- package/linthost/format_bracket_spacing_pads_mapped_type_test.go +27 -0
- package/linthost/format_bracket_spacing_pads_named_imports_test.go +24 -0
- package/linthost/format_bracket_spacing_pads_object_literal_test.go +26 -0
- package/linthost/format_bracket_spacing_strips_object_literal_under_false_test.go +26 -0
- package/linthost/format_clause_join_charges_the_else_width_budget_at_its_limit_test.go +37 -0
- package/linthost/format_clause_join_charges_the_shift_to_the_header_lines_indent_test.go +45 -0
- package/linthost/format_clause_join_emits_no_shift_when_the_column_is_unchanged_test.go +50 -0
- package/linthost/format_clause_join_hoists_across_a_multiline_template_without_moving_it_test.go +30 -0
- package/linthost/format_clause_join_idempotent_on_joined_body_test.go +27 -0
- package/linthost/format_clause_join_joins_do_body_test.go +27 -0
- package/linthost/format_clause_join_joins_else_body_test.go +27 -0
- package/linthost/format_clause_join_joins_else_if_chain_across_lines_test.go +44 -0
- package/linthost/format_clause_join_joins_for_and_while_bodies_test.go +32 -0
- package/linthost/format_clause_join_joins_labeled_block_body_test.go +31 -0
- package/linthost/format_clause_join_joins_single_if_body_test.go +28 -0
- package/linthost/format_clause_join_joins_with_body_test.go +27 -0
- package/linthost/format_clause_join_keeps_a_blank_line_inside_a_hoisted_body_test.go +45 -0
- package/linthost/format_clause_join_keeps_overlong_body_broken_test.go +31 -0
- package/linthost/format_clause_join_leaves_a_block_comment_interior_untouched_test.go +45 -0
- package/linthost/format_clause_join_leaves_a_string_continuation_untouched_test.go +45 -0
- package/linthost/format_clause_join_leaves_a_template_literal_type_untouched_test.go +49 -0
- package/linthost/format_clause_join_reindents_a_hoisted_body_inside_a_function_test.go +43 -0
- package/linthost/format_clause_join_reindents_a_hoisted_else_if_chain_test.go +45 -0
- package/linthost/format_clause_join_reindents_a_hoisted_labeled_block_test.go +27 -0
- package/linthost/format_clause_join_reindents_an_indentable_block_comment_test.go +50 -0
- package/linthost/format_clause_join_settles_a_deep_staircase_within_the_cascade_budget_test.go +44 -0
- package/linthost/format_clause_join_shifts_a_tab_indented_body_with_tabs_test.go +44 -0
- package/linthost/format_clause_join_skips_braced_body_test.go +31 -0
- package/linthost/format_clause_join_skips_braced_else_and_do_bodies_test.go +38 -0
- package/linthost/format_clause_join_skips_commented_else_gap_test.go +29 -0
- package/linthost/format_clause_join_skips_empty_else_and_do_bodies_test.go +33 -0
- package/linthost/format_clause_join_skips_empty_statement_body_test.go +36 -0
- package/linthost/format_command_resolver_keeps_configured_options_inside_matching_entry_test.go +64 -0
- package/linthost/format_command_resolver_skips_upgrade_for_entry_ignored_file_test.go +60 -0
- package/linthost/format_command_resolver_skips_upgrade_for_file_outside_entry_files_test.go +61 -0
- package/linthost/format_command_resolver_variants_replace_bare_options_with_reachable_defaults_test.go +34 -0
- package/linthost/format_declaration_header_abstains_on_comment_in_header_test.go +25 -0
- package/linthost/format_declaration_header_abstains_on_type_params_with_multi_clause_test.go +27 -0
- package/linthost/format_declaration_header_breaks_empty_body_at_width_boundary_test.go +32 -0
- package/linthost/format_declaration_header_breaks_generic_heritage_type_args_test.go +28 -0
- package/linthost/format_declaration_header_breaks_multi_type_interface_test.go +29 -0
- package/linthost/format_declaration_header_breaks_multiple_clauses_test.go +25 -0
- package/linthost/format_declaration_header_breaks_single_type_clause_in_multi_clause_test.go +73 -0
- package/linthost/format_declaration_header_breaks_type_param_default_after_equals_test.go +29 -0
- package/linthost/format_declaration_header_collapses_fitting_header_test.go +29 -0
- package/linthost/format_declaration_header_drops_brace_for_class_body_test.go +28 -0
- package/linthost/format_declaration_header_explodes_and_drops_brace_for_class_body_test.go +27 -0
- package/linthost/format_declaration_header_explodes_type_parameters_test.go +26 -0
- package/linthost/format_declaration_header_generic_heritage_honors_crlf_end_of_line_test.go +32 -0
- package/linthost/format_declaration_header_glues_brace_for_empty_body_test.go +27 -0
- package/linthost/format_declaration_header_idempotent_on_broken_clauses_test.go +24 -0
- package/linthost/format_declaration_header_idempotent_on_broken_heritage_type_args_test.go +25 -0
- package/linthost/format_declaration_header_idempotent_on_exploded_class_body_test.go +25 -0
- package/linthost/format_declaration_header_keeps_multi_type_inline_after_break_test.go +30 -0
- package/linthost/format_declaration_header_keeps_single_generic_heritage_arg_inline_test.go +25 -0
- package/linthost/format_declaration_header_keeps_single_heritage_type_inline_test.go +26 -0
- package/linthost/format_declaration_header_multi_clause_honors_crlf_end_of_line_test.go +30 -0
- package/linthost/format_declaration_header_multi_type_honors_crlf_end_of_line_test.go +30 -0
- package/linthost/format_declaration_header_type_param_explode_honors_crlf_end_of_line_test.go +32 -0
- package/linthost/format_defaults_apply_without_format_config_test.go +46 -0
- package/linthost/format_indent_case_block_body_matches_case_depth_test.go +30 -0
- package/linthost/format_indent_cedes_body_under_multiline_arrow_head_test.go +39 -0
- package/linthost/format_indent_cedes_callback_argument_body_test.go +31 -0
- package/linthost/format_indent_defers_shared_line_to_statement_split_test.go +32 -0
- package/linthost/format_indent_honors_custom_tab_width_test.go +28 -0
- package/linthost/format_indent_honors_use_tabs_option_test.go +28 -0
- package/linthost/format_indent_idempotent_on_correct_class_body_test.go +27 -0
- package/linthost/format_indent_idempotent_on_correct_nested_block_test.go +26 -0
- package/linthost/format_indent_idempotent_on_decorated_member_test.go +29 -0
- package/linthost/format_indent_normalizes_class_method_body_depth_test.go +29 -0
- package/linthost/format_indent_normalizes_decorated_member_declaration_line_test.go +31 -0
- package/linthost/format_indent_normalizes_multiple_decorator_lines_test.go +30 -0
- package/linthost/format_indent_normalizes_over_indented_block_statement_test.go +27 -0
- package/linthost/format_indent_normalizes_plain_member_header_test.go +29 -0
- package/linthost/format_indent_normalizes_same_line_decorated_member_test.go +49 -0
- package/linthost/format_indent_normalizes_switch_case_body_depth_test.go +29 -0
- package/linthost/format_indent_still_fixes_single_line_head_arrow_body_test.go +27 -0
- package/linthost/format_indent_strips_leading_indent_from_top_level_statement_test.go +27 -0
- package/linthost/format_jsdoc_honors_custom_tag_synonyms_option_test.go +26 -0
- package/linthost/format_jsdoc_preserves_example_block_body_test.go +63 -0
- package/linthost/format_jsdoc_rejects_malformed_tag_synonym_value_test.go +60 -0
- package/linthost/format_jsdoc_rewrites_arg_synonyms_to_param_test.go +25 -0
- package/linthost/format_jsdoc_rewrites_return_to_returns_test.go +24 -0
- package/linthost/format_jsdoc_skips_canonical_tags_test.go +32 -0
- package/linthost/format_jsdoc_skips_inline_at_text_test.go +34 -0
- package/linthost/format_jsdoc_skips_jsdoc_like_strings_in_source_test.go +41 -0
- package/linthost/format_orphan_semi_inert_under_semi_true_test.go +24 -0
- package/linthost/format_orphan_semi_merges_guard_under_no_semi_test.go +35 -0
- package/linthost/format_orphan_semi_skips_comment_between_guard_and_statement_test.go +28 -0
- package/linthost/format_orphan_semi_skips_non_hazard_successor_test.go +29 -0
- package/linthost/format_parameter_properties_breaks_multi_param_constructor_test.go +30 -0
- package/linthost/format_parameter_properties_breaks_override_only_constructor_test.go +31 -0
- package/linthost/format_parameter_properties_honors_crlf_end_of_line_test.go +29 -0
- package/linthost/format_parameter_properties_idempotent_on_broken_list_test.go +28 -0
- package/linthost/format_parameter_properties_ignores_decorated_plain_params_test.go +31 -0
- package/linthost/format_parameter_properties_ignores_plain_params_test.go +27 -0
- package/linthost/format_parameter_properties_keeps_single_param_inline_test.go +30 -0
- package/linthost/format_prettier_conformance_e2e_test.go +367 -0
- package/linthost/format_print_width_abstains_inside_jsx_expression_test.go +50 -0
- package/linthost/format_print_width_abstains_inside_template_substitution_test.go +31 -0
- package/linthost/format_print_width_abstains_when_callback_body_holds_uncovered_statement_test.go +37 -0
- package/linthost/format_print_width_abstains_when_inter_member_comment_present_test.go +32 -0
- package/linthost/format_print_width_abstains_when_trailing_block_comment_before_close_bracket_test.go +35 -0
- package/linthost/format_print_width_breaks_array_rest_assignment_target_without_comma_test.go +31 -0
- package/linthost/format_print_width_breaks_call_when_trailing_semicolon_overflows_test.go +26 -0
- package/linthost/format_print_width_breaks_default_plus_named_import_shape_test.go +29 -0
- package/linthost/format_print_width_breaks_long_call_arguments_test.go +31 -0
- package/linthost/format_print_width_breaks_long_named_exports_test.go +30 -0
- package/linthost/format_print_width_breaks_long_named_imports_test.go +30 -0
- package/linthost/format_print_width_breaks_long_new_expression_arguments_test.go +31 -0
- package/linthost/format_print_width_breaks_long_object_literal_test.go +27 -0
- package/linthost/format_print_width_breaks_overflowing_react_hook_deps_array_test.go +29 -0
- package/linthost/format_print_width_check_abstains_when_ctx_is_nil_test.go +24 -0
- package/linthost/format_print_width_check_abstains_when_node_is_nil_test.go +48 -0
- package/linthost/format_print_width_check_abstains_when_node_range_exceeds_context_source_test.go +71 -0
- package/linthost/format_print_width_declines_last_arg_hug_after_arrow_lead_test.go +29 -0
- package/linthost/format_print_width_declines_last_arg_hug_after_callback_test.go +28 -0
- package/linthost/format_print_width_default_width_is_80_columns_test.go +31 -0
- package/linthost/format_print_width_explodes_call_when_hugged_header_overflows_test.go +26 -0
- package/linthost/format_print_width_hangs_broken_ternary_arm_under_arm_column_test.go +40 -0
- package/linthost/format_print_width_has_non_child_comments_returns_false_when_node_is_nil_test.go +46 -0
- package/linthost/format_print_width_has_reflow_ancestor_returns_false_when_node_is_nil_test.go +40 -0
- package/linthost/format_print_width_honors_crlf_end_of_line_test.go +30 -0
- package/linthost/format_print_width_honors_custom_tab_width_test.go +27 -0
- package/linthost/format_print_width_honors_tab_leading_source_test.go +27 -0
- package/linthost/format_print_width_honors_use_tabs_option_test.go +25 -0
- package/linthost/format_print_width_hugs_arrow_with_object_body_test.go +32 -0
- package/linthost/format_print_width_hugs_first_callback_argument_test.go +31 -0
- package/linthost/format_print_width_hugs_first_callback_with_array_arg_test.go +27 -0
- package/linthost/format_print_width_hugs_object_argument_despite_long_trailing_suffix_test.go +32 -0
- package/linthost/format_print_width_idempotent_on_already_reflowed_input_test.go +26 -0
- package/linthost/format_print_width_idempotent_on_first_hugged_call_test.go +25 -0
- package/linthost/format_print_width_idempotent_on_hugged_callback_call_test.go +25 -0
- package/linthost/format_print_width_idempotent_on_nested_ternary_staircase_test.go +25 -0
- package/linthost/format_print_width_indents_nested_alternate_ternary_test.go +30 -0
- package/linthost/format_print_width_indents_nested_consequent_ternary_test.go +30 -0
- package/linthost/format_print_width_indents_relative_to_line_leading_indent_test.go +42 -0
- package/linthost/format_print_width_inserts_after_non_rest_object_assignment_target_test.go +30 -0
- package/linthost/format_print_width_inserts_after_object_spread_in_value_literal_test.go +30 -0
- package/linthost/format_print_width_keeps_call_with_trailing_line_comment_inline_test.go +24 -0
- package/linthost/format_print_width_keeps_empty_array_literal_flat_test.go +25 -0
- package/linthost/format_print_width_keeps_empty_object_literal_flat_test.go +28 -0
- package/linthost/format_print_width_keeps_nested_object_that_fits_test.go +24 -0
- package/linthost/format_print_width_keeps_object_rest_assignment_target_without_comma_test.go +29 -0
- package/linthost/format_print_width_keeps_react_hook_hugged_past_open_line_test.go +26 -0
- package/linthost/format_print_width_keeps_short_call_with_callback_hugged_test.go +32 -0
- package/linthost/format_print_width_keeps_short_ternary_flat_test.go +27 -0
- package/linthost/format_print_width_leading_column_returns_zero_when_pos_is_nonpositive_test.go +51 -0
- package/linthost/format_print_width_line_leading_indent_uses_two_when_tab_width_nonpositive_test.go +47 -0
- package/linthost/format_print_width_max_line_width_uses_two_when_tab_width_nonpositive_test.go +47 -0
- package/linthost/format_print_width_preserves_blank_line_in_reflowed_callback_body_test.go +29 -0
- package/linthost/format_print_width_preserves_call_type_arguments_test.go +32 -0
- package/linthost/format_print_width_preserves_leading_jsdoc_above_reflowed_node_test.go +44 -0
- package/linthost/format_print_width_preserves_multiline_object_test.go +30 -0
- package/linthost/format_print_width_preserves_optional_call_token_test.go +32 -0
- package/linthost/format_print_width_preserves_terminator_decision_on_imports_test.go +42 -0
- package/linthost/format_print_width_reflows_call_with_nested_object_argument_test.go +33 -0
- package/linthost/format_print_width_reflows_wide_array_with_slash_strings_test.go +34 -0
- package/linthost/format_print_width_reindents_callback_body_inside_indented_block_test.go +33 -0
- package/linthost/format_print_width_skips_namespace_import_shape_test.go +28 -0
- package/linthost/format_print_width_skips_nested_target_when_ancestor_covers_it_test.go +58 -0
- package/linthost/format_print_width_skips_short_object_literal_test.go +29 -0
- package/linthost/format_print_width_slice_contains_newline_clamps_out_of_range_bounds_test.go +57 -0
- package/linthost/format_print_width_ternary_arm_indent_bonus_test.go +44 -0
- package/linthost/format_print_width_trailing_line_width_excludes_trailing_line_comment_test.go +38 -0
- package/linthost/format_print_width_trailing_line_width_handles_guards_and_tabs_test.go +51 -0
- package/linthost/format_quote_props_consistent_preserves_cooked_identifier_keys_test.go +37 -0
- package/linthost/format_quote_props_consistent_quotes_mixed_object_test.go +28 -0
- package/linthost/format_quote_props_consistent_unquotes_all_identifier_keys_test.go +24 -0
- package/linthost/format_quote_props_consistent_unquotes_proto_with_identifier_keys_test.go +21 -0
- package/linthost/format_quote_props_keeps_non_identifier_key_test.go +24 -0
- package/linthost/format_quote_props_keeps_numeric_key_test.go +20 -0
- package/linthost/format_quote_props_preserve_is_noop_test.go +23 -0
- package/linthost/format_quote_props_unquotes_class_method_test.go +30 -0
- package/linthost/format_quote_props_unquotes_identifier_keys_test.go +25 -0
- package/linthost/format_quote_props_unquotes_interface_member_test.go +28 -0
- package/linthost/format_quote_props_unquotes_proto_key_without_changing_setter_semantics_test.go +21 -0
- package/linthost/format_quote_props_unquotes_reserved_word_key_test.go +25 -0
- package/linthost/format_quote_props_unquotes_type_literal_member_test.go +28 -0
- package/linthost/format_quotes_converts_double_to_single_preserving_apostrophe_escape_test.go +23 -0
- package/linthost/format_quotes_converts_single_to_double_test.go +22 -0
- package/linthost/format_quotes_escapes_double_quote_when_converting_test.go +22 -0
- package/linthost/format_quotes_honors_prefer_single_option_test.go +27 -0
- package/linthost/format_quotes_keeps_double_on_escape_tie_test.go +29 -0
- package/linthost/format_quotes_keeps_double_with_redundant_single_escape_test.go +31 -0
- package/linthost/format_quotes_keeps_single_with_redundant_double_escape_test.go +31 -0
- package/linthost/format_quotes_preserves_strings_with_unescaped_double_quotes_test.go +34 -0
- package/linthost/format_quotes_skips_double_quoted_literals_test.go +24 -0
- package/linthost/format_quotes_skips_jsx_attribute_strings_test.go +44 -0
- package/linthost/format_quotes_skips_template_literals_test.go +38 -0
- package/linthost/format_quotes_switches_double_to_single_to_minimize_escapes_test.go +31 -0
- package/linthost/format_quotes_switches_single_to_double_to_minimize_escapes_test.go +22 -0
- package/linthost/format_quotes_unescapes_apostrophe_when_converting_test.go +30 -0
- package/linthost/format_reflow_preserves_import_default_gap_comment_test.go +29 -0
- package/linthost/format_reflow_preserves_import_type_gap_comment_test.go +29 -0
- package/linthost/format_reflow_preserves_nested_call_arg_comment_test.go +24 -0
- package/linthost/format_reflow_preserves_new_constructee_gap_comment_test.go +21 -0
- package/linthost/format_reflow_preserves_return_comment_test.go +24 -0
- package/linthost/format_reflow_preserves_ternary_paren_comment_test.go +26 -0
- package/linthost/format_semi_fires_for_every_asi_statement_kind_test.go +103 -0
- package/linthost/format_semi_honors_prefer_never_option_test.go +28 -0
- package/linthost/format_semi_idempotent_on_stripped_interface_test.go +28 -0
- package/linthost/format_semi_idempotent_on_terminated_members_test.go +38 -0
- package/linthost/format_semi_inserts_after_missing_terminator_test.go +28 -0
- package/linthost/format_semi_inserts_member_terminator_before_trailing_comment_test.go +29 -0
- package/linthost/format_semi_keeps_a_flat_mapped_type_bare_test.go +31 -0
- package/linthost/format_semi_keeps_a_flat_object_types_last_member_bare_test.go +36 -0
- package/linthost/format_semi_keeps_braced_and_object_literal_accessors_bare_test.go +40 -0
- package/linthost/format_semi_keeps_class_field_semi_before_computed_member_test.go +32 -0
- package/linthost/format_semi_keeps_object_literal_accessor_separators_untouched_test.go +49 -0
- package/linthost/format_semi_keeps_one_line_interface_body_bare_test.go +29 -0
- package/linthost/format_semi_keeps_same_line_type_member_separator_test.go +31 -0
- package/linthost/format_semi_keeps_type_member_semi_before_call_signature_test.go +32 -0
- package/linthost/format_semi_normalizes_a_comma_member_separator_test.go +39 -0
- package/linthost/format_semi_prefer_never_block_comment_is_not_hazard_test.go +49 -0
- package/linthost/format_semi_prefer_never_keeps_a_flat_object_types_separator_test.go +38 -0
- package/linthost/format_semi_prefer_never_keeps_do_while_separator_test.go +32 -0
- package/linthost/format_semi_prefer_never_keeps_same_line_else_separator_test.go +31 -0
- package/linthost/format_semi_prefer_never_keeps_same_line_statement_separator_test.go +29 -0
- package/linthost/format_semi_prefer_never_keeps_semi_before_asi_hazard_test.go +58 -0
- package/linthost/format_semi_prefer_never_keeps_semi_before_regex_hazard_test.go +51 -0
- package/linthost/format_semi_prefer_never_keeps_semi_before_same_line_comment_gap_test.go +30 -0
- package/linthost/format_semi_prefer_never_line_comment_is_not_hazard_test.go +49 -0
- package/linthost/format_semi_prefer_never_normalizes_a_comma_it_must_keep_test.go +37 -0
- package/linthost/format_semi_prefer_never_strips_a_comma_member_separator_test.go +32 -0
- package/linthost/format_semi_prefer_never_strips_a_flat_object_types_trailing_separator_test.go +33 -0
- package/linthost/format_semi_prefer_never_strips_a_mapped_type_terminator_test.go +35 -0
- package/linthost/format_semi_prefer_never_strips_across_crlf_test.go +33 -0
- package/linthost/format_semi_prefer_never_strips_across_multiline_comment_gap_test.go +32 -0
- package/linthost/format_semi_prefer_never_strips_before_same_line_close_brace_test.go +31 -0
- package/linthost/format_semi_prefer_never_strips_member_with_space_test.go +52 -0
- package/linthost/format_semi_reads_a_mapped_types_wrap_at_its_opening_brace_test.go +34 -0
- package/linthost/format_semi_skips_already_terminated_statements_test.go +31 -0
- package/linthost/format_semi_strips_class_field_semicolons_test.go +29 -0
- package/linthost/format_semi_strips_interface_member_semicolons_test.go +29 -0
- package/linthost/format_semi_strips_type_alias_semicolon_test.go +29 -0
- package/linthost/format_semi_terminates_a_broken_mapped_type_test.go +40 -0
- package/linthost/format_semi_terminates_a_mapped_type_across_crlf_test.go +32 -0
- package/linthost/format_semi_terminates_a_mapped_type_around_its_trailing_comment_test.go +37 -0
- package/linthost/format_semi_terminates_a_mapped_type_without_a_type_annotation_test.go +37 -0
- package/linthost/format_semi_terminates_a_member_across_crlf_test.go +31 -0
- package/linthost/format_semi_terminates_a_member_whose_type_ends_in_a_brace_test.go +31 -0
- package/linthost/format_semi_terminates_broken_interface_members_test.go +45 -0
- package/linthost/format_semi_terminates_broken_type_literal_member_test.go +31 -0
- package/linthost/format_semi_terminates_class_index_signature_and_ambient_accessor_test.go +29 -0
- package/linthost/format_sort_imports_alphabetizes_named_specifiers_test.go +31 -0
- package/linthost/format_sort_imports_combine_requires_unsafe_runtime_opt_in_test.go +30 -0
- package/linthost/format_sort_imports_combines_type_and_value_test.go +27 -0
- package/linthost/format_sort_imports_dedupes_repeated_specifier_test.go +28 -0
- package/linthost/format_sort_imports_group_separator_honors_crlf_end_of_line_test.go +40 -0
- package/linthost/format_sort_imports_groups_builtins_first_test.go +29 -0
- package/linthost/format_sort_imports_groups_external_before_relative_test.go +35 -0
- package/linthost/format_sort_imports_groups_type_only_imports_test.go +27 -0
- package/linthost/format_sort_imports_honors_crlf_end_of_line_test.go +40 -0
- package/linthost/format_sort_imports_honors_custom_import_order_test.go +88 -0
- package/linthost/format_sort_imports_keeps_attribute_bearing_imports_unmerged_test.go +24 -0
- package/linthost/format_sort_imports_keeps_commented_list_unmerged_test.go +26 -0
- package/linthost/format_sort_imports_keeps_conflicting_defaults_separate_test.go +34 -0
- package/linthost/format_sort_imports_keeps_default_gap_comment_unmerged_test.go +24 -0
- package/linthost/format_sort_imports_keeps_default_only_gap_comment_unmerged_test.go +24 -0
- package/linthost/format_sort_imports_keeps_empty_named_imports_test.go +31 -0
- package/linthost/format_sort_imports_keeps_identical_commented_imports_unmerged_test.go +35 -0
- package/linthost/format_sort_imports_keeps_identical_namespace_imports_unmerged_test.go +35 -0
- package/linthost/format_sort_imports_keeps_namespace_imports_separate_test.go +34 -0
- package/linthost/format_sort_imports_keeps_trailing_specifier_comment_unmerged_test.go +24 -0
- package/linthost/format_sort_imports_keeps_type_and_value_separate_test.go +31 -0
- package/linthost/format_sort_imports_keeps_type_default_and_type_named_separate_test.go +34 -0
- package/linthost/format_sort_imports_keeps_type_default_and_type_named_separate_when_combining_test.go +34 -0
- package/linthost/format_sort_imports_keeps_type_default_separate_when_combining_test.go +31 -0
- package/linthost/format_sort_imports_merges_default_and_named_test.go +27 -0
- package/linthost/format_sort_imports_merges_duplicate_modules_test.go +28 -0
- package/linthost/format_sort_imports_merges_duplicate_type_only_imports_test.go +24 -0
- package/linthost/format_sort_imports_merges_type_default_with_empty_named_test.go +28 -0
- package/linthost/format_sort_imports_merges_type_named_binding_test.go +33 -0
- package/linthost/format_sort_imports_orders_case_insensitively_by_default_test.go +29 -0
- package/linthost/format_sort_imports_orders_case_sensitively_when_enabled_test.go +29 -0
- package/linthost/format_sort_imports_preserves_comments_between_imports_test.go +43 -0
- package/linthost/format_sort_imports_preserves_comments_between_specifiers_test.go +38 -0
- package/linthost/format_sort_imports_preserves_side_effect_imports_test.go +55 -0
- package/linthost/format_sort_imports_recognizes_exact_builtin_specifiers_test.go +56 -0
- package/linthost/format_sort_imports_scopes_type_group_by_regex_test.go +32 -0
- package/linthost/format_sort_imports_separator_spans_empty_group_test.go +31 -0
- package/linthost/format_sort_imports_skips_already_sorted_files_test.go +40 -0
- package/linthost/format_sort_imports_skips_invalid_regex_group_test.go +30 -0
- package/linthost/format_sort_imports_skips_invalid_types_regex_group_test.go +28 -0
- package/linthost/format_sort_imports_skips_single_import_files_test.go +38 -0
- package/linthost/format_sort_imports_sorts_erased_type_only_block_test.go +26 -0
- package/linthost/format_sort_imports_sorts_named_specifiers_without_reordering_runtime_imports_test.go +28 -0
- package/linthost/format_sort_imports_treats_inline_type_bindings_as_runtime_import_test.go +24 -0
- package/linthost/format_sort_imports_unsafe_option_reorders_runtime_imports_test.go +34 -0
- package/linthost/format_statement_split_abstains_on_empty_statements_test.go +26 -0
- package/linthost/format_statement_split_abstains_when_block_comment_in_gap_test.go +28 -0
- package/linthost/format_statement_split_breaks_statements_sharing_a_line_test.go +28 -0
- package/linthost/format_statement_split_breaks_three_statements_on_one_line_test.go +27 -0
- package/linthost/format_statement_split_honors_crlf_end_of_line_test.go +29 -0
- package/linthost/format_statement_split_indents_split_statement_inside_block_test.go +30 -0
- package/linthost/format_statement_split_keeps_block_on_case_label_line_test.go +28 -0
- package/linthost/format_statement_split_keeps_leading_semi_guard_test.go +31 -0
- package/linthost/format_statement_split_skips_already_one_per_line_test.go +26 -0
- package/linthost/format_ternary_nullish_parens_leaves_logical_and_parenthesized_test.go +30 -0
- package/linthost/format_ternary_nullish_parens_wraps_all_positions_test.go +29 -0
- package/linthost/format_trailing_comma_honors_mode_es5_for_enum_members_test.go +26 -0
- package/linthost/format_trailing_comma_honors_mode_es5_includes_type_level_lists_test.go +26 -0
- package/linthost/format_trailing_comma_honors_mode_es5_option_test.go +28 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_arrow_parameter_test.go +29 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_call_argument_test.go +28 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_constructor_parameter_test.go +29 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_function_expression_parameter_test.go +29 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_method_parameter_test.go +29 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_new_argument_test.go +28 -0
- package/linthost/format_trailing_comma_honors_mode_es5_skips_set_accessor_parameter_test.go +29 -0
- package/linthost/format_trailing_comma_inserts_after_array_spread_in_value_literal_test.go +26 -0
- package/linthost/format_trailing_comma_inserts_after_decorated_parameter_test.go +27 -0
- package/linthost/format_trailing_comma_inserts_after_last_array_element_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_arrow_parameter_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_call_argument_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_call_signature_parameter_test.go +28 -0
- package/linthost/format_trailing_comma_inserts_after_last_construct_signature_parameter_test.go +28 -0
- package/linthost/format_trailing_comma_inserts_after_last_constructor_parameter_test.go +26 -0
- package/linthost/format_trailing_comma_inserts_after_last_constructor_type_parameter_test.go +28 -0
- package/linthost/format_trailing_comma_inserts_after_last_element_in_multiple_lists_test.go +27 -0
- package/linthost/format_trailing_comma_inserts_after_last_function_expression_parameter_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_function_parameter_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_function_type_parameter_test.go +28 -0
- package/linthost/format_trailing_comma_inserts_after_last_method_parameter_test.go +26 -0
- package/linthost/format_trailing_comma_inserts_after_last_method_signature_parameter_test.go +28 -0
- package/linthost/format_trailing_comma_inserts_after_last_named_export_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_named_import_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_new_argument_test.go +27 -0
- package/linthost/format_trailing_comma_inserts_after_last_object_property_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_set_accessor_parameter_test.go +26 -0
- package/linthost/format_trailing_comma_inserts_after_last_tuple_element_test.go +25 -0
- package/linthost/format_trailing_comma_inserts_after_last_type_parameter_test.go +28 -0
- package/linthost/format_trailing_comma_inserts_after_non_rest_array_assignment_target_test.go +27 -0
- package/linthost/format_trailing_comma_inserts_after_non_rest_object_assignment_target_test.go +27 -0
- package/linthost/format_trailing_comma_inserts_after_object_spread_in_value_literal_test.go +26 -0
- package/linthost/format_trailing_comma_inserts_after_parameter_property_in_constructor_test.go +28 -0
- package/linthost/format_trailing_comma_mode_none_removes_trailing_comma_test.go +28 -0
- package/linthost/format_trailing_comma_places_comma_before_trailing_line_comment_test.go +31 -0
- package/linthost/format_trailing_comma_removes_call_comma_under_es5_test.go +27 -0
- package/linthost/format_trailing_comma_skips_already_terminated_lists_test.go +31 -0
- package/linthost/format_trailing_comma_skips_array_rest_assignment_target_test.go +28 -0
- package/linthost/format_trailing_comma_skips_call_when_close_paren_shares_line_with_last_argument_test.go +30 -0
- package/linthost/format_trailing_comma_skips_dynamic_import_argument_test.go +28 -0
- package/linthost/format_trailing_comma_skips_empty_lists_test.go +32 -0
- package/linthost/format_trailing_comma_skips_inline_block_comment_before_close_bracket_test.go +31 -0
- package/linthost/format_trailing_comma_skips_object_rest_assignment_target_test.go +28 -0
- package/linthost/format_trailing_comma_skips_rest_parameter_test.go +39 -0
- package/linthost/format_trailing_comma_skips_single_line_lists_test.go +34 -0
- package/linthost/format_trailing_comma_skips_unparenthesized_arrow_with_multiline_body_test.go +28 -0
- package/linthost/format_whitespace_collapses_all_blank_file_to_single_eol_test.go +30 -0
- package/linthost/format_whitespace_collapses_consecutive_blank_lines_test.go +27 -0
- package/linthost/format_whitespace_fixes_missing_final_newline_with_trailing_space_test.go +29 -0
- package/linthost/format_whitespace_inserts_missing_final_newline_test.go +28 -0
- package/linthost/format_whitespace_keeps_blank_line_inside_template_test.go +27 -0
- package/linthost/format_whitespace_normalizes_crlf_to_lf_by_default_test.go +28 -0
- package/linthost/format_whitespace_preserves_crlf_under_crlf_end_of_line_test.go +28 -0
- package/linthost/format_whitespace_preserves_nested_template_content_test.go +28 -0
- package/linthost/format_whitespace_preserves_trailing_space_across_template_substitution_test.go +29 -0
- package/linthost/format_whitespace_preserves_trailing_spaces_inside_template_literal_test.go +35 -0
- package/linthost/format_whitespace_skips_empty_file_test.go +26 -0
- package/linthost/format_whitespace_skips_single_blank_line_test.go +26 -0
- package/linthost/format_whitespace_strips_leading_blank_lines_test.go +27 -0
- package/linthost/format_whitespace_strips_trailing_blank_lines_test.go +27 -0
- package/linthost/format_whitespace_trims_trailing_spaces_test.go +28 -0
- package/linthost/functional_helpers_test.go +88 -0
- package/linthost/functional_immutable_data_ignores_code_pattern_test.go +28 -0
- package/linthost/functional_immutable_data_rejects_property_assignment_test.go +25 -0
- package/linthost/functional_no_class_inheritance_rejects_extends_test.go +24 -0
- package/linthost/functional_no_classes_rejects_class_declaration_test.go +24 -0
- package/linthost/functional_no_conditional_statements_rejects_if_test.go +23 -0
- package/linthost/functional_no_expression_statements_rejects_call_test.go +23 -0
- package/linthost/functional_no_let_ignores_identifier_pattern_test.go +28 -0
- package/linthost/functional_no_let_rejects_let_declaration_test.go +24 -0
- package/linthost/functional_no_loop_statements_rejects_for_test.go +23 -0
- package/linthost/functional_no_mixed_types_check_interfaces_false_skips_interface_test.go +28 -0
- package/linthost/functional_no_mixed_types_check_interfaces_false_still_checks_type_literal_test.go +28 -0
- package/linthost/functional_no_mixed_types_check_type_literals_false_skips_type_literal_test.go +28 -0
- package/linthost/functional_no_mixed_types_check_type_literals_false_still_checks_interface_test.go +28 -0
- package/linthost/functional_no_mixed_types_rejects_method_and_property_test.go +23 -0
- package/linthost/functional_no_promise_reject_rejects_static_call_test.go +23 -0
- package/linthost/functional_no_return_void_allow_null_false_rejects_null_return_type_test.go +27 -0
- package/linthost/functional_no_return_void_allow_undefined_false_rejects_undefined_return_type_test.go +28 -0
- package/linthost/functional_no_return_void_allows_null_return_type_by_default_test.go +23 -0
- package/linthost/functional_no_return_void_allows_undefined_return_type_by_default_test.go +23 -0
- package/linthost/functional_no_return_void_ignore_inferred_types_keeps_annotated_bare_return_test.go +28 -0
- package/linthost/functional_no_return_void_ignore_inferred_types_reads_a_get_accessor_annotation_test.go +30 -0
- package/linthost/functional_no_return_void_ignore_inferred_types_skips_unannotated_bare_return_test.go +28 -0
- package/linthost/functional_no_return_void_ignore_inferred_types_stops_at_the_nearest_function_test.go +29 -0
- package/linthost/functional_no_return_void_rejects_void_annotation_test.go +23 -0
- package/linthost/functional_no_this_expressions_rejects_this_test.go +23 -0
- package/linthost/functional_no_throw_statements_rejects_throw_test.go +23 -0
- package/linthost/functional_no_try_statements_rejects_try_test.go +23 -0
- package/linthost/functional_parameters_ignores_identifier_pattern_test.go +27 -0
- package/linthost/functional_parameters_rejects_rest_parameter_test.go +25 -0
- package/linthost/functional_prefer_immutable_types_ignores_identifier_pattern_test.go +28 -0
- package/linthost/functional_prefer_immutable_types_rejects_array_type_test.go +23 -0
- package/linthost/functional_prefer_immutable_types_rejects_mutable_parameter_array_test.go +24 -0
- package/linthost/functional_prefer_property_signatures_rejects_method_signature_test.go +23 -0
- package/linthost/functional_prefer_readonly_type_allow_mutable_return_type_covers_call_signature_test.go +29 -0
- package/linthost/functional_prefer_readonly_type_allow_mutable_return_type_keeps_parameter_annotation_test.go +28 -0
- package/linthost/functional_prefer_readonly_type_allow_mutable_return_type_skips_return_annotation_test.go +28 -0
- package/linthost/functional_prefer_readonly_type_ignore_class_fields_only_keeps_method_parameter_test.go +34 -0
- package/linthost/functional_prefer_readonly_type_ignore_class_keeps_module_scope_checked_test.go +29 -0
- package/linthost/functional_prefer_readonly_type_ignore_class_skips_class_body_test.go +29 -0
- package/linthost/functional_prefer_readonly_type_ignore_collections_keeps_property_signature_test.go +28 -0
- package/linthost/functional_prefer_readonly_type_ignore_collections_skips_array_type_test.go +28 -0
- package/linthost/functional_prefer_readonly_type_ignore_interface_keeps_type_alias_member_test.go +28 -0
- package/linthost/functional_prefer_readonly_type_ignore_interface_skips_interface_member_test.go +28 -0
- package/linthost/functional_prefer_readonly_type_ignores_code_pattern_test.go +27 -0
- package/linthost/functional_prefer_readonly_type_rejects_array_type_test.go +23 -0
- package/linthost/functional_prefer_tacit_check_member_expressions_false_keeps_identifier_callee_test.go +27 -0
- package/linthost/functional_prefer_tacit_check_member_expressions_false_skips_member_callee_test.go +28 -0
- package/linthost/functional_prefer_tacit_rejects_single_argument_wrapper_test.go +24 -0
- package/linthost/functional_readonly_type_rejects_readonly_array_generic_test.go +23 -0
- package/linthost/functional_type_declaration_immutability_ignores_identifier_pattern_test.go +27 -0
- package/linthost/functional_type_declaration_immutability_rejects_mutable_interface_test.go +23 -0
- package/linthost/getter_return_follows_every_path_through_switch_try_and_loops_test.go +64 -0
- package/linthost/global_ignores_remove_an_imported_source_from_the_read_scope_test.go +60 -0
- package/linthost/graph_nodes.go +12 -2
- package/linthost/graph_nodes_drops_what_a_consumer_cannot_index_test.go +98 -0
- package/linthost/graph_nodes_publishes_nothing_without_a_publisher_test.go +51 -0
- package/linthost/grapheme_break_unicode_16_conformance_test.go +99 -0
- package/linthost/grouped_accessor_pairs_object_literal_message_test.go +75 -0
- package/linthost/guard_for_in_structural_matrix_test.go +74 -0
- package/linthost/has_nil_entry_distinguishes_malformed_and_valid_lists_test.go +35 -0
- package/linthost/has_nil_entry_returns_false_for_nil_list_test.go +26 -0
- package/linthost/helpers_test.go +910 -0
- package/linthost/hints.go +11 -1
- package/linthost/host.go +126 -43
- package/linthost/imported_tsx_source_joins_the_read_scope_test.go +67 -0
- package/linthost/indent_unit_uses_tab_width_when_positive_test.go +49 -0
- package/linthost/inline_resolver_carries_options_in_resolved_config_test.go +36 -0
- package/linthost/input_observation.go +571 -0
- package/linthost/invalid_contributor_range_cannot_panic_inline_directive_filtering_test.go +46 -0
- package/linthost/is_format_rule_detects_marker_interface_test.go +62 -0
- package/linthost/jsdoc_helpers_test.go +30 -0
- package/linthost/jsx_a11y_alt_text_allows_img_spread_props_test.go +21 -0
- package/linthost/jsx_a11y_alt_text_requires_img_alt_test.go +22 -0
- package/linthost/jsx_a11y_anchor_ambiguous_text_test.go +24 -0
- package/linthost/jsx_a11y_anchor_has_content_rejects_empty_anchor_test.go +25 -0
- package/linthost/jsx_a11y_anchor_is_valid_allows_spread_props_test.go +21 -0
- package/linthost/jsx_a11y_anchor_is_valid_rejects_hash_href_despite_spread_test.go +22 -0
- package/linthost/jsx_a11y_anchor_is_valid_rejects_hash_href_test.go +22 -0
- package/linthost/jsx_a11y_aria_activedescendant_has_tabindex_requires_focus_target_test.go +23 -0
- package/linthost/jsx_a11y_aria_props_rejects_unknown_prop_test.go +22 -0
- package/linthost/jsx_a11y_aria_proptypes_rejects_bad_boolean_test.go +23 -0
- package/linthost/jsx_a11y_aria_role_rejects_unknown_role_test.go +22 -0
- package/linthost/jsx_a11y_aria_unsupported_elements_rejects_meta_aria_test.go +23 -0
- package/linthost/jsx_a11y_aria_unsupported_elements_rejects_role_despite_spread_test.go +24 -0
- package/linthost/jsx_a11y_autocomplete_valid_allows_appropriate_input_type_test.go +29 -0
- package/linthost/jsx_a11y_autocomplete_valid_rejects_inappropriate_input_type_test.go +21 -0
- package/linthost/jsx_a11y_autocomplete_valid_rejects_invalid_token_sequence_test.go +26 -0
- package/linthost/jsx_a11y_autocomplete_valid_rejects_unknown_token_test.go +22 -0
- package/linthost/jsx_a11y_click_events_have_key_events_requires_keyboard_handler_test.go +21 -0
- package/linthost/jsx_a11y_control_has_associated_label_requires_button_label_test.go +21 -0
- package/linthost/jsx_a11y_heading_has_content_rejects_empty_heading_test.go +22 -0
- package/linthost/jsx_a11y_helpers_test.go +33 -0
- package/linthost/jsx_a11y_html_has_lang_allows_non_empty_lang_test.go +21 -0
- package/linthost/jsx_a11y_html_has_lang_allows_spread_props_test.go +24 -0
- package/linthost/jsx_a11y_html_has_lang_rejects_empty_lang_test.go +27 -0
- package/linthost/jsx_a11y_html_has_lang_requires_lang_test.go +21 -0
- package/linthost/jsx_a11y_iframe_has_title_allows_spread_props_test.go +23 -0
- package/linthost/jsx_a11y_iframe_has_title_requires_title_test.go +21 -0
- package/linthost/jsx_a11y_img_redundant_alt_rejects_image_word_despite_spread_test.go +25 -0
- package/linthost/jsx_a11y_img_redundant_alt_rejects_image_word_test.go +21 -0
- package/linthost/jsx_a11y_interactive_supports_focus_requires_tabindex_test.go +21 -0
- package/linthost/jsx_a11y_label_has_associated_control_requires_for_or_child_test.go +21 -0
- package/linthost/jsx_a11y_label_has_for_alias_matches_associated_control_test.go +21 -0
- package/linthost/jsx_a11y_lang_allows_valid_bcp47_tag_test.go +22 -0
- package/linthost/jsx_a11y_lang_rejects_empty_lang_test.go +20 -0
- package/linthost/jsx_a11y_lang_rejects_invalid_bcp47_tag_test.go +25 -0
- package/linthost/jsx_a11y_media_has_caption_requires_track_test.go +22 -0
- package/linthost/jsx_a11y_mouse_events_have_key_events_requires_focus_test.go +21 -0
- package/linthost/jsx_a11y_no_access_key_rejects_access_key_test.go +21 -0
- package/linthost/jsx_a11y_no_aria_hidden_on_focusable_rejects_hidden_button_test.go +21 -0
- package/linthost/jsx_a11y_no_autofocus_rejects_autofocus_test.go +21 -0
- package/linthost/jsx_a11y_no_distracting_elements_rejects_marquee_test.go +21 -0
- package/linthost/jsx_a11y_no_interactive_element_to_noninteractive_role_rejects_button_presentation_test.go +21 -0
- package/linthost/jsx_a11y_no_noninteractive_element_interactions_rejects_li_click_test.go +21 -0
- package/linthost/jsx_a11y_no_noninteractive_element_to_interactive_role_rejects_ul_button_test.go +21 -0
- package/linthost/jsx_a11y_no_noninteractive_tabindex_rejects_section_tabindex_test.go +21 -0
- package/linthost/jsx_a11y_no_redundant_roles_rejects_button_role_button_test.go +21 -0
- package/linthost/jsx_a11y_no_static_element_interactions_requires_role_test.go +21 -0
- package/linthost/jsx_a11y_prefer_tag_over_role_rejects_div_button_test.go +21 -0
- package/linthost/jsx_a11y_role_has_required_aria_props_allows_native_checkbox_test.go +21 -0
- package/linthost/jsx_a11y_role_has_required_aria_props_allows_spread_props_test.go +23 -0
- package/linthost/jsx_a11y_role_has_required_aria_props_requires_checkbox_checked_test.go +21 -0
- package/linthost/jsx_a11y_role_supports_aria_props_allows_explicit_button_pressed_test.go +21 -0
- package/linthost/jsx_a11y_role_supports_aria_props_allows_native_button_pressed_test.go +21 -0
- package/linthost/jsx_a11y_role_supports_aria_props_rejects_button_checked_test.go +21 -0
- package/linthost/jsx_a11y_rules_survive_spread_attributes_test.go +60 -0
- package/linthost/jsx_a11y_scope_rejects_scope_on_td_test.go +21 -0
- package/linthost/jsx_a11y_tabindex_no_positive_rejects_positive_tabindex_test.go +21 -0
- package/linthost/known_symbol_property_name_finds_iteration_and_disposal_protocol_members_test.go +112 -0
- package/linthost/legacy_custom_resolver_keeps_rule_options_fallback_test.go +45 -0
- package/linthost/lint_corpus_companions_belong_to_their_own_case_test.go +53 -0
- package/linthost/lint_corpus_diagnostics_are_attributed_to_the_main_source_test.go +51 -0
- package/linthost/lint_corpus_directives_reject_malformed_or_duplicate_markers_test.go +89 -0
- package/linthost/lint_corpus_discovery_classifies_every_typescript_suffix_test.go +56 -0
- package/linthost/lint_corpus_discovery_rejects_invalid_companion_contracts_test.go +50 -0
- package/linthost/lint_corpus_discovery_rejects_unclassified_sources_test.go +39 -0
- package/linthost/lint_corpus_expectation_parser_rejects_malformed_or_targetless_markers_test.go +46 -0
- package/linthost/lint_corpus_expectation_parser_resolves_line_and_jsx_block_markers_test.go +53 -0
- package/linthost/lint_corpus_filename_separators_share_materialized_source_identity_test.go +85 -0
- package/linthost/lint_corpus_loader_helpers_test.go +704 -0
- package/linthost/lint_corpus_project_selects_jsx_mode_for_included_tsx_sources_test.go +118 -0
- package/linthost/lint_corpus_skips_name_one_rule_and_one_harness_test.go +63 -0
- package/linthost/lint_fixture_corpus_test.go +166 -0
- package/linthost/lint_trace.go +202 -0
- package/linthost/lint_trace_preserves_raw_invocation_and_integrity_test.go +139 -0
- package/linthost/load_config_file_rejects_unsupported_extension_test.go +38 -0
- package/linthost/load_config_resolver_compact_globs_preserve_entry_policy_test.go +97 -0
- package/linthost/load_config_resolver_scopes_extends_options_in_engine_test.go +65 -0
- package/linthost/load_json_config_file_rejects_invalid_json_test.go +38 -0
- package/linthost/load_program_keeps_checker_pool_for_type_aware_rules_test.go +184 -0
- package/linthost/load_program_skips_checker_for_ast_only_rules_test.go +59 -0
- package/linthost/load_rule_config_configfile_overrides_discovery_test.go +51 -0
- package/linthost/load_rule_config_discovers_cwd_config_for_out_of_tree_tsconfig_test.go +46 -0
- package/linthost/load_rule_config_discovers_plain_lint_config_test.go +39 -0
- package/linthost/load_rule_config_extends_with_ignores_and_rules_ignores_globally_test.go +141 -0
- package/linthost/load_rule_config_honors_plugin_config_dir_env_test.go +53 -0
- package/linthost/load_rule_config_loads_json_config_file_test.go +55 -0
- package/linthost/load_rule_config_missing_config_error_names_search_origins_test.go +44 -0
- package/linthost/load_rule_config_preserves_json_pattern_precedence_test.go +80 -0
- package/linthost/load_rule_config_rejects_array_rules_test.go +34 -0
- package/linthost/load_rule_config_rejects_empty_extends_test.go +34 -0
- package/linthost/load_rule_config_rejects_extends_cycle_between_two_configs_test.go +71 -0
- package/linthost/load_rule_config_rejects_missing_discovered_config_test.go +37 -0
- package/linthost/load_rule_config_rejects_overly_deep_extends_chain_test.go +53 -0
- package/linthost/load_rule_config_rejects_self_referential_extends_test.go +49 -0
- package/linthost/load_rule_config_resolves_configfile_relative_to_plugin_config_dir_env_test.go +46 -0
- package/linthost/load_rule_config_resolves_linear_extends_chain_test.go +81 -0
- package/linthost/load_rules_ignores_non_lint_plugin_payload_test.go +33 -0
- package/linthost/loader_module_option_follows_the_config_package_type_test.go +103 -0
- package/linthost/loader_rootdir_contains_loader_and_config_test.go +59 -0
- package/linthost/loader_temp_base_stays_on_config_volume_test.go +35 -0
- package/linthost/logic_rules_cover_boolean_call_arguments_undefined_typeof_negative_zero_and_number_nan_test.go +43 -0
- package/linthost/lookup_rule_returns_registered_implementation_or_nil_test.go +49 -0
- package/linthost/lsp.go +185 -34
- package/linthost/lsp_apply_suggestion_rejects_stale_source_test.go +49 -0
- package/linthost/lsp_apply_suggestion_resolves_junction_project_link_test.go +33 -0
- package/linthost/lsp_apply_suggestion_resolves_logical_project_link_test.go +35 -0
- package/linthost/lsp_await_thenable_suggestion_executes_exact_token_test.go +52 -0
- package/linthost/lsp_ban_ts_comment_suggestion_preserves_crlf_block_test.go +52 -0
- package/linthost/lsp_code_action_helpers_test.go +55 -0
- package/linthost/lsp_code_actions_fail_closed_for_invalid_quickfix_range_test.go +88 -0
- package/linthost/lsp_code_actions_reject_more_specific_context_only_test.go +37 -0
- package/linthost/lsp_code_actions_returns_empty_for_node_modules_target_test.go +44 -0
- package/linthost/lsp_code_actions_returns_empty_for_outside_cwd_target_test.go +45 -0
- package/linthost/lsp_code_actions_short_circuits_unowned_context_only_test.go +46 -0
- package/linthost/lsp_code_actions_split_lint_and_format_commands_test.go +41 -0
- package/linthost/lsp_command_discovery_reports_owned_commands_and_kinds_test.go +67 -0
- package/linthost/lsp_command_helpers_test.go +113 -0
- package/linthost/lsp_command_workspace_preserves_nested_dependency_scopes_test.go +77 -0
- package/linthost/lsp_commands_accept_windows_short_cwd_test.go +62 -0
- package/linthost/lsp_diagnostic_omits_code_description_for_contributor_rule_test.go +81 -0
- package/linthost/lsp_diagnostic_tags_drop_unknown_values_test.go +41 -0
- package/linthost/lsp_diagnostic_wire_drops_code_description_key_when_unmapped_test.go +65 -0
- package/linthost/lsp_diagnostics_link_rule_codes_to_documentation_test.go +84 -0
- package/linthost/lsp_document_write_scope_preserves_project_and_sibling_boundaries_test.go +68 -0
- package/linthost/lsp_execute_command_applies_utf16_edit_after_non_bmp_prefix_test.go +48 -0
- package/linthost/lsp_execute_command_cascades_format_fixes_without_mutating_disk_test.go +50 -0
- package/linthost/lsp_execute_command_cascades_lint_fixes_without_mutating_disk_test.go +48 -0
- package/linthost/lsp_execute_command_copies_read_only_file_as_writable_test.go +46 -0
- package/linthost/lsp_execute_command_maps_absolute_config_file_into_temp_workspace_test.go +40 -0
- package/linthost/lsp_execute_command_materializes_duplicate_symlinked_directories_test.go +57 -0
- package/linthost/lsp_execute_command_materializes_junctioned_directory_without_mutating_original_test.go +61 -0
- package/linthost/lsp_execute_command_materializes_symlink_target_without_mutating_original_test.go +55 -0
- package/linthost/lsp_execute_command_materializes_symlinked_directory_without_mutating_original_test.go +56 -0
- package/linthost/lsp_execute_command_rejects_target_outside_cwd_before_read_test.go +61 -0
- package/linthost/lsp_execute_command_returns_null_for_node_modules_target_test.go +59 -0
- package/linthost/lsp_execute_command_returns_null_when_no_edits_test.go +51 -0
- package/linthost/lsp_execute_command_splits_lint_and_format_edits_test.go +43 -0
- package/linthost/lsp_fix_all_leaves_suggestion_only_rewrites_unchanged_test.go +37 -0
- package/linthost/lsp_format_buffer_formats_missing_disk_file_test.go +42 -0
- package/linthost/lsp_format_buffer_helpers_test.go +68 -0
- package/linthost/lsp_format_buffer_ignores_disk_content_test.go +52 -0
- package/linthost/lsp_format_buffer_in_memory_test.go +47 -0
- package/linthost/lsp_format_buffer_type_aware_contributor_test.go +142 -0
- package/linthost/lsp_format_paths_honor_entry_ignores_test.go +45 -0
- package/linthost/lsp_format_paths_use_canonical_defaults_test.go +72 -0
- package/linthost/lsp_format_paths_use_defaults_without_format_block_test.go +28 -0
- package/linthost/lsp_format_paths_use_editor_language_overrides_test.go +34 -0
- package/linthost/lsp_hints_publishes_jsdoc_check_tag_names_corpus_test.go +56 -0
- package/linthost/lsp_hints_skips_the_program_when_nothing_publishes_test.go +46 -0
- package/linthost/lsp_hints_still_loads_the_program_for_a_declared_publisher_test.go +42 -0
- package/linthost/lsp_logical_project_link_helpers_test.go +127 -0
- package/linthost/lsp_position_columns_count_utf16_across_planes_test.go +107 -0
- package/linthost/lsp_position_counts_non_bmp_as_two_utf16_units_test.go +26 -0
- package/linthost/lsp_prefer_as_const_suggestion_executes_selected_range_test.go +51 -0
- package/linthost/lsp_project_diagnostics_recomputes_external_state_without_document_test.go +187 -0
- package/linthost/lsp_serve_answers_hints_from_the_resident_daemon_test.go +73 -0
- package/linthost/lsp_switch_exhaustiveness_suggestions_preserve_default_anchors_test.go +206 -0
- package/linthost/match_any_pattern_accepts_native_and_slash_separators_test.go +47 -0
- package/linthost/match_any_pattern_handles_brace_expansion_test.go +43 -0
- package/linthost/match_any_pattern_matches_dot_directory_globs_test.go +44 -0
- package/linthost/max_nested_callbacks_counts_only_functions_passed_to_calls_test.go +46 -0
- package/linthost/migrated_no_misused_promises_helpers_test.go +30 -0
- package/linthost/migrated_no_unused_expressions_helpers_test.go +50 -0
- package/linthost/migrated_typed_rule_helpers_test.go +46 -0
- package/linthost/misc_testing_library_rules_test.go +63 -0
- package/linthost/mixed_diagnostics_render_empty_is_silent_test.go +29 -0
- package/linthost/mixed_diagnostics_render_interleaves_parser_and_lint_test.go +51 -0
- package/linthost/mixed_diagnostics_render_orders_files_and_ties_test.go +58 -0
- package/linthost/new_print_context_zero_print_width_applies_defaults_test.go +36 -0
- package/linthost/no_array_delete_asks_the_type_not_the_subscript_test.go +70 -0
- package/linthost/no_await_in_loop_complete_semantics_test.go +205 -0
- package/linthost/no_base_to_string_test.go +48 -0
- package/linthost/no_class_assign_test.go +217 -0
- package/linthost/no_container_ignores_unrelated_container_binding_test.go +33 -0
- package/linthost/no_deprecated_test.go +45 -0
- package/linthost/no_dupe_class_members_allows_typescript_overload_signatures_test.go +41 -0
- package/linthost/no_dupe_class_members_rejects_accessor_data_collisions_test.go +28 -0
- package/linthost/no_dupe_else_if_logical_coverage_test.go +152 -0
- package/linthost/no_dupe_keys_computed_key_static_resolution_test.go +72 -0
- package/linthost/no_duplicate_imports_allow_separate_type_imports_allows_value_plus_type_import_test.go +30 -0
- package/linthost/no_duplicate_imports_allow_separate_type_imports_still_reports_type_pairs_test.go +30 -0
- package/linthost/no_duplicate_imports_allow_separate_type_imports_still_reports_value_pairs_test.go +29 -0
- package/linthost/no_duplicate_imports_allows_inline_type_specifier_beside_type_import_test.go +29 -0
- package/linthost/no_duplicate_imports_allows_named_and_namespace_value_imports_test.go +31 -0
- package/linthost/no_duplicate_imports_allows_type_default_and_type_named_imports_test.go +31 -0
- package/linthost/no_duplicate_imports_allows_type_namespace_and_type_named_imports_test.go +28 -0
- package/linthost/no_duplicate_imports_classifies_inline_type_specifier_as_value_test.go +31 -0
- package/linthost/no_duplicate_imports_helpers_test.go +78 -0
- package/linthost/no_duplicate_imports_ignores_misspelled_option_keys_test.go +30 -0
- package/linthost/no_duplicate_imports_ignores_reexports_by_default_test.go +32 -0
- package/linthost/no_duplicate_imports_include_exports_allows_export_star_beside_named_import_test.go +31 -0
- package/linthost/no_duplicate_imports_include_exports_allows_export_star_beside_namespace_reexport_test.go +29 -0
- package/linthost/no_duplicate_imports_include_exports_allows_namespace_reexport_beside_named_import_test.go +29 -0
- package/linthost/no_duplicate_imports_include_exports_reports_both_pairings_on_one_declaration_test.go +34 -0
- package/linthost/no_duplicate_imports_include_exports_reports_export_star_beside_side_effect_import_test.go +35 -0
- package/linthost/no_duplicate_imports_include_exports_reports_import_after_reexport_test.go +30 -0
- package/linthost/no_duplicate_imports_include_exports_reports_reexport_after_import_test.go +30 -0
- package/linthost/no_duplicate_imports_include_exports_reports_repeated_export_star_test.go +30 -0
- package/linthost/no_duplicate_imports_include_exports_reports_second_reexport_test.go +29 -0
- package/linthost/no_duplicate_imports_include_exports_reports_type_reexport_after_value_import_test.go +30 -0
- package/linthost/no_duplicate_imports_include_exports_skips_local_export_without_module_test.go +31 -0
- package/linthost/no_duplicate_imports_include_exports_treats_empty_reexport_clause_as_side_effect_test.go +31 -0
- package/linthost/no_duplicate_imports_include_exports_with_allow_separate_allows_type_reexport_test.go +30 -0
- package/linthost/no_duplicate_imports_preserves_migrated_json_tuple_options_test.go +47 -0
- package/linthost/no_duplicate_imports_reports_default_then_named_value_imports_test.go +31 -0
- package/linthost/no_duplicate_imports_reports_default_then_namespace_value_imports_test.go +30 -0
- package/linthost/no_duplicate_imports_reports_each_later_duplicate_import_test.go +31 -0
- package/linthost/no_duplicate_imports_reports_nonadjacent_duplicate_value_imports_test.go +30 -0
- package/linthost/no_duplicate_imports_reports_repeated_side_effect_imports_test.go +29 -0
- package/linthost/no_duplicate_imports_reports_side_effect_import_after_named_import_test.go +30 -0
- package/linthost/no_duplicate_imports_reports_two_namespace_value_imports_test.go +29 -0
- package/linthost/no_duplicate_imports_reports_two_type_default_imports_test.go +29 -0
- package/linthost/no_duplicate_imports_reports_value_default_then_type_named_import_test.go +33 -0
- package/linthost/no_duplicate_imports_reports_value_then_type_named_import_by_default_test.go +30 -0
- package/linthost/no_duplicate_imports_skips_empty_module_specifiers_test.go +30 -0
- package/linthost/no_duplicate_imports_treats_default_with_empty_named_clause_as_default_test.go +30 -0
- package/linthost/no_duplicate_imports_treats_empty_named_import_clause_as_side_effect_test.go +32 -0
- package/linthost/no_duplicate_imports_trims_module_specifier_whitespace_test.go +29 -0
- package/linthost/no_else_return_allow_else_if_false_reports_else_if_test.go +60 -0
- package/linthost/no_else_return_allows_break_before_else_test.go +34 -0
- package/linthost/no_else_return_allows_continue_before_else_test.go +34 -0
- package/linthost/no_else_return_allows_else_if_return_chain_test.go +34 -0
- package/linthost/no_else_return_allows_throw_before_else_test.go +32 -0
- package/linthost/no_else_return_reports_once_on_terminal_else_test.go +31 -0
- package/linthost/no_else_return_reports_plain_else_after_return_test.go +27 -0
- package/linthost/no_empty_character_class_semantics_test.go +62 -0
- package/linthost/no_empty_complete_semantics_test.go +89 -0
- package/linthost/no_empty_function_comments_preserve_every_kind_test.go +35 -0
- package/linthost/no_empty_function_options_test.go +60 -0
- package/linthost/no_empty_function_typescript_exceptions_and_category_boundaries_test.go +248 -0
- package/linthost/no_empty_static_block_comment_boundaries_test.go +37 -0
- package/linthost/no_extend_native_covers_assignment_and_static_callee_forms_test.go +52 -0
- package/linthost/no_extend_native_covers_every_native_constructor_with_a_prototype_test.go +45 -0
- package/linthost/no_extend_native_define_property_and_computed_test.go +71 -0
- package/linthost/no_extend_native_respects_constructor_bindings_test.go +48 -0
- package/linthost/no_extra_bind_function_body_test.go +72 -0
- package/linthost/no_extra_bind_offers_withheld_removal_as_suggestion_test.go +43 -0
- package/linthost/no_extra_bind_preserves_throwing_receiver_reads_test.go +32 -0
- package/linthost/no_extra_boolean_cast_declines_fix_for_comment_between_bangs_test.go +28 -0
- package/linthost/no_extra_boolean_cast_declines_fix_for_leading_comment_in_call_test.go +29 -0
- package/linthost/no_extra_boolean_cast_declines_fix_for_trailing_comment_in_call_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_boolean_call_in_boolean_context_test.go +43 -0
- package/linthost/no_extra_boolean_cast_fix_collapses_nested_boolean_call_test.go +30 -0
- package/linthost/no_extra_boolean_cast_fix_double_bang_in_boolean_context_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_keeps_bare_identifier_under_bang_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_keeps_parenthesized_argument_without_double_wrap_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_parenthesizes_arrow_argument_in_ternary_condition_test.go +30 -0
- package/linthost/no_extra_boolean_cast_fix_parenthesizes_assignment_in_ternary_condition_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_parenthesizes_await_argument_under_bang_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_parenthesizes_logical_operand_under_bang_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_parenthesizes_nested_ternary_condition_test.go +30 -0
- package/linthost/no_extra_boolean_cast_fix_parenthesizes_yield_argument_under_bang_test.go +28 -0
- package/linthost/no_extra_boolean_cast_fix_preserves_comment_inside_argument_test.go +29 -0
- package/linthost/no_extra_boolean_cast_fix_skips_wrap_for_logical_ternary_condition_test.go +29 -0
- package/linthost/no_extra_boolean_cast_fix_skips_wrap_inside_explicit_parens_under_bang_test.go +29 -0
- package/linthost/no_extra_boolean_cast_keeps_meaningful_double_bang_outside_boolean_context_test.go +28 -0
- package/linthost/no_extra_boolean_cast_offers_withheld_splice_as_suggestion_test.go +37 -0
- package/linthost/no_extra_boolean_cast_preserves_shadowed_converters_test.go +76 -0
- package/linthost/no_fallthrough_accepts_adjacent_empty_case_labels_test.go +28 -0
- package/linthost/no_fallthrough_accepts_block_marker_with_trailing_unrelated_comment_test.go +32 -0
- package/linthost/no_fallthrough_accepts_break_in_try_with_normal_finally_test.go +33 -0
- package/linthost/no_fallthrough_accepts_breaking_catch_after_throwing_try_test.go +34 -0
- package/linthost/no_fallthrough_accepts_continue_terminating_case_test.go +33 -0
- package/linthost/no_fallthrough_accepts_do_while_with_always_throwing_body_test.go +33 -0
- package/linthost/no_fallthrough_accepts_empty_case_with_same_line_comment_test.go +29 -0
- package/linthost/no_fallthrough_accepts_if_else_terminating_every_path_test.go +38 -0
- package/linthost/no_fallthrough_accepts_infinite_for_without_break_test.go +31 -0
- package/linthost/no_fallthrough_accepts_infinite_loop_with_labeled_break_to_outer_test.go +35 -0
- package/linthost/no_fallthrough_accepts_infinite_while_without_break_test.go +31 -0
- package/linthost/no_fallthrough_accepts_labeled_break_to_outer_loop_test.go +34 -0
- package/linthost/no_fallthrough_accepts_marked_empty_case_with_blank_gap_test.go +30 -0
- package/linthost/no_fallthrough_accepts_marked_fallthrough_variants_test.go +43 -0
- package/linthost/no_fallthrough_accepts_marker_in_sole_empty_block_test.go +30 -0
- package/linthost/no_fallthrough_accepts_marker_inside_sole_block_statement_test.go +32 -0
- package/linthost/no_fallthrough_accepts_nested_switch_terminating_on_every_path_test.go +38 -0
- package/linthost/no_fallthrough_accepts_terminating_finally_test.go +34 -0
- package/linthost/no_fallthrough_accepts_terminating_try_and_catch_with_normal_finally_test.go +41 -0
- package/linthost/no_fallthrough_accepts_unreachable_labeled_break_in_while_false_test.go +39 -0
- package/linthost/no_fallthrough_accepts_unreachable_labeled_break_in_while_zero_test.go +37 -0
- package/linthost/no_fallthrough_accepts_while_bigint_one_literal_test.go +31 -0
- package/linthost/no_fallthrough_accepts_while_nonempty_string_literal_test.go +31 -0
- package/linthost/no_fallthrough_accepts_while_numeric_one_literal_test.go +31 -0
- package/linthost/no_fallthrough_accepts_while_regex_literal_test.go +31 -0
- package/linthost/no_fallthrough_accepts_with_statement_body_break_test.go +33 -0
- package/linthost/no_fallthrough_allow_empty_case_permits_blank_line_gap_test.go +29 -0
- package/linthost/no_fallthrough_command_composes_nested_try_finally_test.go +124 -0
- package/linthost/no_fallthrough_command_composes_statement_and_loop_throw_edges_test.go +108 -0
- package/linthost/no_fallthrough_command_helpers_test.go +68 -0
- package/linthost/no_fallthrough_command_preserves_bigint_literal_truthiness_test.go +82 -0
- package/linthost/no_fallthrough_command_preserves_catch_break_continue_test.go +66 -0
- package/linthost/no_fallthrough_command_preserves_code_path_boundaries_test.go +136 -0
- package/linthost/no_fallthrough_command_preserves_jsx_code_path_boundaries_test.go +68 -0
- package/linthost/no_fallthrough_command_preserves_markers_across_catch_reachability_test.go +40 -0
- package/linthost/no_fallthrough_command_tracks_binding_reference_edges_test.go +70 -0
- package/linthost/no_fallthrough_command_tracks_return_exception_edges_test.go +79 -0
- package/linthost/no_fallthrough_custom_pattern_replaces_default_marker_test.go +32 -0
- package/linthost/no_fallthrough_directive_suppression_still_wins_test.go +32 -0
- package/linthost/no_fallthrough_helpers_test.go +55 -0
- package/linthost/no_fallthrough_honors_custom_comment_pattern_test.go +30 -0
- package/linthost/no_fallthrough_ignores_switch_without_clauses_test.go +24 -0
- package/linthost/no_fallthrough_ignores_trailing_unreachable_statements_test.go +33 -0
- package/linthost/no_fallthrough_ignores_unreachable_break_in_infinite_loop_test.go +35 -0
- package/linthost/no_fallthrough_invalid_comment_pattern_falls_back_to_default_test.go +31 -0
- package/linthost/no_fallthrough_never_reports_last_open_case_test.go +27 -0
- package/linthost/no_fallthrough_rejects_breakable_conditional_while_test.go +33 -0
- package/linthost/no_fallthrough_rejects_directive_comment_as_marker_test.go +31 -0
- package/linthost/no_fallthrough_rejects_do_while_exited_by_labeled_continue_test.go +34 -0
- package/linthost/no_fallthrough_rejects_do_while_exited_by_unlabeled_continue_test.go +33 -0
- package/linthost/no_fallthrough_rejects_do_while_with_break_test.go +32 -0
- package/linthost/no_fallthrough_rejects_empty_case_followed_by_blank_line_test.go +30 -0
- package/linthost/no_fallthrough_rejects_empty_case_with_comment_line_gap_test.go +31 -0
- package/linthost/no_fallthrough_rejects_empty_statement_case_despite_allow_empty_case_test.go +29 -0
- package/linthost/no_fallthrough_rejects_for_of_with_always_throwing_body_test.go +33 -0
- package/linthost/no_fallthrough_rejects_if_else_with_one_open_branch_test.go +36 -0
- package/linthost/no_fallthrough_rejects_if_without_else_test.go +33 -0
- package/linthost/no_fallthrough_rejects_infinite_loop_broken_by_own_label_test.go +32 -0
- package/linthost/no_fallthrough_rejects_infinite_while_containing_break_test.go +32 -0
- package/linthost/no_fallthrough_rejects_labeled_block_broken_by_own_label_test.go +33 -0
- package/linthost/no_fallthrough_rejects_lint_directive_comment_as_marker_test.go +31 -0
- package/linthost/no_fallthrough_rejects_marker_before_last_statement_test.go +32 -0
- package/linthost/no_fallthrough_rejects_marker_in_block_that_is_not_sole_statement_test.go +31 -0
- package/linthost/no_fallthrough_rejects_marker_inside_nested_inner_block_test.go +31 -0
- package/linthost/no_fallthrough_rejects_nested_switch_exited_by_inner_break_test.go +34 -0
- package/linthost/no_fallthrough_rejects_nested_switch_without_default_test.go +36 -0
- package/linthost/no_fallthrough_rejects_non_literal_constant_condition_test.go +33 -0
- package/linthost/no_fallthrough_rejects_normally_completing_catch_test.go +34 -0
- package/linthost/no_fallthrough_rejects_open_try_with_normal_finally_test.go +34 -0
- package/linthost/no_fallthrough_rejects_return_inside_arrow_test.go +32 -0
- package/linthost/no_fallthrough_rejects_return_inside_function_declaration_test.go +33 -0
- package/linthost/no_fallthrough_rejects_return_inside_function_expression_test.go +33 -0
- package/linthost/no_fallthrough_rejects_unrelated_comment_in_sole_empty_block_test.go +29 -0
- package/linthost/no_fallthrough_rejects_unrelated_trailing_comment_test.go +30 -0
- package/linthost/no_fallthrough_reports_case_message_after_leading_default_test.go +37 -0
- package/linthost/no_fallthrough_reports_default_message_for_default_clause_test.go +35 -0
- package/linthost/no_fallthrough_reports_each_unmarked_transition_once_test.go +32 -0
- package/linthost/no_fallthrough_reports_inner_and_outer_switch_transitions_test.go +37 -0
- package/linthost/no_fallthrough_reports_unused_comment_after_terminating_if_else_test.go +46 -0
- package/linthost/no_fallthrough_reports_unused_comment_inside_sole_block_test.go +36 -0
- package/linthost/no_fallthrough_reports_unused_fallthrough_comment_test.go +38 -0
- package/linthost/no_fallthrough_reports_unused_marker_after_unreachable_catch_test.go +37 -0
- package/linthost/no_fallthrough_requires_marker_to_be_last_comment_test.go +32 -0
- package/linthost/no_fallthrough_unused_check_accepts_real_fallthrough_marker_test.go +30 -0
- package/linthost/no_fallthrough_unused_check_ignores_non_marker_comment_test.go +31 -0
- package/linthost/no_fallthrough_unused_check_skips_last_case_marker_test.go +28 -0
- package/linthost/no_fallthrough_unused_check_skips_reachable_empty_case_test.go +30 -0
- package/linthost/no_fallthrough_unused_comment_ignored_by_default_test.go +31 -0
- package/linthost/no_floating_promises_credits_a_handler_through_an_optional_chain_test.go +55 -0
- package/linthost/no_floating_promises_default_semantics_test.go +48 -0
- package/linthost/no_floating_promises_detects_index_value_type_parameters_test.go +145 -0
- package/linthost/no_floating_promises_handler_chains_test.go +53 -0
- package/linthost/no_floating_promises_helpers_test.go +43 -0
- package/linthost/no_floating_promises_iife_test.go +32 -0
- package/linthost/no_floating_promises_javascript_generic_defaults_test.go +177 -0
- package/linthost/no_floating_promises_mixed_receiver_results_test.go +222 -0
- package/linthost/no_floating_promises_options_test.go +56 -0
- package/linthost/no_floating_promises_preserves_call_resolution_test.go +291 -0
- package/linthost/no_floating_promises_preserves_candidate_context_literals_test.go +289 -0
- package/linthost/no_floating_promises_preserves_contextual_callback_returns_test.go +208 -0
- package/linthost/no_floating_promises_preserves_migrated_default_contexts_test.go +20 -0
- package/linthost/no_floating_promises_preserves_optional_callback_overloads_test.go +42 -0
- package/linthost/no_floating_promises_preserves_subtype_overload_priority_test.go +40 -0
- package/linthost/no_floating_promises_rejects_inapplicable_generic_receiver_branches_test.go +254 -0
- package/linthost/no_floating_promises_rejects_opaque_mapped_type_parameters_test.go +159 -0
- package/linthost/no_floating_promises_safe_calls_in_composites_specifiers_test.go +43 -0
- package/linthost/no_floating_promises_safe_calls_in_composites_test.go +88 -0
- package/linthost/no_floating_promises_specifiers_test.go +108 -0
- package/linthost/no_floating_promises_test.go +46 -0
- package/linthost/no_floating_promises_thenable_scope_follows_check_thenables_test.go +87 -0
- package/linthost/no_floating_promises_type_shapes_test.go +100 -0
- package/linthost/no_for_in_array_test.go +49 -0
- package/linthost/no_func_assign_test.go +195 -0
- package/linthost/no_import_assign_binding_identity_and_complete_writes_test.go +140 -0
- package/linthost/no_import_assign_binding_identity_helpers_test.go +114 -0
- package/linthost/no_import_assign_ignores_resolved_shadows_and_deeper_values_test.go +118 -0
- package/linthost/no_import_assign_recognizes_every_assignment_operator_test.go +36 -0
- package/linthost/no_import_assign_test.go +48 -0
- package/linthost/no_inner_declarations_both_mode_test.go +73 -0
- package/linthost/no_inner_declarations_default_allows_strict_script_block_functions_test.go +33 -0
- package/linthost/no_inner_declarations_default_module_test.go +35 -0
- package/linthost/no_inner_declarations_default_strict_context_test.go +93 -0
- package/linthost/no_inner_declarations_disallow_block_functions_test.go +57 -0
- package/linthost/no_inner_declarations_helpers_test.go +32 -0
- package/linthost/no_invalid_this_accepts_class_field_initializers_test.go +32 -0
- package/linthost/no_irregular_whitespace_allows_string_literals_and_reports_code_test.go +44 -0
- package/linthost/no_loop_func_allows_safe_bindings_and_excluded_headers_test.go +67 -0
- package/linthost/no_loop_func_allows_using_bindings_test.go +52 -0
- package/linthost/no_loop_func_checks_all_runtime_function_forms_test.go +52 -0
- package/linthost/no_loop_func_helpers_test.go +55 -0
- package/linthost/no_loop_func_iife_boundaries_test.go +41 -0
- package/linthost/no_loop_func_reports_only_unsafe_references_test.go +83 -0
- package/linthost/no_loop_func_test.go +68 -0
- package/linthost/no_loop_func_tracks_write_forms_and_symbol_identity_test.go +49 -0
- package/linthost/no_loop_func_treats_class_field_initializers_as_variable_scopes_test.go +46 -0
- package/linthost/no_loss_of_precision_accepts_exact_unsafe_integer_test.go +36 -0
- package/linthost/no_loss_of_precision_handles_every_number_syntax_test.go +93 -0
- package/linthost/no_loss_of_precision_rejects_huge_decimal_integer_test.go +28 -0
- package/linthost/no_meaningless_void_operator_test.go +48 -0
- package/linthost/no_misused_promises_arguments_test.go +82 -0
- package/linthost/no_misused_promises_defaults_test.go +89 -0
- package/linthost/no_misused_promises_helpers_test.go +135 -0
- package/linthost/no_misused_promises_native_array_predicates_test.go +91 -0
- package/linthost/no_misused_promises_options_test.go +103 -0
- package/linthost/no_misused_promises_preserves_migrated_default_contexts_test.go +23 -0
- package/linthost/no_misused_promises_test.go +53 -0
- package/linthost/no_mixed_operators_allow_same_precedence_false_flags_additive_test.go +42 -0
- package/linthost/no_mixed_operators_allows_bitwise_beside_comparison_test.go +26 -0
- package/linthost/no_mixed_operators_allows_bitwise_beside_logical_test.go +25 -0
- package/linthost/no_mixed_operators_allows_parenthesized_inner_test.go +27 -0
- package/linthost/no_mixed_operators_allows_relational_same_precedence_test.go +27 -0
- package/linthost/no_mixed_operators_allows_same_operator_chain_test.go +26 -0
- package/linthost/no_mixed_operators_allows_same_precedence_multiplicative_test.go +26 -0
- package/linthost/no_mixed_operators_allows_ternary_beside_logical_by_default_test.go +27 -0
- package/linthost/no_mixed_operators_custom_groups_omitting_arithmetic_allow_test.go +28 -0
- package/linthost/no_mixed_operators_custom_groups_ternary_flags_logical_test.go +43 -0
- package/linthost/no_mixed_operators_flags_logical_and_left_of_or_test.go +27 -0
- package/linthost/no_mixed_operators_flags_logical_and_right_of_or_test.go +27 -0
- package/linthost/no_mixed_operators_flags_multiplicative_within_additive_test.go +26 -0
- package/linthost/no_mixed_operators_flags_relational_within_equality_test.go +28 -0
- package/linthost/no_mixed_operators_flags_shift_within_bitwise_test.go +28 -0
- package/linthost/no_mixed_operators_reports_both_operator_tokens_test.go +60 -0
- package/linthost/no_namespace_exempts_global_augmentation_test.go +52 -0
- package/linthost/no_param_reassign_complete_semantics_test.go +75 -0
- package/linthost/no_param_reassign_default_props_leaves_property_writes_alone_test.go +38 -0
- package/linthost/no_param_reassign_helpers_test.go +63 -0
- package/linthost/no_param_reassign_options_validation_helpers_test.go +12 -0
- package/linthost/no_param_reassign_options_validation_test.go +58 -0
- package/linthost/no_param_reassign_options_validator_rejects_every_invalid_schema_boundary_test.go +109 -0
- package/linthost/no_param_reassign_props_follows_official_mutation_boundaries_and_ignores_test.go +89 -0
- package/linthost/no_param_reassign_test.go +52 -0
- package/linthost/no_param_reassign_uses_checker_identity_across_nested_scopes_test.go +73 -0
- package/linthost/no_promise_executor_return_allow_void_test.go +80 -0
- package/linthost/no_promise_executor_return_complete_semantics_test.go +145 -0
- package/linthost/no_promise_executor_return_test.go +35 -0
- package/linthost/no_promise_in_fire_event_test.go +36 -0
- package/linthost/no_redeclare_relates_first_definition_test.go +55 -0
- package/linthost/no_render_in_lifecycle_test.go +35 -0
- package/linthost/no_restricted_imports_allow_type_imports_handles_whole_and_inline_type_syntax_test.go +57 -0
- package/linthost/no_restricted_imports_allowed_name_pattern_covers_imports_and_reexports_test.go +32 -0
- package/linthost/no_restricted_imports_allowed_names_reject_only_the_complement_test.go +43 -0
- package/linthost/no_restricted_imports_exact_paths_cover_every_static_module_form_test.go +77 -0
- package/linthost/no_restricted_imports_exact_paths_preserve_module_specifier_whitespace_test.go +31 -0
- package/linthost/no_restricted_imports_groups_keep_gitignore_anchors_globstars_and_unicode_test.go +78 -0
- package/linthost/no_restricted_imports_matches_source_names_and_reports_exact_specifier_ranges_test.go +71 -0
- package/linthost/no_restricted_imports_missing_and_empty_restrictions_are_no_op_test.go +42 -0
- package/linthost/no_restricted_imports_options_helpers_test.go +76 -0
- package/linthost/no_restricted_imports_patterns_honor_negation_case_regex_and_name_patterns_test.go +46 -0
- package/linthost/no_restricted_imports_positional_paths_do_not_reach_dynamic_imports_test.go +32 -0
- package/linthost/no_restricted_imports_string_patterns_keep_gitignore_parent_negation_semantics_test.go +30 -0
- package/linthost/no_restricted_imports_test.go +14 -0
- package/linthost/no_restricted_imports_validator_accepts_every_official_option_branch_test.go +48 -0
- package/linthost/no_restricted_imports_validator_rejects_malformed_configuration_at_the_boundary_test.go +64 -0
- package/linthost/no_restricted_syntax_applies_every_configured_entry_and_custom_message_test.go +45 -0
- package/linthost/no_restricted_syntax_checks_structured_option_uniqueness_by_fields_test.go +40 -0
- package/linthost/no_restricted_syntax_coerces_empty_node_lists_for_numeric_comparisons_test.go +34 -0
- package/linthost/no_restricted_syntax_compares_strings_as_utf16_test.go +37 -0
- package/linthost/no_restricted_syntax_distinguishes_assignment_patterns_from_literals_test.go +81 -0
- package/linthost/no_restricted_syntax_distinguishes_object_binding_properties_from_rest_test.go +44 -0
- package/linthost/no_restricted_syntax_distinguishes_rest_and_spread_aliases_test.go +54 -0
- package/linthost/no_restricted_syntax_exposes_computed_keys_and_property_value_paths_test.go +34 -0
- package/linthost/no_restricted_syntax_exposes_scalar_statement_bodies_test.go +43 -0
- package/linthost/no_restricted_syntax_exposes_switch_case_test_and_consequent_test.go +36 -0
- package/linthost/no_restricted_syntax_helpers_test.go +56 -0
- package/linthost/no_restricted_syntax_inherits_declare_from_variable_statements_test.go +42 -0
- package/linthost/no_restricted_syntax_keeps_template_and_literal_aliases_distinct_test.go +32 -0
- package/linthost/no_restricted_syntax_limits_boolean_properties_and_es_tree_aliases_test.go +51 -0
- package/linthost/no_restricted_syntax_matches_attributes_nested_paths_regex_types_and_lengths_test.go +47 -0
- package/linthost/no_restricted_syntax_matches_classes_alternatives_and_type_script_nodes_test.go +61 -0
- package/linthost/no_restricted_syntax_matches_combinators_fields_pseudos_and_subjects_test.go +111 -0
- package/linthost/no_restricted_syntax_matches_indexed_paths_literal_types_and_prefix_test.go +169 -0
- package/linthost/no_restricted_syntax_preserves_null_across_nested_paths_test.go +35 -0
- package/linthost/no_restricted_syntax_rejects_invalid_configuration_before_dispatch_test.go +58 -0
- package/linthost/no_restricted_syntax_reports_matches_in_source_order_test.go +36 -0
- package/linthost/no_restricted_syntax_stringifies_regular_expression_values_test.go +38 -0
- package/linthost/no_restricted_syntax_test.go +29 -0
- package/linthost/no_restricted_syntax_uses_the_last_message_for_a_repeated_selector_test.go +37 -0
- package/linthost/no_restricted_types_external_config_validates_at_engine_binding_test.go +39 -0
- package/linthost/no_restricted_types_fixes_whole_qualified_generic_and_empty_type_surfaces_test.go +56 -0
- package/linthost/no_restricted_types_has_no_implicit_defaults_test.go +51 -0
- package/linthost/no_restricted_types_helpers_test.go +63 -0
- package/linthost/no_restricted_types_later_whitespace_equivalent_key_wins_test.go +40 -0
- package/linthost/no_restricted_types_matches_every_official_type_surface_exactly_test.go +144 -0
- package/linthost/no_restricted_types_options_accept_complete_runtime_schema_test.go +54 -0
- package/linthost/no_restricted_types_options_reject_malformed_schema_boundaries_test.go +60 -0
- package/linthost/no_restricted_types_rejects_only_exact_type_syntax_test.go +56 -0
- package/linthost/no_restricted_types_runs_on_declaration_files_test.go +36 -0
- package/linthost/no_restricted_types_structured_policy_provides_fix_and_every_suggestion_test.go +172 -0
- package/linthost/no_restricted_types_uses_configured_surface_spelling_across_symbols_test.go +74 -0
- package/linthost/no_restricted_types_validation_helpers_test.go +12 -0
- package/linthost/no_return_assign_allows_parenthesized_assignment_test.go +91 -0
- package/linthost/no_types_test.go +29 -0
- package/linthost/no_undef_init_ignores_const_declarations_test.go +33 -0
- package/linthost/no_uninstalled_addons_test.go +45 -0
- package/linthost/no_unnecessary_act_test.go +38 -0
- package/linthost/no_unnecessary_boolean_literal_compare_test.go +50 -0
- package/linthost/no_unnecessary_condition_test.go +50 -0
- package/linthost/no_unnecessary_qualifier_test.go +121 -0
- package/linthost/no_unnecessary_template_expression_test.go +48 -0
- package/linthost/no_unnecessary_type_arguments_leaves_unresolved_aliases_alone_test.go +42 -0
- package/linthost/no_unnecessary_type_arguments_preserves_callable_semantics_test.go +98 -0
- package/linthost/no_unnecessary_type_arguments_preserves_heritage_defaults_test.go +38 -0
- package/linthost/no_unnecessary_type_arguments_resolves_imported_aliases_test.go +58 -0
- package/linthost/no_unnecessary_type_arguments_test.go +49 -0
- package/linthost/no_unnecessary_type_assertion_test.go +48 -0
- package/linthost/no_unneeded_ternary_fix_false_true_branches_test.go +34 -0
- package/linthost/no_unneeded_ternary_fix_false_true_with_low_precedence_cond_test.go +29 -0
- package/linthost/no_unneeded_ternary_fix_true_false_branches_test.go +28 -0
- package/linthost/no_unneeded_ternary_uses_intrinsic_boolean_coercion_test.go +28 -0
- package/linthost/no_unreachable_reports_one_region_and_exempts_hoisted_declarations_test.go +50 -0
- package/linthost/no_unsafe_argument_test.go +50 -0
- package/linthost/no_unsafe_assignment_aliases_test.go +28 -0
- package/linthost/no_unsafe_assignment_array_destructuring_test.go +33 -0
- package/linthost/no_unsafe_assignment_array_spreads_test.go +29 -0
- package/linthost/no_unsafe_assignment_binding_defaults_test.go +39 -0
- package/linthost/no_unsafe_assignment_class_initializers_test.go +30 -0
- package/linthost/no_unsafe_assignment_destructuring_reassignment_test.go +33 -0
- package/linthost/no_unsafe_assignment_direct_declarations_test.go +28 -0
- package/linthost/no_unsafe_assignment_empty_map_test.go +26 -0
- package/linthost/no_unsafe_assignment_generic_constraints_test.go +33 -0
- package/linthost/no_unsafe_assignment_helpers_test.go +114 -0
- package/linthost/no_unsafe_assignment_jsx_attributes_test.go +31 -0
- package/linthost/no_unsafe_assignment_mapped_types_test.go +29 -0
- package/linthost/no_unsafe_assignment_object_destructuring_test.go +43 -0
- package/linthost/no_unsafe_assignment_object_literals_test.go +31 -0
- package/linthost/no_unsafe_assignment_parameter_defaults_test.go +37 -0
- package/linthost/no_unsafe_assignment_preserves_migrated_assignment_sites_test.go +42 -0
- package/linthost/no_unsafe_assignment_readonly_arrays_test.go +27 -0
- package/linthost/no_unsafe_assignment_reassignment_test.go +29 -0
- package/linthost/no_unsafe_assignment_recursive_generics_test.go +26 -0
- package/linthost/no_unsafe_assignment_recursive_types_test.go +30 -0
- package/linthost/no_unsafe_assignment_tuples_test.go +26 -0
- package/linthost/no_unsafe_assignment_unions_intersections_test.go +40 -0
- package/linthost/no_unsafe_call_test.go +49 -0
- package/linthost/no_unsafe_enum_comparison_test.go +51 -0
- package/linthost/no_unsafe_finally_resolves_jump_targets_inside_and_outside_the_finally_test.go +40 -0
- package/linthost/no_unsafe_member_access_test.go +50 -0
- package/linthost/no_unsafe_optional_chaining_preserves_contiguous_chain_test.go +28 -0
- package/linthost/no_unsafe_return_test.go +52 -0
- package/linthost/no_unsafe_unary_minus_test.go +47 -0
- package/linthost/no_unused_expressions_allows_jsx_by_default_test.go +38 -0
- package/linthost/no_unused_expressions_allows_productive_kinds_test.go +61 -0
- package/linthost/no_unused_expressions_composes_short_circuit_and_ternary_test.go +60 -0
- package/linthost/no_unused_expressions_directive_prologue_positions_test.go +63 -0
- package/linthost/no_unused_expressions_honors_allow_short_circuit_test.go +59 -0
- package/linthost/no_unused_expressions_honors_allow_tagged_templates_test.go +52 -0
- package/linthost/no_unused_expressions_honors_allow_ternary_test.go +58 -0
- package/linthost/no_unused_expressions_honors_enforce_for_jsx_test.go +56 -0
- package/linthost/no_unused_expressions_honors_ignore_directives_test.go +62 -0
- package/linthost/no_unused_expressions_preserves_migrated_default_controls_test.go +29 -0
- package/linthost/no_unused_expressions_ts_wrappers_inherit_classification_test.go +61 -0
- package/linthost/no_useless_catch_reports_a_rethrowing_catch_with_and_without_finally_test.go +42 -0
- package/linthost/no_useless_constructor_preserves_argument_filtering_test.go +44 -0
- package/linthost/no_useless_empty_export_allows_module_marker_test.go +36 -0
- package/linthost/no_useless_escape_flags_regex_character_class_test.go +53 -0
- package/linthost/no_useless_escape_invalid_utf8_names_replacement_character_test.go +63 -0
- package/linthost/no_useless_escape_judges_quotes_and_template_escapes_by_enclosing_delimiter_test.go +58 -0
- package/linthost/no_useless_escape_message_names_decoded_rune_test.go +74 -0
- package/linthost/no_useless_escape_multibyte_range_covers_backslash_only_test.go +71 -0
- package/linthost/no_useless_escape_nested_untagged_template_in_tagged_substitution_test.go +67 -0
- package/linthost/no_useless_escape_v_flag_class_preserves_syntax_char_escapes_test.go +60 -0
- package/linthost/no_useless_rename_declines_fix_when_comment_between_names_test.go +38 -0
- package/linthost/no_useless_rename_offers_withheld_tail_deletion_as_suggestion_test.go +37 -0
- package/linthost/no_var_preserves_loop_body_retained_values_test.go +33 -0
- package/linthost/no_var_skips_ambient_declare_var_test.go +55 -0
- package/linthost/no_var_skips_declaration_file_vars_test.go +41 -0
- package/linthost/no_var_skips_using_declarations_test.go +44 -0
- package/linthost/node_config_loader_env_prepends_nearest_node_modules_test.go +51 -0
- package/linthost/node_package_manifest_from_resolves_a_relative_anchor_test.go +56 -0
- package/linthost/node_package_manifest_from_skips_a_node_modules_directory_test.go +51 -0
- package/linthost/node_platform_pair_matches_the_npm_platform_vocabulary_test.go +62 -0
- package/linthost/node_report_bounds_before_skipping_trivia_test.go +44 -0
- package/linthost/node_spans_multiple_lines_returns_false_for_nil_node_test.go +41 -0
- package/linthost/node_suggestions_preserve_owned_edit_channels_test.go +86 -0
- package/linthost/non_nullable_type_assertion_style_test.go +49 -0
- package/linthost/object_shorthand_declines_fix_when_comment_in_value_span_test.go +38 -0
- package/linthost/object_shorthand_offers_withheld_collapse_as_suggestion_test.go +37 -0
- package/linthost/only_throw_error_test.go +44 -0
- package/linthost/override_glob_matches_a_file_named_through_a_miscased_import_test.go +49 -0
- package/linthost/override_glob_stored_case_preserves_character_class_test.go +41 -0
- package/linthost/parse_config_store_accepts_severity_tuples_test.go +49 -0
- package/linthost/parse_config_store_keeps_ignores_entry_scoped_when_files_present_test.go +56 -0
- package/linthost/parse_config_store_promotes_global_ignores_alongside_rules_test.go +56 -0
- package/linthost/parse_config_store_promotes_global_ignores_with_format_block_test.go +53 -0
- package/linthost/parse_config_store_resolves_files_and_ignores_test.go +70 -0
- package/linthost/parse_external_rule_entry_preserves_three_slot_tuple_test.go +54 -0
- package/linthost/parse_external_rule_entry_treats_null_second_slot_as_no_options_test.go +35 -0
- package/linthost/parse_plugins_blank_payload_returns_nil_test.go +29 -0
- package/linthost/parse_plugins_rejects_bad_json_test.go +31 -0
- package/linthost/parse_plugins_round_trip_test.go +51 -0
- package/linthost/parse_rules_accepts_eslint_tuples_in_standard_inline_config_test.go +64 -0
- package/linthost/parse_rules_accepts_legacy_numeric_severities_test.go +44 -0
- package/linthost/parse_rules_accepts_string_severities_test.go +60 -0
- package/linthost/parse_rules_nil_treated_as_empty_test.go +35 -0
- package/linthost/parse_rules_preserves_positional_options_test.go +75 -0
- package/linthost/parse_subcommand_flags_accepts_common_flag_combinations_test.go +57 -0
- package/linthost/playwright_no_force_option_ignores_non_playwright_options_test.go +35 -0
- package/linthost/playwright_no_networkidle_ignores_non_playwright_wait_until_test.go +35 -0
- package/linthost/prefer_as_const_preserves_migrated_all_family_contexts_test.go +20 -0
- package/linthost/prefer_as_const_property_annotation_offers_exact_suggestion_test.go +41 -0
- package/linthost/prefer_as_const_variable_annotation_offers_exact_suggestion_test.go +41 -0
- package/linthost/prefer_const_allows_reads_in_destructuring_pattern_test.go +43 -0
- package/linthost/prefer_const_counts_non_null_assignment_target_by_symbol_test.go +24 -0
- package/linthost/prefer_const_counts_parenthesized_update_target_by_symbol_test.go +26 -0
- package/linthost/prefer_const_counts_write_forms_by_symbol_test.go +57 -0
- package/linthost/prefer_const_honors_destructuring_option_test.go +77 -0
- package/linthost/prefer_const_honors_ignore_read_before_assign_for_shorthand_read_test.go +30 -0
- package/linthost/prefer_const_honors_ignore_read_before_assign_test.go +58 -0
- package/linthost/prefer_const_preserves_migrated_lexical_fixture_test.go +112 -0
- package/linthost/prefer_const_test.go +57 -0
- package/linthost/prefer_const_tracks_lexical_binding_identity_test.go +60 -0
- package/linthost/prefer_explicit_assert_test.go +36 -0
- package/linthost/prefer_find_test.go +48 -0
- package/linthost/prefer_implicit_assert_test.go +36 -0
- package/linthost/prefer_includes_test.go +49 -0
- package/linthost/prefer_presence_queries_test.go +37 -0
- package/linthost/prefer_promise_reject_errors_test.go +45 -0
- package/linthost/prefer_query_by_disappearance_test.go +35 -0
- package/linthost/prefer_query_matchers_test.go +37 -0
- package/linthost/prefer_readonly_preserves_mutated_private_fields_test.go +57 -0
- package/linthost/prefer_reduce_type_parameter_test.go +56 -0
- package/linthost/prefer_regexp_exec_test.go +48 -0
- package/linthost/prefer_return_this_type_requires_all_completion_paths_test.go +43 -0
- package/linthost/prefer_return_this_type_test.go +55 -0
- package/linthost/prefer_screen_queries_test.go +39 -0
- package/linthost/prefer_string_starts_ends_with_test.go +52 -0
- package/linthost/prefer_template_declines_fix_when_comment_in_concat_span_test.go +50 -0
- package/linthost/prefer_template_fix_embeds_numeric_subchain_as_single_slot_test.go +33 -0
- package/linthost/prefer_template_fix_escapes_backtick_in_literal_test.go +32 -0
- package/linthost/prefer_template_fix_escapes_dollar_brace_seam_test.go +33 -0
- package/linthost/prefer_template_fix_flattens_operands_after_leading_string_test.go +34 -0
- package/linthost/prefer_template_fix_ignores_string_under_other_operator_test.go +32 -0
- package/linthost/prefer_template_fix_keeps_parenthesized_subchain_single_slot_test.go +32 -0
- package/linthost/prefer_template_fix_leading_identifier_chain_test.go +30 -0
- package/linthost/prefer_template_fix_preserves_carriage_return_test.go +33 -0
- package/linthost/prefer_template_fix_preserves_newline_test.go +30 -0
- package/linthost/prefer_template_fix_preserves_template_operand_group_test.go +27 -0
- package/linthost/prefer_template_fix_renders_empty_string_operand_with_default_coercion_test.go +31 -0
- package/linthost/prefer_template_fix_sees_string_through_parens_when_flattening_test.go +34 -0
- package/linthost/prefer_template_fix_three_part_concat_test.go +31 -0
- package/linthost/prefer_template_offers_withheld_template_as_suggestion_test.go +37 -0
- package/linthost/prefer_template_preserves_default_coercion_hint_test.go +30 -0
- package/linthost/prefer_template_skips_all_literal_chain_test.go +27 -0
- package/linthost/prefer_template_skips_numeric_only_chain_test.go +28 -0
- package/linthost/prefer_user_event_setup_ignores_setup_call_test.go +35 -0
- package/linthost/print_arg_list_emits_trailing_comma_when_mode_all_test.go +38 -0
- package/linthost/print_arg_list_omits_trailing_comma_when_mode_es5_test.go +39 -0
- package/linthost/print_arg_list_omits_trailing_comma_when_mode_none_test.go +39 -0
- package/linthost/print_arg_list_returns_parens_for_nil_list_test.go +30 -0
- package/linthost/print_call_expression_falls_back_verbatim_when_args_contain_nil_test.go +43 -0
- package/linthost/print_call_expression_includes_question_dot_token_test.go +36 -0
- package/linthost/print_call_expression_includes_type_arguments_test.go +34 -0
- package/linthost/print_call_expression_returns_empty_for_nil_node_test.go +29 -0
- package/linthost/print_dispatch.go +50 -15
- package/linthost/print_doc.go +206 -41
- package/linthost/print_engine.go +78 -51
- package/linthost/print_new_expression_falls_back_verbatim_when_args_contain_nil_test.go +42 -0
- package/linthost/print_new_expression_includes_type_arguments_test.go +36 -0
- package/linthost/print_new_expression_omits_argument_list_when_absent_test.go +36 -0
- package/linthost/print_new_expression_returns_empty_for_nil_node_test.go +28 -0
- package/linthost/print_node_returns_empty_for_nil_node_test.go +31 -0
- package/linthost/print_nodes_control_flow.go +4 -4
- package/linthost/print_nodes_function.go +9 -11
- package/linthost/print_nodes_imports.go +8 -11
- package/linthost/print_nodes_object.go +3 -6
- package/linthost/printer_test_helpers_test.go +46 -0
- package/linthost/project_companion_preserves_file_scoped_rule_config_test.go +45 -0
- package/linthost/project_contributor_ast_only_marker_keeps_parallel_walk_test.go +54 -0
- package/linthost/project_contributor_generic_accepts_options_method_keeps_legacy_payload_test.go +81 -0
- package/linthost/project_contributor_optionless_marker_rejects_payload_test.go +62 -0
- package/linthost/project_contributor_without_marker_keeps_options_compatibility_test.go +70 -0
- package/linthost/project_contributor_without_marker_keeps_type_checker_test.go +53 -0
- package/linthost/project_engine.go +8 -0
- package/linthost/project_hint_collection_requires_passed_published_state_test.go +105 -0
- package/linthost/project_hint_publication_filters_malformed_and_recovers_panic_test.go +66 -0
- package/linthost/project_identity_mints_distinct_program_lifecycles_test.go +51 -0
- package/linthost/project_input_reader.go +358 -0
- package/linthost/project_input_snapshot_normalizes_windows_case_and_separators_test.go +43 -0
- package/linthost/project_input_snapshot_preserves_missing_files_zero_match_globs_and_config_provenance_test.go +130 -0
- package/linthost/project_input_snapshot_reconciles_options_and_physical_paths_test.go +108 -0
- package/linthost/project_input_snapshot_rejects_remote_urls_test.go +59 -0
- package/linthost/project_inputs.go +31 -4
- package/linthost/project_inputs_command_publishes_configured_snapshot_without_program_test.go +115 -0
- package/linthost/project_rule_config_folds_global_extends_and_options_test.go +68 -0
- package/linthost/project_rule_config_rejects_any_files_selector_test.go +46 -0
- package/linthost/project_rule_live_reports_are_concurrent_and_deterministic_test.go +89 -0
- package/linthost/project_rule_reports_per_finding_severity_test.go +74 -0
- package/linthost/project_rule_results_reach_public_file_context_test.go +172 -0
- package/linthost/project_rule_runs_for_empty_source_set_test.go +52 -0
- package/linthost/project_rule_sources_apply_only_global_ignores_test.go +62 -0
- package/linthost/project_rule_sources_include_imported_sibling_source_test.go +110 -0
- package/linthost/project_rule_state_and_live_failure_reach_file_dispatch_test.go +89 -0
- package/linthost/project_rule_state_and_reporter_are_isolated_between_cycles_test.go +87 -0
- package/linthost/project_source_files_follow_tsconfig_selection_test.go +86 -0
- package/linthost/project_source_selection_preserves_explicit_bundled_roots_test.go +73 -0
- package/linthost/promise_function_async_test.go +49 -0
- package/linthost/public_rule_context_accepts_legacy_reporter_test.go +50 -0
- package/linthost/public_rule_context_legacy_reporter_drops_fix_edits_test.go +57 -0
- package/linthost/public_rule_context_options_are_isolated_test.go +106 -0
- package/linthost/public_rule_context_report_fix_falls_back_when_no_edits_test.go +39 -0
- package/linthost/public_rule_context_report_fix_forwards_to_fixreporter_test.go +102 -0
- package/linthost/public_rule_context_report_fix_off_severity_drops_silently_test.go +41 -0
- package/linthost/public_rule_context_report_fix_skips_nil_node_test.go +34 -0
- package/linthost/public_rule_context_report_range_fix_falls_back_when_no_edits_test.go +38 -0
- package/linthost/public_rule_context_report_range_fix_forwards_to_fixreporter_test.go +49 -0
- package/linthost/public_rule_context_report_related_falls_back_test.go +58 -0
- package/linthost/public_rule_context_report_related_forwards_test.go +108 -0
- package/linthost/public_rule_context_report_suggestion_falls_back_when_unsupported_test.go +41 -0
- package/linthost/public_rule_context_report_suggestion_forwards_to_suggestionreporter_test.go +97 -0
- package/linthost/public_rule_context_report_suggestion_with_no_choices_reports_test.go +33 -0
- package/linthost/radix_accepts_every_integer_radix_from_two_through_thirty_six_test.go +33 -0
- package/linthost/range_suggestion_finding_uses_canonical_bounds_test.go +47 -0
- package/linthost/react_button_has_type_requires_explicit_type_test.go +22 -0
- package/linthost/react_compiler_subset_reports_local_purity_violations_test.go +72 -0
- package/linthost/react_display_name_reports_anonymous_memo_test.go +25 -0
- package/linthost/react_exhaustive_deps_reports_missing_identifiers_test.go +58 -0
- package/linthost/react_helpers_test.go +36 -0
- package/linthost/react_iframe_missing_sandbox_reports_iframe_test.go +21 -0
- package/linthost/react_jsx_key_reports_array_element_test.go +21 -0
- package/linthost/react_jsx_key_reports_conditional_map_element_test.go +23 -0
- package/linthost/react_jsx_key_reports_logical_map_element_test.go +23 -0
- package/linthost/react_jsx_no_duplicate_props_reports_duplicate_test.go +21 -0
- package/linthost/react_jsx_no_script_url_reports_javascript_href_test.go +20 -0
- package/linthost/react_jsx_no_target_blank_reports_missing_rel_test.go +22 -0
- package/linthost/react_jsx_no_undef_declarations_collected_once_per_file_test.go +63 -0
- package/linthost/react_jsx_no_undef_reports_undeclared_component_test.go +25 -0
- package/linthost/react_jsx_no_undef_skips_declared_components_test.go +46 -0
- package/linthost/react_jsx_no_useless_fragment_test.go +29 -0
- package/linthost/react_no_array_index_key_reports_index_key_test.go +21 -0
- package/linthost/react_no_array_index_key_reports_renamed_index_key_test.go +23 -0
- package/linthost/react_no_array_index_key_skips_nested_non_list_element_test.go +22 -0
- package/linthost/react_no_array_index_key_skips_unrelated_index_identifier_test.go +21 -0
- package/linthost/react_no_children_prop_reports_children_prop_test.go +21 -0
- package/linthost/react_no_danger_reports_dangerously_set_inner_html_test.go +21 -0
- package/linthost/react_no_danger_with_children_reports_mixed_content_test.go +22 -0
- package/linthost/react_no_danger_with_children_survives_spread_props_test.go +23 -0
- package/linthost/react_no_direct_mutation_state_reports_state_property_write_test.go +22 -0
- package/linthost/react_no_find_dom_node_reports_call_test.go +20 -0
- package/linthost/react_no_is_mounted_reports_call_test.go +20 -0
- package/linthost/react_no_string_refs_reports_string_ref_test.go +20 -0
- package/linthost/react_no_unescaped_entities_reports_quote_text_test.go +21 -0
- package/linthost/react_only_export_components_honors_allow_options_test.go +41 -0
- package/linthost/react_only_export_components_reports_non_component_export_test.go +41 -0
- package/linthost/react_perf_helpers_test.go +58 -0
- package/linthost/react_perf_jsx_no_jsx_as_prop_test.go +29 -0
- package/linthost/react_perf_jsx_no_new_array_as_prop_test.go +30 -0
- package/linthost/react_perf_jsx_no_new_function_as_prop_test.go +31 -0
- package/linthost/react_perf_jsx_no_new_object_as_prop_test.go +31 -0
- package/linthost/react_perf_native_allow_list_test.go +49 -0
- package/linthost/react_perf_rules_skip_jsx_source_test.go +29 -0
- package/linthost/react_rules_of_hooks_rejects_hook_after_conditional_return_test.go +54 -0
- package/linthost/react_rules_of_hooks_rejects_invalid_call_sites_test.go +65 -0
- package/linthost/react_source_file_rules_handle_tsx_descendants_test.go +77 -0
- package/linthost/react_state_setters_reject_render_and_effect_calls_test.go +62 -0
- package/linthost/react_style_prop_object_reports_string_style_test.go +22 -0
- package/linthost/react_void_dom_elements_no_children_reports_img_child_test.go +22 -0
- package/linthost/regex_optimizer_distinguishes_a_zero_upper_bound_from_an_open_range_test.go +44 -0
- package/linthost/regex_optimizer_preserves_ranges_crossing_meta_sets_test.go +67 -0
- package/linthost/regex_tree_optimizer.go +54 -10
- package/linthost/regexp_alias_rules_test.go +53 -0
- package/linthost/regexp_cache.go +63 -33
- package/linthost/regexp_character_class_and_group_rules_test.go +64 -0
- package/linthost/regexp_duplicate_class_uses_code_points_test.go +41 -0
- package/linthost/regexp_quantifier_and_flag_rules_test.go +52 -0
- package/linthost/regexp_useless_ignore_case_flag_test.go +111 -0
- package/linthost/regexp_useless_multiline_flag_test.go +71 -0
- package/linthost/register_rejects_duplicate_rule_name_test.go +74 -0
- package/linthost/reject_any_type_test.go +50 -0
- package/linthost/reject_function_type_test.go +48 -0
- package/linthost/related_getter_setter_pairs_test.go +56 -0
- package/linthost/render_result_dom_access_and_events_test.go +45 -0
- package/linthost/require_array_sort_compare_test.go +47 -0
- package/linthost/require_await_counts_for_await_and_promise_returns_test.go +76 -0
- package/linthost/require_description_test.go +29 -0
- package/linthost/require_param_description_allows_multiline_continuation_test.go +27 -0
- package/linthost/require_param_description_test.go +29 -0
- package/linthost/require_param_name_test.go +26 -0
- package/linthost/require_property_description_allows_multiline_continuation_test.go +27 -0
- package/linthost/require_property_description_test.go +30 -0
- package/linthost/require_property_name_test.go +26 -0
- package/linthost/require_returns_description_allows_multiline_continuation_test.go +27 -0
- package/linthost/require_returns_description_test.go +29 -0
- package/linthost/required_behavioral_witness_kinds_ignore_non_public_candidates_test.go +51 -0
- package/linthost/resident_apply_change_matches_cold_load_test.go +106 -0
- package/linthost/resident_cache_replaces_a_checker_free_program_when_a_checker_arrives_test.go +57 -0
- package/linthost/resident_cache_retains_program_for_declared_external_change_test.go +61 -0
- package/linthost/resident_cache_serves_a_checker_free_verb_from_the_checker_program_test.go +51 -0
- package/linthost/resident_heritage_update_rebuilds_checker_test.go +70 -0
- package/linthost/resident_regex_cache_retires_reloaded_configurations_test.go +123 -0
- package/linthost/resident_rules_are_reused_only_while_their_config_is_unchanged_test.go +180 -0
- package/linthost/resident_whole_corpus_matches_cold_load_test.go +167 -0
- package/linthost/resolve_config_file_path_uses_tsconfig_directory_test.go +34 -0
- package/linthost/resolve_config_tsgo_falls_back_to_the_project_root_anchor_test.go +36 -0
- package/linthost/resolve_config_tsgo_keeps_an_explicitly_pinned_compiler_test.go +41 -0
- package/linthost/resolve_config_tsgo_prefers_the_config_anchor_over_the_project_root_test.go +41 -0
- package/linthost/resolve_config_tsgo_resolves_the_project_compiler_without_the_environment_test.go +33 -0
- package/linthost/resolve_config_tsgo_resolves_through_a_linked_typescript_install_test.go +48 -0
- package/linthost/resolve_config_tsgo_returns_nothing_without_a_project_typescript_test.go +32 -0
- package/linthost/resolve_config_tsgo_returns_nothing_without_the_platform_package_test.go +40 -0
- package/linthost/resolve_ttsx_launcher_falls_back_to_the_bare_command_test.go +36 -0
- package/linthost/resolve_ttsx_launcher_keeps_an_explicitly_pinned_binary_test.go +40 -0
- package/linthost/resolve_ttsx_launcher_resolves_the_project_launcher_without_the_environment_test.go +33 -0
- package/linthost/restrict_plus_operands_test.go +47 -0
- package/linthost/restrict_template_expressions_test.go +47 -0
- package/linthost/return_await_test.go +54 -0
- package/linthost/rule_codes.go +16 -2
- package/linthost/rule_codes_are_unique_and_banded_across_live_registry_test.go +74 -0
- package/linthost/rule_docs.go +1 -1
- package/linthost/rule_documentation_urls_cover_the_builtin_corpus_test.go +86 -0
- package/linthost/rule_snapshot_engine_requires_a_valid_active_rule_test.go +59 -0
- package/linthost/rules_boundaries.go +19 -7
- package/linthost/rules_consistent_return.go +323 -16
- package/linthost/rules_core_extra.go +41 -82
- package/linthost/rules_default_case.go +1 -1
- package/linthost/rules_escape.go +18 -3
- package/linthost/rules_finally.go +49 -15
- package/linthost/rules_format_arrow_parens.go +8 -10
- package/linthost/rules_format_bracket_spacing.go +14 -19
- package/linthost/rules_format_print_width.go +28 -19
- package/linthost/rules_format_quote_props.go +5 -11
- package/linthost/rules_format_quotes.go +5 -6
- package/linthost/rules_format_sort_imports.go +27 -15
- package/linthost/rules_format_statement_split.go +3 -5
- package/linthost/rules_functional.go +21 -14
- package/linthost/rules_gap.go +9 -12
- package/linthost/rules_jsdoc.go +2 -3
- package/linthost/rules_jsx_a11y.go +2 -0
- package/linthost/rules_logic.go +88 -11
- package/linthost/rules_loops.go +16 -2
- package/linthost/rules_max_nested_callbacks.go +28 -12
- package/linthost/rules_misc.go +38 -8
- package/linthost/rules_no_extend_native.go +52 -13
- package/linthost/rules_no_fallthrough.go +1 -1
- package/linthost/rules_no_invalid_this.go +6 -3
- package/linthost/rules_no_mixed_operators.go +42 -10
- package/linthost/rules_no_param_reassign.go +1 -1
- package/linthost/rules_no_unreachable.go +61 -2
- package/linthost/rules_no_useless_constructor.go +21 -27
- package/linthost/rules_problems.go +26 -2
- package/linthost/rules_regexp.go +76 -28
- package/linthost/rules_security.go +4 -4
- package/linthost/rules_self.go +42 -6
- package/linthost/rules_solid.go +14 -26
- package/linthost/rules_sort_keys.go +12 -14
- package/linthost/rules_storybook.go +16 -26
- package/linthost/rules_strings.go +9 -19
- package/linthost/rules_suggestions.go +79 -45
- package/linthost/rules_testing_library.go +18 -0
- package/linthost/rules_ts_no_restricted_types.go +9 -1
- package/linthost/rules_ts_no_unnecessary_type_arguments.go +44 -47
- package/linthost/rules_ts_prefer_readonly.go +111 -42
- package/linthost/rules_ts_prefer_return_this_type.go +21 -14
- package/linthost/rules_unicorn_no_unnecessary_array_splice_count.go +12 -17
- package/linthost/rules_unicorn_no_unnecessary_await.go +39 -13
- package/linthost/rules_unicorn_no_unnecessary_slice_end.go +7 -10
- package/linthost/rules_unicorn_no_useless_error_capture_stack_trace.go +29 -12
- package/linthost/rules_unicorn_no_useless_fallback_in_spread.go +7 -25
- package/linthost/rules_unicorn_no_useless_length_check.go +19 -19
- package/linthost/rules_unicorn_prefer_array_some.go +1 -2
- package/linthost/rules_unicorn_prefer_bigint_literals.go +21 -18
- package/linthost/rules_unicorn_prefer_date_now.go +7 -17
- package/linthost/rules_unicorn_prefer_default_parameters.go +7 -15
- package/linthost/rules_unicorn_prefer_logical_operator_over_ternary.go +7 -13
- package/linthost/rules_unicorn_prefer_negative_index.go +12 -13
- package/linthost/rules_unicorn_prefer_node_protocol.go +5 -5
- package/linthost/rules_unicorn_prefer_object_from_entries.go +7 -14
- package/linthost/rules_unicorn_prefer_regexp_test_rule.go +17 -19
- package/linthost/rules_unicorn_prefer_single_call.go +12 -6
- package/linthost/rules_unicorn_prefer_spread.go +7 -13
- package/linthost/rules_unicorn_prefer_string_replace_all.go +4 -3
- package/linthost/rules_unicorn_prefer_string_starts_ends_with.go +22 -3
- package/linthost/rules_unicorn_prefer_top_level_await.go +4 -3
- package/linthost/rules_unicorn_relative_url_style.go +33 -14
- package/linthost/rules_var.go +73 -3
- package/linthost/runtime_rule_codes_are_collision_free_and_order_independent_test.go +101 -0
- package/linthost/security_assigned_names_unwrap_assertion_targets_test.go +54 -0
- package/linthost/security_bindings_collected_once_per_file_test.go +63 -0
- package/linthost/security_detect_bidi_characters_test.go +44 -0
- package/linthost/security_name_based_node_api_findings_stay_untagged_test.go +87 -0
- package/linthost/self_compare_and_self_assign_ignore_calls_and_empty_template_curly_is_not_a_placeholder_test.go +50 -0
- package/linthost/semantic_finding_guard_rejects_recovered_execution_failures_test.go +75 -0
- package/linthost/serve.go +42 -25
- package/linthost/set_env_replaces_or_appends_test.go +39 -0
- package/linthost/severity_string_formats_values_test.go +34 -0
- package/linthost/signature_flags_expose_construct_signature_abstractness_test.go +136 -0
- package/linthost/signature_introspection_reaches_runtime_endpoints_test.go +123 -0
- package/linthost/solid_helpers_test.go +92 -0
- package/linthost/solid_import_proxy_and_dependency_rules_test.go +48 -0
- package/linthost/solid_imports_leaves_a_type_only_destination_alone_test.go +42 -0
- package/linthost/solid_imports_relocates_a_misrouted_specifier_test.go +69 -0
- package/linthost/solid_jsx_attribute_guards_test.go +69 -0
- package/linthost/solid_no_react_deps_tags_dependency_array_unnecessary_test.go +106 -0
- package/linthost/solid_reactivity_and_component_returns_test.go +49 -0
- package/linthost/solid_rendering_style_preferences_test.go +59 -0
- package/linthost/solid_self_closing_comp_keeps_text_children_test.go +32 -0
- package/linthost/solid_source_file_rules_handle_jsx_initializers_test.go +47 -0
- package/linthost/solid_style_prop_reports_non_zero_numeric_lengths_test.go +37 -0
- package/linthost/solid_validate_jsx_nesting_test.go +53 -0
- package/linthost/sort_keys_compares_across_a_computed_key_and_resets_at_a_spread_test.go +33 -0
- package/linthost/source_extension_tables_separate_selection_from_widening_test.go +44 -0
- package/linthost/source_has_statement_terminator_detects_semicolon_test.go +28 -0
- package/linthost/source_has_statement_terminator_returns_false_for_empty_string_test.go +27 -0
- package/linthost/source_has_statement_terminator_returns_false_for_unclosed_block_comment_test.go +31 -0
- package/linthost/source_has_statement_terminator_returns_false_when_absent_test.go +29 -0
- package/linthost/source_has_statement_terminator_skips_trailing_block_comment_test.go +30 -0
- package/linthost/source_has_statement_terminator_skips_trailing_whitespace_test.go +31 -0
- package/linthost/standalone_checker_resolves_cross_file_type_after_pooled_diagnostics_test.go +85 -0
- package/linthost/storybook_deletion_findings_tag_unnecessary_test.go +127 -0
- package/linthost/storybook_legacy_api_findings_tag_deprecated_test.go +110 -0
- package/linthost/strict_boolean_expressions_test.go +49 -0
- package/linthost/switch_exhaustiveness_check_advanced_type_shapes_test.go +83 -0
- package/linthost/switch_exhaustiveness_check_finite_members_test.go +76 -0
- package/linthost/switch_exhaustiveness_check_helpers_test.go +99 -0
- package/linthost/switch_exhaustiveness_check_no_unchecked_indexed_access_test.go +56 -0
- package/linthost/switch_exhaustiveness_check_options_test.go +118 -0
- package/linthost/switch_exhaustiveness_check_parser_comment_ranges_test.go +64 -0
- package/linthost/switch_exhaustiveness_check_preserves_migrated_defaults_and_options_test.go +139 -0
- package/linthost/switch_exhaustiveness_check_test.go +73 -0
- package/linthost/tail_is_clean_terminator_returns_false_for_invalid_inputs_test.go +64 -0
- package/linthost/testing_library_helpers_test.go +71 -0
- package/linthost/tsdoc_syntax_test.go +64 -0
- package/linthost/ttsx_command_context_spawns_the_project_launcher_test.go +47 -0
- package/linthost/type_alias_reference_node_uses_borrowed_builder_context_test.go +128 -0
- package/linthost/type_args_start_and_end_guard_branches_test.go +58 -0
- package/linthost/type_instantiation_mappers_reach_runtime_endpoints_test.go +213 -0
- package/linthost/type_mapper_parallel_substitution_avoids_capture_test.go +106 -0
- package/linthost/typed_rule_semantic_helpers_test.go +34 -0
- package/linthost/unbound_method_test.go +53 -0
- package/linthost/unicorn_array_some_requires_an_existence_comparison_test.go +29 -0
- package/linthost/unicorn_await_literal_does_not_assume_an_object_has_no_then_test.go +33 -0
- package/linthost/unicorn_better_regex_constructor_fix_escapes_cooked_pattern_test.go +146 -0
- package/linthost/unicorn_better_regex_fix_is_idempotent_test.go +37 -0
- package/linthost/unicorn_better_regex_leaves_optimal_literals_test.go +36 -0
- package/linthost/unicorn_better_regex_reports_exact_range_and_message_test.go +52 -0
- package/linthost/unicorn_better_regex_reports_without_fix_on_source_member_test.go +38 -0
- package/linthost/unicorn_better_regex_rewrites_regexp_constructor_test.go +70 -0
- package/linthost/unicorn_better_regex_skips_unicode_flag_literals_test.go +34 -0
- package/linthost/unicorn_better_regex_sort_character_classes_option_test.go +39 -0
- package/linthost/unicorn_better_regex_test.go +44 -0
- package/linthost/unicorn_bigint_literal_requires_an_exact_integer_value_test.go +34 -0
- package/linthost/unicorn_consistent_destructuring_jsx_tag_names_are_exempt_test.go +53 -0
- package/linthost/unicorn_consistent_destructuring_skips_valid_forms_test.go +221 -0
- package/linthost/unicorn_consistent_destructuring_suggestion_is_opt_in_and_idempotent_test.go +54 -0
- package/linthost/unicorn_consistent_destructuring_test.go +306 -0
- package/linthost/unicorn_consistent_existence_index_check_fix_is_idempotent_test.go +45 -0
- package/linthost/unicorn_consistent_existence_index_check_fix_rewrites_magnitude_comparisons_test.go +96 -0
- package/linthost/unicorn_consistent_existence_index_check_skips_upstream_valid_forms_test.go +143 -0
- package/linthost/unicorn_consistent_existence_index_check_test.go +212 -0
- package/linthost/unicorn_consistent_function_scoping_chains_blocks_inside_loop_bodies_test.go +53 -0
- package/linthost/unicorn_consistent_function_scoping_checks_arrow_lexical_environment_test.go +48 -0
- package/linthost/unicorn_consistent_function_scoping_checks_returned_arrow_chains_test.go +29 -0
- package/linthost/unicorn_consistent_function_scoping_honors_check_arrow_functions_test.go +42 -0
- package/linthost/unicorn_consistent_function_scoping_keeps_shared_outer_references_together_test.go +28 -0
- package/linthost/unicorn_consistent_function_scoping_outer_reference_pins_recursive_function_test.go +31 -0
- package/linthost/unicorn_consistent_function_scoping_preserves_upstream_factory_exceptions_test.go +59 -0
- package/linthost/unicorn_consistent_function_scoping_protects_super_and_private_names_test.go +57 -0
- package/linthost/unicorn_consistent_function_scoping_reads_class_head_positions_as_lexical_environment_test.go +42 -0
- package/linthost/unicorn_consistent_function_scoping_reports_canonical_head_ranges_test.go +44 -0
- package/linthost/unicorn_consistent_function_scoping_resolves_jsx_component_captures_test.go +44 -0
- package/linthost/unicorn_consistent_function_scoping_test.go +45 -0
- package/linthost/unicorn_consistent_function_scoping_treats_loop_scopes_as_one_boundary_test.go +36 -0
- package/linthost/unicorn_consistent_function_scoping_uses_binding_identity_and_ignores_self_recursion_test.go +42 -0
- package/linthost/unicorn_consistent_function_scoping_validates_the_public_option_shape_test.go +58 -0
- package/linthost/unicorn_consistent_template_literal_escape_command_fix_idempotence_test.go +41 -0
- package/linthost/unicorn_consistent_template_literal_escape_fires_on_declaration_files_test.go +35 -0
- package/linthost/unicorn_consistent_template_literal_escape_fixes_template_literal_types_test.go +35 -0
- package/linthost/unicorn_consistent_template_literal_escape_fixes_upstream_invalid_corpus_test.go +80 -0
- package/linthost/unicorn_consistent_template_literal_escape_honors_backslash_parity_test.go +64 -0
- package/linthost/unicorn_consistent_template_literal_escape_preserves_continuations_crlf_and_unicode_test.go +34 -0
- package/linthost/unicorn_consistent_template_literal_escape_reports_exact_element_ranges_test.go +71 -0
- package/linthost/unicorn_consistent_template_literal_escape_reports_untagged_inside_tagged_test.go +43 -0
- package/linthost/unicorn_consistent_template_literal_escape_skips_tagged_templates_test.go +40 -0
- package/linthost/unicorn_consistent_template_literal_escape_skips_upstream_valid_corpus_test.go +49 -0
- package/linthost/unicorn_date_now_preserves_constructor_arguments_test.go +34 -0
- package/linthost/unicorn_escape_case_bounds_escape_digit_runs_test.go +97 -0
- package/linthost/unicorn_escape_case_honors_backslash_parity_test.go +67 -0
- package/linthost/unicorn_escape_case_reports_interpolated_template_segments_test.go +97 -0
- package/linthost/unicorn_escape_case_skips_tagged_templates_test.go +62 -0
- package/linthost/unicorn_escape_family_survives_crlf_and_astral_literals_test.go +67 -0
- package/linthost/unicorn_filename_case_cases_key_order_shapes_message_test.go +42 -0
- package/linthost/unicorn_filename_case_default_ignored_index_basenames_test.go +40 -0
- package/linthost/unicorn_filename_case_directory_handling_test.go +89 -0
- package/linthost/unicorn_filename_case_extension_lowercase_test.go +72 -0
- package/linthost/unicorn_filename_case_ignore_patterns_match_segments_test.go +78 -0
- package/linthost/unicorn_filename_case_multiple_file_extensions_option_test.go +77 -0
- package/linthost/unicorn_filename_case_option_validation_test.go +74 -0
- package/linthost/unicorn_filename_case_real_project_paths_test.go +50 -0
- package/linthost/unicorn_filename_case_report_anchors_and_no_fix_test.go +59 -0
- package/linthost/unicorn_filename_case_split_name_line_terminator_edge_test.go +37 -0
- package/linthost/unicorn_filename_case_test.go +131 -0
- package/linthost/unicorn_filename_case_unicode_segments_test.go +33 -0
- package/linthost/unicorn_filename_case_upstream_invalid_filenames_test.go +268 -0
- package/linthost/unicorn_filename_case_upstream_valid_filenames_test.go +173 -0
- package/linthost/unicorn_import_style_accepts_mixed_styles_when_all_allowed_test.go +29 -0
- package/linthost/unicorn_import_style_banned_module_reports_dedicated_message_test.go +70 -0
- package/linthost/unicorn_import_style_check_toggles_disable_each_syntax_family_test.go +61 -0
- package/linthost/unicorn_import_style_default_module_policy_matrix_test.go +69 -0
- package/linthost/unicorn_import_style_default_policies_at_exact_ranges_test.go +65 -0
- package/linthost/unicorn_import_style_default_policies_skip_compliant_and_unknown_modules_test.go +37 -0
- package/linthost/unicorn_import_style_disjunction_lists_allowed_styles_in_order_test.go +44 -0
- package/linthost/unicorn_import_style_dynamic_import_expression_forms_test.go +69 -0
- package/linthost/unicorn_import_style_evaluates_static_string_module_names_test.go +58 -0
- package/linthost/unicorn_import_style_extend_default_styles_false_drops_builtin_policies_test.go +46 -0
- package/linthost/unicorn_import_style_named_module_policy_matrix_test.go +81 -0
- package/linthost/unicorn_import_style_namespace_module_policy_matrix_test.go +63 -0
- package/linthost/unicorn_import_style_object_pattern_key_forms_test.go +46 -0
- package/linthost/unicorn_import_style_optional_require_calls_are_never_classified_test.go +24 -0
- package/linthost/unicorn_import_style_rejects_malformed_options_before_linting_test.go +56 -0
- package/linthost/unicorn_import_style_reports_no_automatic_fixes_test.go +31 -0
- package/linthost/unicorn_import_style_skips_non_matching_reference_shapes_test.go +47 -0
- package/linthost/unicorn_import_style_style_overrides_replace_inherited_flags_test.go +69 -0
- package/linthost/unicorn_import_style_test.go +87 -0
- package/linthost/unicorn_import_style_type_only_imports_follow_value_semantics_test.go +53 -0
- package/linthost/unicorn_import_style_unassigned_policy_accepts_unassigned_forms_test.go +31 -0
- package/linthost/unicorn_import_style_unassigned_policy_reports_every_assigned_form_test.go +66 -0
- package/linthost/unicorn_isolated_functions_arguments_test.go +48 -0
- package/linthost/unicorn_isolated_functions_browser_and_page_callees_test.go +63 -0
- package/linthost/unicorn_isolated_functions_comments_test.go +131 -0
- package/linthost/unicorn_isolated_functions_execute_script_func_property_test.go +83 -0
- package/linthost/unicorn_isolated_functions_function_name_callees_test.go +100 -0
- package/linthost/unicorn_isolated_functions_helpers_test.go +76 -0
- package/linthost/unicorn_isolated_functions_override_globals_test.go +92 -0
- package/linthost/unicorn_isolated_functions_parameter_default_capture_test.go +47 -0
- package/linthost/unicorn_isolated_functions_scope_internals_test.go +57 -0
- package/linthost/unicorn_isolated_functions_selector_test.go +43 -0
- package/linthost/unicorn_isolated_functions_test.go +75 -0
- package/linthost/unicorn_isolated_functions_this_and_super_test.go +110 -0
- package/linthost/unicorn_isolated_functions_typeof_this_test.go +45 -0
- package/linthost/unicorn_isolated_functions_typescript_types_test.go +39 -0
- package/linthost/unicorn_isolated_functions_unresolved_reference_test.go +41 -0
- package/linthost/unicorn_known_boundary_observations_test.go +113 -0
- package/linthost/unicorn_length_check_preserves_escaped_foreach_results_test.go +33 -0
- package/linthost/unicorn_negative_index_requires_its_own_receiver_and_index_argument_test.go +32 -0
- package/linthost/unicorn_no_hex_escape_honors_backslash_parity_test.go +63 -0
- package/linthost/unicorn_no_hex_escape_ignores_non_hex_escapes_test.go +75 -0
- package/linthost/unicorn_no_hex_escape_reports_interpolated_template_segments_test.go +86 -0
- package/linthost/unicorn_no_hex_escape_skips_tagged_templates_test.go +57 -0
- package/linthost/unicorn_no_typeof_undefined_check_global_variables_option_test.go +90 -0
- package/linthost/unicorn_no_typeof_undefined_declines_unsafe_fix_test.go +50 -0
- package/linthost/unicorn_no_typeof_undefined_fix_rewrites_comparisons_test.go +43 -0
- package/linthost/unicorn_no_typeof_undefined_skips_upstream_valid_forms_test.go +57 -0
- package/linthost/unicorn_no_typeof_undefined_test.go +88 -0
- package/linthost/unicorn_no_unnecessary_polyfills_checks_only_static_string_specifiers_test.go +50 -0
- package/linthost/unicorn_no_unnecessary_polyfills_config_discovery_test.go +109 -0
- package/linthost/unicorn_no_unnecessary_polyfills_core_js_compat_oracle_test.go +74 -0
- package/linthost/unicorn_no_unnecessary_polyfills_corpus_project_scenario_test.go +30 -0
- package/linthost/unicorn_no_unnecessary_polyfills_custom_stats_discovery_test.go +45 -0
- package/linthost/unicorn_no_unnecessary_polyfills_engine_oracle_test.go +101 -0
- package/linthost/unicorn_no_unnecessary_polyfills_engines_discovery_test.go +29 -0
- package/linthost/unicorn_no_unnecessary_polyfills_option_overrides_config_discovery_test.go +28 -0
- package/linthost/unicorn_no_unnecessary_polyfills_options_test.go +38 -0
- package/linthost/unicorn_no_unnecessary_polyfills_package_json_browserslist_section_test.go +25 -0
- package/linthost/unicorn_no_unnecessary_polyfills_pattern_table_oracle_test.go +47 -0
- package/linthost/unicorn_no_unnecessary_polyfills_rejects_malformed_options_test.go +48 -0
- package/linthost/unicorn_no_unnecessary_polyfills_silent_without_resolvable_targets_test.go +26 -0
- package/linthost/unicorn_no_unnecessary_polyfills_test.go +128 -0
- package/linthost/unicorn_no_unnecessary_polyfills_upstream_invalid_targets_test.go +73 -0
- package/linthost/unicorn_no_unused_properties_corpus_test.go +81 -0
- package/linthost/unicorn_no_unused_properties_key_matching_test.go +83 -0
- package/linthost/unicorn_no_unused_properties_object_literal_semantics_test.go +211 -0
- package/linthost/unicorn_no_unused_properties_reference_identity_test.go +72 -0
- package/linthost/unicorn_no_unused_properties_reporting_shape_test.go +89 -0
- package/linthost/unicorn_no_unused_properties_script_global_scope_test.go +60 -0
- package/linthost/unicorn_no_unused_properties_template_keys_test.go +35 -0
- package/linthost/unicorn_no_unused_properties_type_literal_semantics_test.go +155 -0
- package/linthost/unicorn_number_literal_case_fix_is_idempotent_test.go +54 -0
- package/linthost/unicorn_number_literal_case_fixes_bigint_and_separated_literals_test.go +43 -0
- package/linthost/unicorn_number_literal_case_fixes_every_literal_in_one_pass_test.go +37 -0
- package/linthost/unicorn_number_literal_case_fixes_literals_in_every_syntactic_position_test.go +51 -0
- package/linthost/unicorn_number_literal_case_fixes_radix_prefix_and_hex_digits_test.go +42 -0
- package/linthost/unicorn_number_literal_case_fixes_uppercase_exponent_test.go +42 -0
- package/linthost/unicorn_number_literal_case_reports_exact_range_and_message_test.go +53 -0
- package/linthost/unicorn_number_literal_case_skips_canonical_literals_test.go +38 -0
- package/linthost/unicorn_number_literal_case_uppercases_hex_exponent_digits_test.go +44 -0
- package/linthost/unicorn_prefer_number_properties_autofixes_is_na_n_with_number_argument_test.go +24 -0
- package/linthost/unicorn_prefer_number_properties_autofixes_safe_global_test.go +24 -0
- package/linthost/unicorn_prefer_number_properties_checks_infinity_when_enabled_test.go +43 -0
- package/linthost/unicorn_prefer_number_properties_checks_na_n_when_enabled_test.go +30 -0
- package/linthost/unicorn_prefer_number_properties_expands_shorthand_fix_test.go +24 -0
- package/linthost/unicorn_prefer_number_properties_fixes_negative_infinity_test.go +25 -0
- package/linthost/unicorn_prefer_number_properties_interpolates_message_test.go +33 -0
- package/linthost/unicorn_prefer_number_properties_leaves_infinity_and_na_n_under_defaults_test.go +24 -0
- package/linthost/unicorn_prefer_number_properties_reports_object_value_positions_test.go +37 -0
- package/linthost/unicorn_prefer_number_properties_skips_base10_and_missing_radix_test.go +35 -0
- package/linthost/unicorn_prefer_number_properties_skips_shadowed_bindings_test.go +40 -0
- package/linthost/unicorn_prefer_number_properties_suggests_unsafe_is_na_n_test.go +38 -0
- package/linthost/unicorn_prefer_number_properties_test.go +81 -0
- package/linthost/unicorn_prefer_number_properties_validates_options_test.go +64 -0
- package/linthost/unicorn_prefer_optional_catch_binding_test.go +53 -0
- package/linthost/unicorn_prefer_simple_condition_first_handles_or_chains_and_non_logical_type_wrappers_test.go +45 -0
- package/linthost/unicorn_prefer_simple_condition_first_parser_aware_comments_do_not_mistake_literal_text_test.go +28 -0
- package/linthost/unicorn_prefer_simple_condition_first_preserves_mixed_operators_and_parentheses_test.go +32 -0
- package/linthost/unicorn_prefer_simple_condition_first_reports_exact_safe_finding_and_stable_fix_test.go +64 -0
- package/linthost/unicorn_prefer_simple_condition_first_restricts_reports_to_boolean_contexts_test.go +68 -0
- package/linthost/unicorn_prefer_simple_condition_first_reviews_each_homogeneous_mixed_operator_chain_test.go +55 -0
- package/linthost/unicorn_prefer_simple_condition_first_uses_canonical_simple_expression_grammar_test.go +105 -0
- package/linthost/unicorn_prefer_simple_condition_first_withholds_unsafe_and_syntax_owned_fixes_test.go +57 -0
- package/linthost/unicorn_prefer_string_raw_survives_unterminated_literals_test.go +36 -0
- package/linthost/unicorn_prevent_abbreviations_allows_generated_names_to_shadow_without_capture_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_allows_reserved_words_in_property_suggestions_test.go +43 -0
- package/linthost/unicorn_prevent_abbreviations_applies_import_controls_to_static_require_bindings_test.go +29 -0
- package/linthost/unicorn_prevent_abbreviations_applies_import_mode_to_external_import_equals_test.go +29 -0
- package/linthost/unicorn_prevent_abbreviations_applies_internal_import_defaults_and_preserves_imported_names_test.go +40 -0
- package/linthost/unicorn_prevent_abbreviations_avoids_catch_parameter_body_redeclarations_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_avoids_compiler_provided_global_bindings_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_avoids_var_lexical_early_error_collisions_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_checks_physical_filename_without_offering_edits_test.go +52 -0
- package/linthost/unicorn_prevent_abbreviations_checks_shorthand_destructuring_only_when_enabled_test.go +25 -0
- package/linthost/unicorn_prevent_abbreviations_does_not_apply_require_mode_to_qualified_import_equals_test.go +24 -0
- package/linthost/unicorn_prevent_abbreviations_does_not_capture_outer_reads_with_unused_inner_bindings_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_does_not_capture_unresolved_names_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_does_not_report_destructuring_assignment_keys_as_properties_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_does_not_treat_destructuring_property_keys_as_collisions_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_expands_compound_and_cased_names_but_skips_constants_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_false_replacement_disables_compound_matches_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_false_replacement_stops_case_variant_fallback_test.go +22 -0
- package/linthost/unicorn_prevent_abbreviations_honors_negative_replacement_and_allow_list_patches_test.go +40 -0
- package/linthost/unicorn_prevent_abbreviations_honors_replacement_allow_and_ignore_options_test.go +42 -0
- package/linthost/unicorn_prevent_abbreviations_ignores_detached_js_doc_when_deciding_fix_safety_test.go +47 -0
- package/linthost/unicorn_prevent_abbreviations_ignores_non_lexical_jsx_and_tuple_names_for_collisions_test.go +24 -0
- package/linthost/unicorn_prevent_abbreviations_keeps_exported_js_doc_and_jsx_bindings_diagnostic_only_test.go +107 -0
- package/linthost/unicorn_prevent_abbreviations_keeps_independent_loop_and_switch_scopes_independent_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_keeps_mapped_and_conditional_type_scopes_independent_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_keeps_shadowed_bindings_independent_and_avoids_collisions_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_keeps_type_script_signature_scopes_independent_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_offers_whole_binding_suggestions_for_ambiguous_names_test.go +40 -0
- package/linthost/unicorn_prevent_abbreviations_preserves_astral_first_rune_casing_test.go +27 -0
- package/linthost/unicorn_prevent_abbreviations_preserves_canonical_upper_first_for_uncased_prefixes_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_preserves_explicit_imported_alias_names_test.go +22 -0
- package/linthost/unicorn_prevent_abbreviations_preserves_exported_alias_names_test.go +35 -0
- package/linthost/unicorn_prevent_abbreviations_property_checks_are_opt_in_and_suggestion_only_test.go +34 -0
- package/linthost/unicorn_prevent_abbreviations_recognizes_only_canonical_static_require_calls_test.go +43 -0
- package/linthost/unicorn_prevent_abbreviations_rejects_malformed_options_test.go +36 -0
- package/linthost/unicorn_prevent_abbreviations_renames_class_inner_and_outer_references_together_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_renames_default_export_local_names_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_renames_merged_type_and_value_references_together_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_renames_type_predicate_references_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_reports_binding_once_and_fixes_every_reference_test.go +31 -0
- package/linthost/unicorn_prevent_abbreviations_separates_generated_names_at_cross_scope_reads_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_separates_generated_names_in_one_scope_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_supports_canonical_empty_replacement_spelling_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_test.go +34 -0
- package/linthost/unicorn_prevent_abbreviations_uses_default_import_control_for_named_default_syntax_test.go +25 -0
- package/linthost/unicorn_prevent_abbreviations_uses_function_scope_for_destructured_var_collisions_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_uses_function_scope_for_var_collisions_test.go +23 -0
- package/linthost/unicorn_prevent_abbreviations_uses_java_script_full_unicode_casing_test.go +29 -0
- package/linthost/unicorn_prevent_abbreviations_uses_strict_binding_grammar_for_custom_replacements_test.go +51 -0
- package/linthost/unicorn_regexp_test_requires_a_boolean_result_consumer_test.go +33 -0
- package/linthost/unicorn_relative_url_style_preserves_leading_trimmed_characters_test.go +47 -0
- package/linthost/unicorn_report_only_advice_exposes_semantic_preconditions_test.go +48 -0
- package/linthost/unicorn_rule_finding_helpers_test.go +14 -0
- package/linthost/unicorn_rule_names_helpers_test.go +11 -0
- package/linthost/unicorn_single_call_excludes_event_listener_registration_test.go +30 -0
- package/linthost/unicorn_slice_end_preserves_other_receiver_bounds_test.go +30 -0
- package/linthost/unicorn_splice_count_preserves_bounds_and_insertions_test.go +33 -0
- package/linthost/unicorn_spread_fallback_is_load_bearing_for_arrays_test.go +31 -0
- package/linthost/unicorn_string_content_applies_first_matching_pattern_in_configured_order_test.go +55 -0
- package/linthost/unicorn_string_content_escapes_backticks_and_dollars_in_template_fix_test.go +75 -0
- package/linthost/unicorn_string_content_escapes_delimiter_quotes_in_literal_fix_test.go +60 -0
- package/linthost/unicorn_string_content_escapes_line_separators_keeps_other_whitespace_raw_test.go +79 -0
- package/linthost/unicorn_string_content_fix_false_reports_suggestion_only_test.go +73 -0
- package/linthost/unicorn_string_content_honors_custom_message_and_placeholders_test.go +41 -0
- package/linthost/unicorn_string_content_jsx_attribute_fix_uses_html_entities_test.go +103 -0
- package/linthost/unicorn_string_content_matches_case_insensitively_when_configured_test.go +68 -0
- package/linthost/unicorn_string_content_normalizes_template_line_endings_like_acorn_test.go +87 -0
- package/linthost/unicorn_string_content_preserves_control_escapes_in_literal_fix_test.go +93 -0
- package/linthost/unicorn_string_content_rejects_malformed_options_before_linting_test.go +79 -0
- package/linthost/unicorn_string_content_reports_and_fixes_plain_string_literal_test.go +54 -0
- package/linthost/unicorn_string_content_reports_each_template_quasi_at_exact_ranges_test.go +61 -0
- package/linthost/unicorn_string_content_selector_matches_keep_ignored_tag_exemption_test.go +33 -0
- package/linthost/unicorn_string_content_selectors_restrict_checked_nodes_test.go +68 -0
- package/linthost/unicorn_string_content_skips_empty_and_non_string_literals_test.go +43 -0
- package/linthost/unicorn_string_content_skips_ignored_template_tags_test.go +81 -0
- package/linthost/unicorn_string_content_stays_silent_without_pattern_options_test.go +34 -0
- package/linthost/unicorn_string_content_treats_pattern_as_regular_expression_test.go +77 -0
- package/linthost/unicorn_switch_case_break_position_declines_unsafe_or_semantic_moves_test.go +111 -0
- package/linthost/unicorn_switch_case_break_position_fix_preserves_statements_comments_and_eol_test.go +187 -0
- package/linthost/unicorn_switch_case_break_position_reports_every_supported_terminator_at_exact_range_test.go +132 -0
- package/linthost/unicorn_switch_case_break_position_requires_sole_non_empty_block_then_direct_terminator_test.go +112 -0
- package/linthost/unicorn_template_indent_accepts_parenthesized_jest_inline_snapshot_test.go +26 -0
- package/linthost/unicorn_template_indent_detects_tabs_outside_templates_test.go +31 -0
- package/linthost/unicorn_template_indent_falls_back_to_two_spaces_without_any_indent_signal_test.go +23 -0
- package/linthost/unicorn_template_indent_fix_preserves_quasis_substitutions_escapes_and_blank_lines_test.go +71 -0
- package/linthost/unicorn_template_indent_fixes_empty_boundary_quasis_with_insertions_test.go +37 -0
- package/linthost/unicorn_template_indent_fixes_nested_templates_without_touching_expressions_test.go +52 -0
- package/linthost/unicorn_template_indent_honors_configured_tags_functions_comments_and_selectors_test.go +69 -0
- package/linthost/unicorn_template_indent_honors_numeric_and_whitespace_indent_options_test.go +51 -0
- package/linthost/unicorn_template_indent_pins_every_default_matcher_test.go +46 -0
- package/linthost/unicorn_template_indent_preserves_content_trailing_spaces_test.go +31 -0
- package/linthost/unicorn_template_indent_preserves_crlf_test.go +35 -0
- package/linthost/unicorn_template_indent_preserves_every_interior_ecma_script_line_ending_test.go +39 -0
- package/linthost/unicorn_template_indent_preserves_leading_byte_order_mark_test.go +27 -0
- package/linthost/unicorn_template_indent_preserves_mixed_interior_line_endings_test.go +35 -0
- package/linthost/unicorn_template_indent_recognizes_every_ecma_script_source_line_separator_test.go +48 -0
- package/linthost/unicorn_template_indent_rejects_jest_inline_snapshot_near_misses_test.go +35 -0
- package/linthost/unicorn_template_indent_rejects_malformed_options_before_linting_test.go +52 -0
- package/linthost/unicorn_template_indent_selects_every_official_entry_point_at_exact_range_test.go +56 -0
- package/linthost/unicorn_template_indent_skips_unselected_single_line_and_already_correct_templates_test.go +37 -0
- package/linthost/unicorn_template_indent_test.go +20 -0
- package/linthost/unicorn_text_encoding_identifier_case_enforces_dash_in_jsx_charset_attributes_test.go +69 -0
- package/linthost/unicorn_text_encoding_identifier_case_enforces_dash_in_text_decoder_test.go +47 -0
- package/linthost/unicorn_text_encoding_identifier_case_fixes_fs_read_file_encoding_test.go +44 -0
- package/linthost/unicorn_text_encoding_identifier_case_handles_template_literals_test.go +46 -0
- package/linthost/unicorn_text_encoding_identifier_case_reports_suggestion_range_and_message_test.go +78 -0
- package/linthost/unicorn_text_encoding_identifier_case_skips_canonical_and_unknown_labels_test.go +35 -0
- package/linthost/unicorn_text_encoding_identifier_case_suggests_without_fixing_off_read_file_positions_test.go +36 -0
- package/linthost/unicorn_text_encoding_identifier_case_withdash_option_prefers_dash_test.go +52 -0
- package/linthost/unicorn_throw_new_error_fix_parenthesizes_a_shielded_call_chain_test.go +69 -0
- package/linthost/unicorn_throw_new_error_fix_spaces_an_abutting_throw_keyword_test.go +64 -0
- package/linthost/unicorn_throw_new_error_fixes_every_throw_in_one_pass_test.go +42 -0
- package/linthost/unicorn_throw_new_error_fixes_upstream_invalid_corpus_test.go +114 -0
- package/linthost/unicorn_throw_new_error_reports_custom_and_member_callees_test.go +62 -0
- package/linthost/unicorn_throw_new_error_skips_non_matching_callees_test.go +68 -0
- package/linthost/unregistered_rule_code_lookup_preserves_registered_assignments_test.go +102 -0
- package/linthost/use_unknown_in_catch_callback_variable_test.go +48 -0
- package/linthost/user_pattern_cache_follows_resolver_ownership_test.go +87 -0
- package/linthost/user_pattern_cache_parallel_reuses_results_test.go +67 -0
- package/linthost/user_source_files_exclude_imported_declarations_and_javascript_test.go +82 -0
- package/linthost/user_source_files_span_program_typescript_sources_test.go +72 -0
- package/linthost/valid_typeof_equality_operator_scope_test.go +173 -0
- package/linthost/verbatim_range_returns_empty_for_invalid_range_test.go +53 -0
- package/linthost/verbatim_returns_empty_for_nil_node_test.go +30 -0
- package/linthost/verbatim_returns_empty_for_out_of_range_node_test.go +52 -0
- package/linthost/vitest_expect_expect_reports_empty_test_test.go +35 -0
- package/linthost/vitest_finding_helpers_test.go +14 -0
- package/linthost/vitest_no_conditional_expect_reports_expect_inside_if_test.go +37 -0
- package/linthost/vitest_no_conditional_tests_reports_test_inside_if_test.go +35 -0
- package/linthost/vitest_no_disabled_tests_reports_skip_test.go +34 -0
- package/linthost/vitest_no_done_callback_reports_test_parameter_test.go +34 -0
- package/linthost/vitest_no_focused_tests_reports_only_test.go +34 -0
- package/linthost/vitest_no_identical_title_reports_duplicate_sibling_test.go +35 -0
- package/linthost/vitest_no_standalone_expect_reports_top_level_expect_test.go +33 -0
- package/linthost/vitest_no_test_return_statement_reports_return_test.go +35 -0
- package/linthost/vitest_prefer_to_have_length_reports_length_matcher_test.go +34 -0
- package/linthost/vitest_valid_describe_callback_reports_async_callback_test.go +34 -0
- package/linthost/vitest_valid_expect_reports_missing_matcher_test.go +35 -0
- package/linthost/vitest_valid_title_reports_empty_title_test.go +34 -0
- package/linthost/wait_for_assertion_and_side_effect_guards_test.go +55 -0
- package/linthost/windows_junction_dependency_entry_matches_node_fingerprint_test.go +55 -0
- package/linthost/windows_loader_temp_base_stays_on_config_volume_test.go +98 -0
- package/linthost/windows_project_source_selection_preserves_physical_aliases_test.go +69 -0
- package/linthost/windows_real_project_path_expands_windows_short_ancestor_test.go +47 -0
- package/linthost/windows_resolve_config_tsgo_through_linked_typescript_install_test.go +52 -0
- package/linthost/windows_short_path_other_test.go +11 -0
- package/linthost/windows_short_path_windows_test.go +39 -0
- package/linthost/workspace_link_resolves_a_sibling_package_to_its_source_test.go +86 -0
- package/package.json +5 -3
- package/rule/astutil/astutil.go +165 -59
- package/rule/context_decode_options_preserves_defaults_and_decoder_errors_test.go +87 -0
- package/rule/graph.go +82 -16
- package/rule/hint.go +95 -28
- package/rule/new_project_context_preserves_snapshot_ownership_test.go +62 -0
- package/rule/new_project_input_context_preserves_owned_options_test.go +59 -0
- package/rule/new_project_rule_result_preserves_snapshot_ownership_test.go +63 -0
- package/rule/project.go +382 -22
- package/rule/project_input_reader.go +163 -0
- package/rule/rule.go +540 -92
- package/src/createTtscPlugin.ts +3010 -0
- package/src/index.ts +1 -2974
- package/src/internal/configEvaluatorFailure.ts +17 -9
- package/src/internal/lintTrace.ts +106 -0
- package/src/internal/normalizeContributors.ts +79 -0
- package/src/structures/ITtscLintConfig.ts +27 -8
- package/src/structures/ITtscLintPlugin.ts +13 -8
- package/src/structures/ITtscLintPluginConfig.ts +18 -7
- package/src/structures/ITtscLintPluginMeta.ts +10 -7
- package/src/structures/TtscLintRuleSetting.ts +18 -13
- package/src/structures/TtscLintSeverity.ts +5 -0
- package/src/structures/format/ITtscLintFormat.ts +14 -8
- package/src/structures/format/ITtscLintFormatJsDoc.ts +8 -1
- package/src/structures/format/ITtscLintFormatSortImports.ts +14 -8
- package/src/structures/rules/ITtscLintBoundariesRuleOptions.ts +133 -25
- package/src/structures/rules/ITtscLintBoundariesRules.ts +10 -5
- package/src/structures/rules/ITtscLintContributorRules.ts +20 -13
- package/src/structures/rules/ITtscLintCoreRuleOptions.ts +226 -24
- package/src/structures/rules/ITtscLintCoreRules.ts +92 -72
- package/src/structures/rules/ITtscLintCypressRuleOptions.ts +8 -1
- package/src/structures/rules/ITtscLintCypressRules.ts +24 -21
- package/src/structures/rules/ITtscLintFunctionalRuleOptions.ts +140 -24
- package/src/structures/rules/ITtscLintFunctionalRules.ts +20 -12
- package/src/structures/rules/ITtscLintJestRules.ts +22 -16
- package/src/structures/rules/ITtscLintJsdocRules.ts +5 -0
- package/src/structures/rules/ITtscLintJsxA11yRules.ts +24 -21
- package/src/structures/rules/ITtscLintNextjsRules.ts +40 -42
- package/src/structures/rules/ITtscLintPlaywrightRules.ts +24 -14
- package/src/structures/rules/ITtscLintPromiseRules.ts +23 -14
- package/src/structures/rules/ITtscLintReactPerfRuleOptions.ts +8 -1
- package/src/structures/rules/ITtscLintReactPerfRules.ts +18 -15
- package/src/structures/rules/ITtscLintReactRuleOptions.ts +14 -4
- package/src/structures/rules/ITtscLintReactRules.ts +33 -27
- package/src/structures/rules/ITtscLintRegexpRules.ts +18 -4
- package/src/structures/rules/ITtscLintRuleOptionsMap.ts +150 -15
- package/src/structures/rules/ITtscLintRules.ts +13 -9
- package/src/structures/rules/ITtscLintSecurityRules.ts +33 -23
- package/src/structures/rules/ITtscLintSolidRules.ts +57 -47
- package/src/structures/rules/ITtscLintStorybookRuleOptions.ts +10 -2
- package/src/structures/rules/ITtscLintStorybookRules.ts +52 -62
- package/src/structures/rules/ITtscLintTanstackQueryRules.ts +34 -30
- package/src/structures/rules/ITtscLintTestingLibraryRuleOptions.ts +12 -3
- package/src/structures/rules/ITtscLintTestingLibraryRules.ts +20 -15
- package/src/structures/rules/ITtscLintTypeScriptRuleOptions.ts +116 -16
- package/src/structures/rules/ITtscLintTypeScriptRules.ts +62 -51
- package/src/structures/rules/ITtscLintUnicornRuleOptions.ts +241 -48
- package/src/structures/rules/ITtscLintUnicornRules.ts +97 -44
- package/src/structures/rules/ITtscLintVitestRules.ts +19 -11
- package/src/structures/rules/TtscLintContributorOverlay.ts +40 -0
- package/src/structures/rules/index.ts +1 -0
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ The ledger introduction preserved every legacy code that was already unique. For
|
|
|
53
53
|
|
|
54
54
|
Rules contributed by another Go package share the same collision-free band. Their codes are deterministic for an unchanged complete set of loaded contributors and do not depend on registration order. Adding or removing a contributor recomputes assignments for that complete contributor set and can change contributor codes, but never changes a built-in assignment.
|
|
55
55
|
|
|
56
|
+
The Go host API `RuleCode` also accepts an unregistered name and returns a provisional assignment for the loaded set plus that name. This lookup does not register the name or change the cached codes of loaded contributors; register the rule before using its code as a loaded diagnostic identity.
|
|
57
|
+
|
|
56
58
|
## Setup
|
|
57
59
|
|
|
58
60
|
```bash
|
|
@@ -166,7 +168,7 @@ Rules with options use an ESLint-style tuple such as `["error", { allowElseIf: f
|
|
|
166
168
|
|
|
167
169
|
Rule IDs use ESLint-style kebab-case and slash namespaces, `no-var`, `react/jsx-key`, `testing-library/prefer-screen-queries`. The exported `ITtscLintRules` type is the intersection of family-specific interfaces such as `ITtscLintCoreRules`, `ITtscLintTypeScriptRules`, `ITtscLintReactRules`, and `ITtscLintVitestRules`, so users can type a whole config or a narrower family-shaped object.
|
|
168
170
|
|
|
169
|
-
Each rule below links to its TypeScript fixture under [`
|
|
171
|
+
Each rule below links to its TypeScript fixture under [`packages/lint/test/testdata/corpus/`](https://github.com/samchon/ttsc/tree/master/packages/lint/test/testdata/corpus).
|
|
170
172
|
|
|
171
173
|
<!--
|
|
172
174
|
AGENT INSTRUCTIONS, adding a new rule family or a new rule.
|
|
@@ -182,19 +184,19 @@ by display name):
|
|
|
182
184
|
|
|
183
185
|
Source: [`<upstream-package>`](https://github.com/<org>/<repo>), [optional second source](https://…).
|
|
184
186
|
|
|
185
|
-
- [`<rule-id>`](https://github.com/samchon/ttsc/blob/master/
|
|
187
|
+
- [`<rule-id>`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/<fixture-name>.ts): <short description ending in a period>.
|
|
186
188
|
|
|
187
189
|
Rules:
|
|
188
190
|
|
|
189
191
|
- Bullet shape is `- [\`<rule-id>\`](url): description.`: colon as separator, lowercase
|
|
190
192
|
description, ending in a period. No em-dash separator. Bullets sort alphabetically
|
|
191
193
|
by rule id within the family.
|
|
192
|
-
- The fixture path is `
|
|
193
|
-
`
|
|
194
|
+
- The fixture path is `packages/lint/test/testdata/corpus/<rule-id>.ts` for core rules,
|
|
195
|
+
`packages/lint/test/testdata/corpus/<family>-<rule-id>.ts(x)` for namespaced families
|
|
194
196
|
(`.tsx` only when the snippet uses JSX). Create the fixture before linking.
|
|
195
197
|
- Do NOT put license parentheticals on the `Source:` line (e.g. ` (MIT)`,
|
|
196
198
|
` (BSD-3-Clause)`). Reader can click the link and see for themselves.
|
|
197
|
-
- Do NOT mention Go test files. Every bullet links to a `
|
|
199
|
+
- Do NOT mention Go test files. Every bullet links to a `packages/lint/test/testdata/corpus/`
|
|
198
200
|
fixture; if a fixture does not exist yet, create one before adding the bullet.
|
|
199
201
|
- Update both this README **and** `website/src/content/docs/lint/rules/<family>.mdx`
|
|
200
202
|
in the same change. The mdx file uses the same colon form (`- \`<rule-id>\`: <desc>.`)
|
|
@@ -210,155 +212,155 @@ Generic ESLint-compatible rules that apply to both JavaScript and TypeScript sou
|
|
|
210
212
|
|
|
211
213
|
Source: [ESLint core rules](https://eslint.org/docs/latest/rules/).
|
|
212
214
|
|
|
213
|
-
- [`camelcase`](https://github.com/samchon/ttsc/blob/master/
|
|
214
|
-
- [`complexity`](https://github.com/samchon/ttsc/blob/master/
|
|
215
|
-
- [`consistent-return`](https://github.com/samchon/ttsc/blob/master/
|
|
216
|
-
- [`curly`](https://github.com/samchon/ttsc/blob/master/
|
|
217
|
-
- [`default-case`](https://github.com/samchon/ttsc/blob/master/
|
|
218
|
-
- [`default-case-last`](https://github.com/samchon/ttsc/blob/master/
|
|
219
|
-
- [`default-param-last`](https://github.com/samchon/ttsc/blob/master/
|
|
220
|
-
- [`dot-notation`](https://github.com/samchon/ttsc/blob/master/
|
|
221
|
-
- [`eqeqeq`](https://github.com/samchon/ttsc/blob/master/
|
|
222
|
-
- [`for-direction`](https://github.com/samchon/ttsc/blob/master/
|
|
223
|
-
- [`getter-return`](https://github.com/samchon/ttsc/blob/master/
|
|
224
|
-
- [`grouped-accessor-pairs`](https://github.com/samchon/ttsc/blob/master/
|
|
225
|
-
- [`guard-for-in`](https://github.com/samchon/ttsc/blob/master/
|
|
226
|
-
- [`id-length`](https://github.com/samchon/ttsc/blob/master/
|
|
227
|
-
- [`init-declarations`](https://github.com/samchon/ttsc/blob/master/
|
|
228
|
-
- [`max-classes-per-file`](https://github.com/samchon/ttsc/blob/master/
|
|
229
|
-
- [`max-depth`](https://github.com/samchon/ttsc/blob/master/
|
|
230
|
-
- [`max-lines`](https://github.com/samchon/ttsc/blob/master/
|
|
231
|
-
- [`max-lines-per-function`](https://github.com/samchon/ttsc/blob/master/
|
|
232
|
-
- [`max-nested-callbacks`](https://github.com/samchon/ttsc/blob/master/
|
|
233
|
-
- [`max-params`](https://github.com/samchon/ttsc/blob/master/
|
|
234
|
-
- [`max-statements`](https://github.com/samchon/ttsc/blob/master/
|
|
235
|
-
- [`no-alert`](https://github.com/samchon/ttsc/blob/master/
|
|
236
|
-
- [`no-array-constructor`](https://github.com/samchon/ttsc/blob/master/
|
|
237
|
-
- [`no-async-promise-executor`](https://github.com/samchon/ttsc/blob/master/
|
|
238
|
-
- [`no-await-in-loop`](https://github.com/samchon/ttsc/blob/master/
|
|
239
|
-
- [`no-bitwise`](https://github.com/samchon/ttsc/blob/master/
|
|
240
|
-
- [`no-caller`](https://github.com/samchon/ttsc/blob/master/
|
|
241
|
-
- [`no-case-declarations`](https://github.com/samchon/ttsc/blob/master/
|
|
242
|
-
- [`no-class-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
243
|
-
- [`no-compare-neg-zero`](https://github.com/samchon/ttsc/blob/master/
|
|
244
|
-
- [`no-cond-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
245
|
-
- [`no-console`](https://github.com/samchon/ttsc/blob/master/
|
|
246
|
-
- [`no-constant-condition`](https://github.com/samchon/ttsc/blob/master/
|
|
247
|
-
- [`no-constructor-return`](https://github.com/samchon/ttsc/blob/master/
|
|
248
|
-
- [`no-continue`](https://github.com/samchon/ttsc/blob/master/
|
|
249
|
-
- [`no-control-regex`](https://github.com/samchon/ttsc/blob/master/
|
|
250
|
-
- [`no-debugger`](https://github.com/samchon/ttsc/blob/master/
|
|
251
|
-
- [`no-delete-var`](https://github.com/samchon/ttsc/blob/master/
|
|
252
|
-
- [`no-dupe-args`](https://github.com/samchon/ttsc/blob/master/
|
|
253
|
-
- [`no-dupe-class-members`](https://github.com/samchon/ttsc/blob/master/
|
|
254
|
-
- [`no-dupe-else-if`](https://github.com/samchon/ttsc/blob/master/
|
|
255
|
-
- [`no-dupe-keys`](https://github.com/samchon/ttsc/blob/master/
|
|
256
|
-
- [`no-duplicate-case`](https://github.com/samchon/ttsc/blob/master/
|
|
257
|
-
- [`no-duplicate-imports`](https://github.com/samchon/ttsc/blob/master/
|
|
258
|
-
- [`no-else-return`](https://github.com/samchon/ttsc/blob/master/
|
|
259
|
-
- [`no-empty`](https://github.com/samchon/ttsc/blob/master/
|
|
260
|
-
- [`no-empty-character-class`](https://github.com/samchon/ttsc/blob/master/
|
|
261
|
-
- [`no-empty-function`](https://github.com/samchon/ttsc/blob/master/
|
|
262
|
-
- [`no-empty-named-blocks`](https://github.com/samchon/ttsc/blob/master/
|
|
263
|
-
- [`no-empty-pattern`](https://github.com/samchon/ttsc/blob/master/
|
|
264
|
-
- [`no-empty-static-block`](https://github.com/samchon/ttsc/blob/master/
|
|
265
|
-
- [`no-eq-null`](https://github.com/samchon/ttsc/blob/master/
|
|
266
|
-
- [`no-eval`](https://github.com/samchon/ttsc/blob/master/
|
|
267
|
-
- [`no-ex-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
268
|
-
- [`no-extend-native`](https://github.com/samchon/ttsc/blob/master/
|
|
269
|
-
- [`no-extra-bind`](https://github.com/samchon/ttsc/blob/master/
|
|
270
|
-
- [`no-extra-boolean-cast`](https://github.com/samchon/ttsc/blob/master/
|
|
271
|
-
- [`no-fallthrough`](https://github.com/samchon/ttsc/blob/master/
|
|
272
|
-
- [`no-func-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
273
|
-
- [`no-implicit-coercion`](https://github.com/samchon/ttsc/blob/master/
|
|
274
|
-
- [`no-import-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
275
|
-
- [`no-inner-declarations`](https://github.com/samchon/ttsc/blob/master/
|
|
276
|
-
- [`no-invalid-this`](https://github.com/samchon/ttsc/blob/master/
|
|
277
|
-
- [`no-irregular-whitespace`](https://github.com/samchon/ttsc/blob/master/
|
|
278
|
-
- [`no-iterator`](https://github.com/samchon/ttsc/blob/master/
|
|
279
|
-
- [`no-labels`](https://github.com/samchon/ttsc/blob/master/
|
|
280
|
-
- [`no-lone-blocks`](https://github.com/samchon/ttsc/blob/master/
|
|
281
|
-
- [`no-lonely-if`](https://github.com/samchon/ttsc/blob/master/
|
|
282
|
-
- [`no-loop-func`](https://github.com/samchon/ttsc/blob/master/
|
|
283
|
-
- [`no-loss-of-precision`](https://github.com/samchon/ttsc/blob/master/
|
|
284
|
-
- [`no-magic-numbers`](https://github.com/samchon/ttsc/blob/master/
|
|
285
|
-
- [`no-misleading-character-class`](https://github.com/samchon/ttsc/blob/master/
|
|
286
|
-
- [`no-mixed-operators`](https://github.com/samchon/ttsc/blob/master/
|
|
287
|
-
- [`no-multi-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
288
|
-
- [`no-multi-str`](https://github.com/samchon/ttsc/blob/master/
|
|
289
|
-
- [`no-negated-condition`](https://github.com/samchon/ttsc/blob/master/
|
|
290
|
-
- [`no-nested-ternary`](https://github.com/samchon/ttsc/blob/master/
|
|
291
|
-
- [`no-new`](https://github.com/samchon/ttsc/blob/master/
|
|
292
|
-
- [`no-new-func`](https://github.com/samchon/ttsc/blob/master/
|
|
293
|
-
- [`no-new-symbol`](https://github.com/samchon/ttsc/blob/master/
|
|
294
|
-
- [`no-new-wrappers`](https://github.com/samchon/ttsc/blob/master/
|
|
295
|
-
- [`no-obj-calls`](https://github.com/samchon/ttsc/blob/master/
|
|
296
|
-
- [`no-object-constructor`](https://github.com/samchon/ttsc/blob/master/
|
|
297
|
-
- [`no-octal`](https://github.com/samchon/ttsc/blob/master/
|
|
298
|
-
- [`no-octal-escape`](https://github.com/samchon/ttsc/blob/master/
|
|
299
|
-
- [`no-param-reassign`](https://github.com/samchon/ttsc/blob/master/
|
|
300
|
-
- [`no-plusplus`](https://github.com/samchon/ttsc/blob/master/
|
|
301
|
-
- [`no-promise-executor-return`](https://github.com/samchon/ttsc/blob/master/
|
|
302
|
-
- [`no-proto`](https://github.com/samchon/ttsc/blob/master/
|
|
303
|
-
- [`no-prototype-builtins`](https://github.com/samchon/ttsc/blob/master/
|
|
304
|
-
- [`no-redeclare`](https://github.com/samchon/ttsc/blob/master/
|
|
305
|
-
- [`no-regex-spaces`](https://github.com/samchon/ttsc/blob/master/
|
|
306
|
-
- [`no-restricted-imports`](https://github.com/samchon/ttsc/blob/master/
|
|
307
|
-
- [`no-restricted-syntax`](https://github.com/samchon/ttsc/blob/master/
|
|
308
|
-
- [`no-return-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
309
|
-
- [`no-script-url`](https://github.com/samchon/ttsc/blob/master/
|
|
310
|
-
- [`no-self-assign`](https://github.com/samchon/ttsc/blob/master/
|
|
311
|
-
- [`no-self-compare`](https://github.com/samchon/ttsc/blob/master/
|
|
312
|
-
- [`no-sequences`](https://github.com/samchon/ttsc/blob/master/
|
|
313
|
-
- [`no-setter-return`](https://github.com/samchon/ttsc/blob/master/
|
|
314
|
-
- [`no-shadow`](https://github.com/samchon/ttsc/blob/master/
|
|
315
|
-
- [`no-shadow-restricted-names`](https://github.com/samchon/ttsc/blob/master/
|
|
316
|
-
- [`no-sparse-arrays`](https://github.com/samchon/ttsc/blob/master/
|
|
317
|
-
- [`no-template-curly-in-string`](https://github.com/samchon/ttsc/blob/master/
|
|
318
|
-
- [`no-this-before-super`](https://github.com/samchon/ttsc/blob/master/
|
|
319
|
-
- [`no-throw-literal`](https://github.com/samchon/ttsc/blob/master/
|
|
320
|
-
- [`no-undef-init`](https://github.com/samchon/ttsc/blob/master/
|
|
321
|
-
- [`no-undefined`](https://github.com/samchon/ttsc/blob/master/
|
|
322
|
-
- [`no-unneeded-ternary`](https://github.com/samchon/ttsc/blob/master/
|
|
323
|
-
- [`no-unreachable`](https://github.com/samchon/ttsc/blob/master/
|
|
324
|
-
- [`no-unsafe-finally`](https://github.com/samchon/ttsc/blob/master/
|
|
325
|
-
- [`no-unsafe-negation`](https://github.com/samchon/ttsc/blob/master/
|
|
326
|
-
- [`no-unsafe-optional-chaining`](https://github.com/samchon/ttsc/blob/master/
|
|
327
|
-
- [`no-unused-expressions`](https://github.com/samchon/ttsc/blob/master/
|
|
328
|
-
- [`no-unused-labels`](https://github.com/samchon/ttsc/blob/master/
|
|
329
|
-
- [`no-useless-assignment`](https://github.com/samchon/ttsc/blob/master/
|
|
330
|
-
- [`no-useless-call`](https://github.com/samchon/ttsc/blob/master/
|
|
331
|
-
- [`no-useless-catch`](https://github.com/samchon/ttsc/blob/master/
|
|
332
|
-
- [`no-useless-computed-key`](https://github.com/samchon/ttsc/blob/master/
|
|
333
|
-
- [`no-useless-concat`](https://github.com/samchon/ttsc/blob/master/
|
|
334
|
-
- [`no-useless-constructor`](https://github.com/samchon/ttsc/blob/master/
|
|
335
|
-
- [`no-useless-escape`](https://github.com/samchon/ttsc/blob/master/
|
|
336
|
-
- [`no-useless-rename`](https://github.com/samchon/ttsc/blob/master/
|
|
337
|
-
- [`no-useless-return`](https://github.com/samchon/ttsc/blob/master/
|
|
338
|
-
- [`no-var`](https://github.com/samchon/ttsc/blob/master/
|
|
339
|
-
- [`no-with`](https://github.com/samchon/ttsc/blob/master/
|
|
340
|
-
- [`object-shorthand`](https://github.com/samchon/ttsc/blob/master/
|
|
341
|
-
- [`operator-assignment`](https://github.com/samchon/ttsc/blob/master/
|
|
342
|
-
- [`prefer-arrow-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
343
|
-
- [`prefer-const`](https://github.com/samchon/ttsc/blob/master/
|
|
344
|
-
- [`prefer-destructuring`](https://github.com/samchon/ttsc/blob/master/
|
|
345
|
-
- [`prefer-exponentiation-operator`](https://github.com/samchon/ttsc/blob/master/
|
|
346
|
-
- [`prefer-for-of`](https://github.com/samchon/ttsc/blob/master/
|
|
347
|
-
- [`prefer-named-capture-group`](https://github.com/samchon/ttsc/blob/master/
|
|
348
|
-
- [`prefer-numeric-literals`](https://github.com/samchon/ttsc/blob/master/
|
|
349
|
-
- [`prefer-object-has-own`](https://github.com/samchon/ttsc/blob/master/
|
|
350
|
-
- [`prefer-object-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
351
|
-
- [`prefer-rest-params`](https://github.com/samchon/ttsc/blob/master/
|
|
352
|
-
- [`prefer-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
353
|
-
- [`prefer-template`](https://github.com/samchon/ttsc/blob/master/
|
|
354
|
-
- [`radix`](https://github.com/samchon/ttsc/blob/master/
|
|
355
|
-
- [`require-yield`](https://github.com/samchon/ttsc/blob/master/
|
|
356
|
-
- [`sort-imports`](https://github.com/samchon/ttsc/blob/master/
|
|
357
|
-
- [`sort-keys`](https://github.com/samchon/ttsc/blob/master/
|
|
358
|
-
- [`use-isnan`](https://github.com/samchon/ttsc/blob/master/
|
|
359
|
-
- [`valid-typeof`](https://github.com/samchon/ttsc/blob/master/
|
|
360
|
-
- [`vars-on-top`](https://github.com/samchon/ttsc/blob/master/
|
|
361
|
-
- [`yoda`](https://github.com/samchon/ttsc/blob/master/
|
|
215
|
+
- [`camelcase`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/camelcase.ts): reject identifier declarations that aren't camelCase or PascalCase, snake_case bindings are flagged.
|
|
216
|
+
- [`complexity`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/complexity.ts): reject function bodies whose cyclomatic complexity exceeds twenty (default ESLint threshold).
|
|
217
|
+
- [`consistent-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/consistent-return.ts): reject functions where some `return` statements return a value and others fall through without one.
|
|
218
|
+
- [`curly`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/curly.ts): require block statements for every `if`, `else`, `while`, `for`, and `do` body. Reject the single-statement shorthand.
|
|
219
|
+
- [`default-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/default-case.ts): require `switch` statements to include a `default` clause.
|
|
220
|
+
- [`default-case-last`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/default-case-last.ts): require the `default` clause of a `switch` statement to appear last.
|
|
221
|
+
- [`default-param-last`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/default-param-last.ts): keeps parameters with default values at the end of the list.
|
|
222
|
+
- [`dot-notation`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/dot-notation.ts): prefers dot property access when a string-literal key is a valid identifier.
|
|
223
|
+
- [`eqeqeq`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/eqeqeq.ts): requires strict equality operators.
|
|
224
|
+
- [`for-direction`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/for-direction.ts): catches loop counters updated in the wrong direction.
|
|
225
|
+
- [`getter-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/getter-return.ts): require a `get` accessor's body to return a value on every reachable exit.
|
|
226
|
+
- [`grouped-accessor-pairs`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/grouped-accessor-pairs.ts): require the `get` and `set` accessors of a property to be declared adjacent in the class body.
|
|
227
|
+
- [`guard-for-in`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/guard-for-in.ts): require a `for...in` body to be wrapped in an `if` statement (or to skip iterations with a leading `if (...) continue`) so inherited keys are guarded, matching ESLint core's structural check.
|
|
228
|
+
- [`id-length`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/id-length.ts): reject identifier names shorter than two characters.
|
|
229
|
+
- [`init-declarations`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/init-declarations.ts): require every `var` / `let` declaration to be initialized at its declaration site.
|
|
230
|
+
- [`max-classes-per-file`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-classes-per-file.ts): reject a source file that declares more than one class.
|
|
231
|
+
- [`max-depth`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-depth.ts): reject block-statement nesting deeper than four levels inside a function.
|
|
232
|
+
- [`max-lines`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-lines.ts): reject a source file whose total line count exceeds three hundred.
|
|
233
|
+
- [`max-lines-per-function`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-lines-per-function.ts): reject a function whose body spans more than fifty lines.
|
|
234
|
+
- [`max-nested-callbacks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-nested-callbacks.ts): reject callback nesting deeper than ten inside a single function.
|
|
235
|
+
- [`max-params`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-params.ts): reject function declarations with more than three parameters.
|
|
236
|
+
- [`max-statements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/max-statements.ts): reject function bodies whose statement count exceeds ten.
|
|
237
|
+
- [`no-alert`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-alert.ts): rejects `alert`, `confirm`, and `prompt`.
|
|
238
|
+
- [`no-array-constructor`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-array-constructor.ts): rejects `Array` constructor calls.
|
|
239
|
+
- [`no-async-promise-executor`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-async-promise-executor.ts): rejects async Promise executors.
|
|
240
|
+
- [`no-await-in-loop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-await-in-loop.ts): reject explicit and implicit awaits evaluated in repeated loop positions.
|
|
241
|
+
- [`no-bitwise`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-bitwise.ts): rejects bitwise operators.
|
|
242
|
+
- [`no-caller`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-caller.ts): rejects `arguments.caller` and `arguments.callee`.
|
|
243
|
+
- [`no-case-declarations`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-case-declarations.ts): rejects lexical declarations directly inside `case` clauses.
|
|
244
|
+
- [`no-class-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-class-assign.ts): rejects reassignment of class declarations.
|
|
245
|
+
- [`no-compare-neg-zero`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-compare-neg-zero.ts): rejects comparisons against `-0`.
|
|
246
|
+
- [`no-cond-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-cond-assign.ts): rejects assignments inside conditions.
|
|
247
|
+
- [`no-console`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-console.ts): rejects `console` calls.
|
|
248
|
+
- [`no-constant-condition`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-constant-condition.ts): rejects constant conditions.
|
|
249
|
+
- [`no-constructor-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-constructor-return.ts): reject `return X;` (with a value) inside a class constructor.
|
|
250
|
+
- [`no-continue`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-continue.ts): rejects `continue` statements.
|
|
251
|
+
- [`no-control-regex`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-control-regex.ts): rejects control characters in regular expressions.
|
|
252
|
+
- [`no-debugger`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-debugger.ts): rejects `debugger` statements.
|
|
253
|
+
- [`no-delete-var`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-delete-var.ts): rejects deleting variables.
|
|
254
|
+
- [`no-dupe-args`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-dupe-args.ts): rejects duplicate function parameters.
|
|
255
|
+
- [`no-dupe-class-members`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-dupe-class-members.ts): reject two declarations of the same member on a single class.
|
|
256
|
+
- [`no-dupe-else-if`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-dupe-else-if.ts): rejects duplicate or logically covered `else if` conditions.
|
|
257
|
+
- [`no-dupe-keys`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-dupe-keys.ts): rejects duplicate object keys.
|
|
258
|
+
- [`no-duplicate-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-duplicate-case.ts): rejects duplicate `switch` case labels.
|
|
259
|
+
- [`no-duplicate-imports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-duplicate-imports.ts): reject a repeated module specifier when the import declarations could be merged into one; `allowSeparateTypeImports` and `includeExports` match the ESLint options.
|
|
260
|
+
- [`no-else-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-else-return.ts): reject an `else` block whose preceding `if` branch returns on every path.
|
|
261
|
+
- [`no-empty`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty.ts): rejects uncommented empty blocks and switches; `allowEmptyCatch` accepts empty catches.
|
|
262
|
+
- [`no-empty-character-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-character-class.ts): rejects empty regex character classes.
|
|
263
|
+
- [`no-empty-function`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-function.ts): rejects uncommented empty functions unless their category is allowed.
|
|
264
|
+
- [`no-empty-named-blocks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-named-blocks.ts): rejects empty named import/export clauses (`import {} from "x"`, `export {}`).
|
|
265
|
+
- [`no-empty-pattern`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-pattern.ts): rejects empty destructuring patterns.
|
|
266
|
+
- [`no-empty-static-block`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-static-block.ts): rejects uncommented empty class static blocks.
|
|
267
|
+
- [`no-eq-null`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-eq-null.ts): rejects loose null comparisons.
|
|
268
|
+
- [`no-eval`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-eval.ts): rejects `eval`.
|
|
269
|
+
- [`no-ex-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-ex-assign.ts): rejects reassignment of caught exceptions.
|
|
270
|
+
- [`no-extend-native`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-extend-native.ts): reject assignments to a built-in prototype such as `Array.prototype.foo = bar`.
|
|
271
|
+
- [`no-extra-bind`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-extra-bind.ts): rejects `.bind(thisArg)` on arrows and regular functions that never read their own `this`, while preserving partial application.
|
|
272
|
+
- [`no-extra-boolean-cast`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-extra-boolean-cast.ts): rejects redundant boolean casts.
|
|
273
|
+
- [`no-fallthrough`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-fallthrough.ts): rejects `switch` cases whose end is reachable and that lack an intentional `// falls through` comment before the next label.
|
|
274
|
+
- [`no-func-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-func-assign.ts): rejects reassignment of function declarations.
|
|
275
|
+
- [`no-implicit-coercion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-implicit-coercion.ts): prefer named conversions to `!!x`, `+x`, and empty-string concatenation; authors check BigInt acceptance and primitive hints.
|
|
276
|
+
- [`no-import-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-import-assign.ts): resolves imported bindings through the checker and rejects assignments, destructuring and loop writes, plus direct namespace mutations such as `ns.x = ...` and `Object.assign(ns, value)`.
|
|
277
|
+
- [`no-inner-declarations`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-inner-declarations.ts): rejects block functions with legacy sloppy semantics; `"both"` also checks nested `var` declarations.
|
|
278
|
+
- [`no-invalid-this`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-invalid-this.ts): reject `this` references outside any function-like, class method, or class-static-block context.
|
|
279
|
+
- [`no-irregular-whitespace`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-irregular-whitespace.ts): rejects irregular whitespace.
|
|
280
|
+
- [`no-iterator`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-iterator.ts): rejects `__iterator__`.
|
|
281
|
+
- [`no-labels`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-labels.ts): rejects labels.
|
|
282
|
+
- [`no-lone-blocks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-lone-blocks.ts): rejects unnecessary standalone blocks.
|
|
283
|
+
- [`no-lonely-if`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-lonely-if.ts): rejects `if` as the only statement in an `else`.
|
|
284
|
+
- [`no-loop-func`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-loop-func.ts): reject loop-created closures only when they capture bindings that can change between iterations.
|
|
285
|
+
- [`no-loss-of-precision`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-loss-of-precision.ts): rejects number literals that lose precision.
|
|
286
|
+
- [`no-magic-numbers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-magic-numbers.ts): reject inline numeric literals outside `const` initializer position. `0`, `1`, `-1`, array indices, and enum values are exempt.
|
|
287
|
+
- [`no-misleading-character-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-misleading-character-class.ts): rejects misleading regex character classes.
|
|
288
|
+
- [`no-mixed-operators`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-mixed-operators.ts): reject mixing operators of different precedence families in the same expression without explicit parentheses around the inner sub-expression.
|
|
289
|
+
- [`no-multi-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-multi-assign.ts): rejects chained assignments.
|
|
290
|
+
- [`no-multi-str`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-multi-str.ts): rejects multiline string escapes.
|
|
291
|
+
- [`no-negated-condition`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-negated-condition.ts): rejects negated conditions with an `else`.
|
|
292
|
+
- [`no-nested-ternary`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-nested-ternary.ts): rejects nested ternary expressions.
|
|
293
|
+
- [`no-new`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-new.ts): rejects `new` expressions used only for side effects.
|
|
294
|
+
- [`no-new-func`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-new-func.ts): rejects `Function` constructors.
|
|
295
|
+
- [`no-new-symbol`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-new-symbol.ts): reject `new Symbol(...)`.
|
|
296
|
+
- [`no-new-wrappers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-new-wrappers.ts): rejects primitive wrapper constructors.
|
|
297
|
+
- [`no-obj-calls`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-obj-calls.ts): rejects calling global objects as functions.
|
|
298
|
+
- [`no-object-constructor`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-object-constructor.ts): rejects `new Object()`.
|
|
299
|
+
- [`no-octal`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-octal.ts): rejects legacy octal literals.
|
|
300
|
+
- [`no-octal-escape`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-octal-escape.ts): rejects octal escape sequences.
|
|
301
|
+
- [`no-param-reassign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-param-reassign.ts): rejects writes to parameter bindings, with `props` and property-ignore options matching ESLint.
|
|
302
|
+
- [`no-plusplus`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-plusplus.ts): rejects `++` and `--`.
|
|
303
|
+
- [`no-promise-executor-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-promise-executor-return.ts): rejects values returned by global Promise executors, with an `allowVoid` option for explicit unary `void` returns.
|
|
304
|
+
- [`no-proto`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-proto.ts): rejects `__proto__`.
|
|
305
|
+
- [`no-prototype-builtins`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-prototype-builtins.ts): rejects direct `Object.prototype` method calls.
|
|
306
|
+
- [`no-redeclare`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-redeclare.ts): rejects redeclaring a binding in the same scope.
|
|
307
|
+
- [`no-regex-spaces`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-regex-spaces.ts): rejects repeated literal spaces in regexes.
|
|
308
|
+
- [`no-restricted-imports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-restricted-imports.ts): reject static imports and re-exports selected by user-configured exact paths, gitignore-style groups, or regular expressions.
|
|
309
|
+
- [`no-restricted-syntax`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-restricted-syntax.ts): reject only syntax matching the project's configured TypeScript-Go AST selectors; no selectors means no restrictions.
|
|
310
|
+
- [`no-return-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-return-assign.ts): rejects assignments in `return`.
|
|
311
|
+
- [`no-script-url`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-script-url.ts): rejects `javascript:` URLs.
|
|
312
|
+
- [`no-self-assign`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-self-assign.ts): rejects assignments to the same value.
|
|
313
|
+
- [`no-self-compare`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-self-compare.ts): rejects comparing a value to itself.
|
|
314
|
+
- [`no-sequences`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-sequences.ts): rejects comma expressions.
|
|
315
|
+
- [`no-setter-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-setter-return.ts): rejects returned values from setters.
|
|
316
|
+
- [`no-shadow`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-shadow.ts): reject a nested-scope binding that shadows a same-name binding from an outer scope.
|
|
317
|
+
- [`no-shadow-restricted-names`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-shadow-restricted-names.ts): rejects shadowing restricted globals.
|
|
318
|
+
- [`no-sparse-arrays`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-sparse-arrays.ts): rejects sparse arrays.
|
|
319
|
+
- [`no-template-curly-in-string`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-template-curly-in-string.ts): rejects `${...}` text inside normal strings.
|
|
320
|
+
- [`no-this-before-super`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-this-before-super.ts): reject `this` (or `super.x`) references that precede the first `super()` call in a derived constructor.
|
|
321
|
+
- [`no-throw-literal`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-throw-literal.ts): rejects throwing literals.
|
|
322
|
+
- [`no-undef-init`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-undef-init.ts): rejects initializing to `undefined`.
|
|
323
|
+
- [`no-undefined`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-undefined.ts): rejects the global `undefined` identifier.
|
|
324
|
+
- [`no-unneeded-ternary`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unneeded-ternary.ts): rejects redundant ternary expressions.
|
|
325
|
+
- [`no-unreachable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unreachable.ts): reject statements that follow an unconditional `return`, `throw`, `break`, or `continue` in the same block, control flow has already left the block, so any later statement is dead code.
|
|
326
|
+
- [`no-unsafe-finally`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unsafe-finally.ts): rejects control flow from `finally`.
|
|
327
|
+
- [`no-unsafe-negation`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unsafe-negation.ts): rejects unsafe negation before relational checks.
|
|
328
|
+
- [`no-unsafe-optional-chaining`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unsafe-optional-chaining.ts): reject member access or call expressions that chain off an optional chain without continuing the chain.
|
|
329
|
+
- [`no-unused-expressions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unused-expressions.ts): rejects expression statements with no effect under ESLint's default semantics, accepting directive prologues (arbitrary text, determined by AST position) and productive expressions such as `void promise()` while rejecting tagged templates and misplaced strings; the upstream options are supported.
|
|
330
|
+
- [`no-unused-labels`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unused-labels.ts): rejects labels that no `break` or `continue` targets.
|
|
331
|
+
- [`no-useless-assignment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-assignment.ts): reject an assignment whose value is immediately overwritten by the very next statement without an intervening read of the same identifier.
|
|
332
|
+
- [`no-useless-call`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-call.ts): rejects unnecessary `.call()` and `.apply()`.
|
|
333
|
+
- [`no-useless-catch`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-catch.ts): rejects catch blocks that only rethrow.
|
|
334
|
+
- [`no-useless-computed-key`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-computed-key.ts): rejects unnecessary computed property keys.
|
|
335
|
+
- [`no-useless-concat`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-concat.ts): rejects unnecessary string concatenation.
|
|
336
|
+
- [`no-useless-constructor`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-constructor.ts): reject empty base constructors and exact single-rest super forwarding; zero or fixed-prefix derived calls filter caller arguments and remain meaningful.
|
|
337
|
+
- [`no-useless-escape`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-escape.ts): rejects backslash escapes that have no effect inside strings or regexes.
|
|
338
|
+
- [`no-useless-rename`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-rename.ts): rejects import/export/destructure renames to the same name.
|
|
339
|
+
- [`no-useless-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-return.ts): reject a bare `return;` whose only effect is to end a function body that would have returned anyway.
|
|
340
|
+
- [`no-var`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-var.ts): rejects `var`.
|
|
341
|
+
- [`no-with`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-with.ts): rejects `with` statements.
|
|
342
|
+
- [`object-shorthand`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/object-shorthand.ts): requires object property shorthand where possible.
|
|
343
|
+
- [`operator-assignment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/operator-assignment.ts): prefers compound assignment operators.
|
|
344
|
+
- [`prefer-arrow-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-arrow-callback.ts): reject `function() { ... }` expressions passed as callback arguments. Prefer the arrow form.
|
|
345
|
+
- [`prefer-const`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-const.ts): prefers `const` for lexical `let` bindings that are never reassigned, including declaration-only and destructured bindings with ESLint-compatible options.
|
|
346
|
+
- [`prefer-destructuring`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-destructuring.ts): reject single-property and single-index variable declarations (`const a = obj.a`, `const x = arr[0]`) that destructuring would replace verbatim.
|
|
347
|
+
- [`prefer-exponentiation-operator`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-exponentiation-operator.ts): prefers `**` over `Math.pow`.
|
|
348
|
+
- [`prefer-for-of`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-for-of.ts): prefers `for...of` for simple array iteration.
|
|
349
|
+
- [`prefer-named-capture-group`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-named-capture-group.ts): reject regex literals with unnamed capturing groups `(...)`. Prefer named groups `(?<name>...)`.
|
|
350
|
+
- [`prefer-numeric-literals`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-numeric-literals.ts): prefer ES2015+ numeric literal forms (`0b…`, `0o…`, `0x…`) over `parseInt(string, 2 | 8 | 16)`.
|
|
351
|
+
- [`prefer-object-has-own`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-object-has-own.ts): prefer `Object.hasOwn(obj, key)` over `Object.prototype.hasOwnProperty.call(obj, key)`.
|
|
352
|
+
- [`prefer-object-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-object-spread.ts): prefer object-spread `{ ...a, ...b }` over `Object.assign({}, a, b)`.
|
|
353
|
+
- [`prefer-rest-params`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-rest-params.ts): reject reading from `arguments` in a non-arrow function body. Prefer the ES2015 rest-parameter form `(...args)`.
|
|
354
|
+
- [`prefer-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-spread.ts): prefers spread arguments over `.apply`.
|
|
355
|
+
- [`prefer-template`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-template.ts): prefers template literals over string concatenation.
|
|
356
|
+
- [`radix`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/radix.ts): requires a radix argument for `parseInt`.
|
|
357
|
+
- [`require-yield`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/require-yield.ts): requires generator functions to contain `yield`.
|
|
358
|
+
- [`sort-imports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/sort-imports.ts): reject import specifiers within a single `import` declaration that aren't alphabetically sorted.
|
|
359
|
+
- [`sort-keys`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/sort-keys.ts): reject object-literal property keys that aren't alphabetically sorted.
|
|
360
|
+
- [`use-isnan`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/use-isnan.ts): requires `Number.isNaN`/`isNaN` for `NaN` checks.
|
|
361
|
+
- [`valid-typeof`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/valid-typeof.ts): restricts `typeof` comparisons to valid strings.
|
|
362
|
+
- [`vars-on-top`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vars-on-top.ts): requires `var` declarations at the top of their scope.
|
|
363
|
+
- [`yoda`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/yoda.ts): rejects literal-first comparisons.
|
|
362
364
|
|
|
363
365
|
### TypeScript
|
|
364
366
|
|
|
@@ -366,104 +368,104 @@ TypeScript-only rules and `@typescript-eslint` plugin equivalents, exposed under
|
|
|
366
368
|
|
|
367
369
|
Source: [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint).
|
|
368
370
|
|
|
369
|
-
- [`typescript/adjacent-overload-signatures`](https://github.com/samchon/ttsc/blob/master/
|
|
370
|
-
- [`typescript/array-type`](https://github.com/samchon/ttsc/blob/master/
|
|
371
|
-
- [`typescript/await-thenable`](https://github.com/samchon/ttsc/blob/master/
|
|
372
|
-
- [`typescript/ban-ts-comment`](https://github.com/samchon/ttsc/blob/master/
|
|
373
|
-
- [`typescript/ban-tslint-comment`](https://github.com/samchon/ttsc/blob/master/
|
|
374
|
-
- [`typescript/class-literal-property-style`](https://github.com/samchon/ttsc/blob/master/
|
|
375
|
-
- [`typescript/consistent-generic-constructors`](https://github.com/samchon/ttsc/blob/master/
|
|
376
|
-
- [`typescript/consistent-indexed-object-style`](https://github.com/samchon/ttsc/blob/master/
|
|
377
|
-
- [`typescript/consistent-type-assertions`](https://github.com/samchon/ttsc/blob/master/
|
|
378
|
-
- [`typescript/consistent-type-definitions`](https://github.com/samchon/ttsc/blob/master/
|
|
379
|
-
- [`typescript/consistent-type-exports`](https://github.com/samchon/ttsc/blob/master/
|
|
380
|
-
- [`typescript/consistent-type-imports`](https://github.com/samchon/ttsc/blob/master/
|
|
381
|
-
- [`typescript/explicit-function-return-type`](https://github.com/samchon/ttsc/blob/master/
|
|
382
|
-
- [`typescript/explicit-member-accessibility`](https://github.com/samchon/ttsc/blob/master/
|
|
383
|
-
- [`typescript/method-signature-style`](https://github.com/samchon/ttsc/blob/master/
|
|
384
|
-
- [`typescript/no-array-delete`](https://github.com/samchon/ttsc/blob/master/
|
|
385
|
-
- [`typescript/no-array-for-each`](https://github.com/samchon/ttsc/blob/master/
|
|
386
|
-
- [`typescript/no-base-to-string`](https://github.com/samchon/ttsc/blob/master/
|
|
387
|
-
- [`typescript/no-confusing-non-null-assertion`](https://github.com/samchon/ttsc/blob/master/
|
|
388
|
-
- [`typescript/no-confusing-void-expression`](https://github.com/samchon/ttsc/blob/master/
|
|
389
|
-
- [`typescript/no-deprecated`](https://github.com/samchon/ttsc/blob/master/
|
|
390
|
-
- [`typescript/no-duplicate-enum-values`](https://github.com/samchon/ttsc/blob/master/
|
|
391
|
-
- [`typescript/no-dynamic-delete`](https://github.com/samchon/ttsc/blob/master/
|
|
392
|
-
- [`typescript/no-empty-interface`](https://github.com/samchon/ttsc/blob/master/
|
|
393
|
-
- [`typescript/no-empty-object-type`](https://github.com/samchon/ttsc/blob/master/
|
|
394
|
-
- [`typescript/no-explicit-any`](https://github.com/samchon/ttsc/blob/master/
|
|
395
|
-
- [`typescript/no-extra-non-null-assertion`](https://github.com/samchon/ttsc/blob/master/
|
|
396
|
-
- [`typescript/no-extraneous-class`](https://github.com/samchon/ttsc/blob/master/
|
|
397
|
-
- [`typescript/no-floating-promises`](https://github.com/samchon/ttsc/blob/master/
|
|
398
|
-
- [`typescript/no-for-in-array`](https://github.com/samchon/ttsc/blob/master/
|
|
399
|
-
- [`typescript/no-import-type-side-effects`](https://github.com/samchon/ttsc/blob/master/
|
|
400
|
-
- [`typescript/no-inferrable-types`](https://github.com/samchon/ttsc/blob/master/
|
|
401
|
-
- [`typescript/no-invalid-void-type`](https://github.com/samchon/ttsc/blob/master/
|
|
402
|
-
- [`typescript/no-magic-numbers`](https://github.com/samchon/ttsc/blob/master/
|
|
403
|
-
- [`typescript/no-meaningless-void-operator`](https://github.com/samchon/ttsc/blob/master/
|
|
404
|
-
- [`typescript/no-misused-new`](https://github.com/samchon/ttsc/blob/master/
|
|
405
|
-
- [`typescript/no-misused-promises`](https://github.com/samchon/ttsc/blob/master/
|
|
406
|
-
- [`typescript/no-misused-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
407
|
-
- [`typescript/no-mixed-enums`](https://github.com/samchon/ttsc/blob/master/
|
|
408
|
-
- [`typescript/no-namespace`](https://github.com/samchon/ttsc/blob/master/
|
|
409
|
-
- [`typescript/no-non-null-asserted-nullish-coalescing`](https://github.com/samchon/ttsc/blob/master/
|
|
410
|
-
- [`typescript/no-non-null-asserted-optional-chain`](https://github.com/samchon/ttsc/blob/master/
|
|
411
|
-
- [`typescript/no-non-null-assertion`](https://github.com/samchon/ttsc/blob/master/
|
|
412
|
-
- [`typescript/no-redundant-type-constituents`](https://github.com/samchon/ttsc/blob/master/
|
|
413
|
-
- [`typescript/no-require-imports`](https://github.com/samchon/ttsc/blob/master/
|
|
414
|
-
- [`typescript/no-restricted-types`](https://github.com/samchon/ttsc/blob/master/
|
|
415
|
-
- [`typescript/no-this-alias`](https://github.com/samchon/ttsc/blob/master/
|
|
416
|
-
- [`typescript/no-unnecessary-boolean-literal-compare`](https://github.com/samchon/ttsc/blob/master/
|
|
417
|
-
- [`typescript/no-unnecessary-condition`](https://github.com/samchon/ttsc/blob/master/
|
|
418
|
-
- [`typescript/no-unnecessary-parameter-property-assignment`](https://github.com/samchon/ttsc/blob/master/
|
|
419
|
-
- [`typescript/no-unnecessary-qualifier`](https://github.com/samchon/ttsc/blob/master/
|
|
420
|
-
- [`typescript/no-unnecessary-template-expression`](https://github.com/samchon/ttsc/blob/master/
|
|
421
|
-
- [`typescript/no-unnecessary-type-arguments`](https://github.com/samchon/ttsc/blob/master/
|
|
422
|
-
- [`typescript/no-unnecessary-type-assertion`](https://github.com/samchon/ttsc/blob/master/
|
|
423
|
-
- [`typescript/no-unnecessary-type-constraint`](https://github.com/samchon/ttsc/blob/master/
|
|
424
|
-
- [`typescript/no-unsafe-argument`](https://github.com/samchon/ttsc/blob/master/
|
|
425
|
-
- [`typescript/no-unsafe-assignment`](https://github.com/samchon/ttsc/blob/master/
|
|
426
|
-
- [`typescript/no-unsafe-call`](https://github.com/samchon/ttsc/blob/master/
|
|
427
|
-
- [`typescript/no-unsafe-declaration-merging`](https://github.com/samchon/ttsc/blob/master/
|
|
428
|
-
- [`typescript/no-unsafe-enum-comparison`](https://github.com/samchon/ttsc/blob/master/
|
|
429
|
-
- [`typescript/no-unsafe-function-type`](https://github.com/samchon/ttsc/blob/master/
|
|
430
|
-
- [`typescript/no-unsafe-member-access`](https://github.com/samchon/ttsc/blob/master/
|
|
431
|
-
- [`typescript/no-unsafe-return`](https://github.com/samchon/ttsc/blob/master/
|
|
432
|
-
- [`typescript/no-unsafe-unary-minus`](https://github.com/samchon/ttsc/blob/master/
|
|
433
|
-
- [`typescript/no-useless-constructor`](https://github.com/samchon/ttsc/blob/master/
|
|
434
|
-
- [`typescript/no-useless-empty-export`](https://github.com/samchon/ttsc/blob/master/
|
|
435
|
-
- [`typescript/no-wrapper-object-types`](https://github.com/samchon/ttsc/blob/master/
|
|
436
|
-
- [`typescript/non-nullable-type-assertion-style`](https://github.com/samchon/ttsc/blob/master/
|
|
437
|
-
- [`typescript/only-throw-error`](https://github.com/samchon/ttsc/blob/master/
|
|
438
|
-
- [`typescript/parameter-properties`](https://github.com/samchon/ttsc/blob/master/
|
|
439
|
-
- [`typescript/prefer-as-const`](https://github.com/samchon/ttsc/blob/master/
|
|
440
|
-
- [`typescript/prefer-enum-initializers`](https://github.com/samchon/ttsc/blob/master/
|
|
441
|
-
- [`typescript/prefer-find`](https://github.com/samchon/ttsc/blob/master/
|
|
442
|
-
- [`typescript/prefer-function-type`](https://github.com/samchon/ttsc/blob/master/
|
|
443
|
-
- [`typescript/prefer-includes`](https://github.com/samchon/ttsc/blob/master/
|
|
444
|
-
- [`typescript/prefer-literal-enum-member`](https://github.com/samchon/ttsc/blob/master/
|
|
445
|
-
- [`typescript/prefer-namespace-keyword`](https://github.com/samchon/ttsc/blob/master/
|
|
446
|
-
- [`typescript/prefer-nullish-coalescing`](https://github.com/samchon/ttsc/blob/master/
|
|
447
|
-
- [`typescript/prefer-optional-chain`](https://github.com/samchon/ttsc/blob/master/
|
|
448
|
-
- [`typescript/prefer-promise-reject-errors`](https://github.com/samchon/ttsc/blob/master/
|
|
449
|
-
- [`typescript/prefer-readonly`](https://github.com/samchon/ttsc/blob/master/
|
|
450
|
-
- [`typescript/prefer-reduce-type-parameter`](https://github.com/samchon/ttsc/blob/master/
|
|
451
|
-
- [`typescript/prefer-regexp-exec`](https://github.com/samchon/ttsc/blob/master/
|
|
452
|
-
- [`typescript/prefer-return-this-type`](https://github.com/samchon/ttsc/blob/master/
|
|
453
|
-
- [`typescript/prefer-string-starts-ends-with`](https://github.com/samchon/ttsc/blob/master/
|
|
454
|
-
- [`typescript/promise-function-async`](https://github.com/samchon/ttsc/blob/master/
|
|
455
|
-
- [`typescript/related-getter-setter-pairs`](https://github.com/samchon/ttsc/blob/master/
|
|
456
|
-
- [`typescript/require-array-sort-compare`](https://github.com/samchon/ttsc/blob/master/
|
|
457
|
-
- [`typescript/require-await`](https://github.com/samchon/ttsc/blob/master/
|
|
458
|
-
- [`typescript/restrict-plus-operands`](https://github.com/samchon/ttsc/blob/master/
|
|
459
|
-
- [`typescript/restrict-template-expressions`](https://github.com/samchon/ttsc/blob/master/
|
|
460
|
-
- [`typescript/return-await`](https://github.com/samchon/ttsc/blob/master/
|
|
461
|
-
- [`typescript/sort-type-constituents`](https://github.com/samchon/ttsc/blob/master/
|
|
462
|
-
- [`typescript/strict-boolean-expressions`](https://github.com/samchon/ttsc/blob/master/
|
|
463
|
-
- [`typescript/switch-exhaustiveness-check`](https://github.com/samchon/ttsc/blob/master/
|
|
464
|
-
- [`typescript/triple-slash-reference`](https://github.com/samchon/ttsc/blob/master/
|
|
465
|
-
- [`typescript/unbound-method`](https://github.com/samchon/ttsc/blob/master/
|
|
466
|
-
- [`typescript/use-unknown-in-catch-callback-variable`](https://github.com/samchon/ttsc/blob/master/
|
|
371
|
+
- [`typescript/adjacent-overload-signatures`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/adjacent-overload-signatures.ts): keeps overload declarations for the same member adjacent.
|
|
372
|
+
- [`typescript/array-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/array-type.ts): prefers `T[]` and `readonly T[]` over array helper types.
|
|
373
|
+
- [`typescript/await-thenable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/await-thenable.ts): rejects `await` on a value that is neither a Promise nor a thenable, non-awaitable members passed to native Promise aggregators, `for await...of` over a value that is not async iterable, and `await using` of a resource that is not async disposable (type-aware).
|
|
374
|
+
- [`typescript/ban-ts-comment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/ban-ts-comment.ts): rejects `@ts-ignore` and `@ts-nocheck`, and requires a description after `@ts-expect-error` (upstream recommended defaults; each directive configurable via `boolean`, `"allow-with-description"`, or `{ descriptionFormat }`).
|
|
375
|
+
- [`typescript/ban-tslint-comment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/ban-tslint-comment.ts): rejects obsolete `tslint:` comments.
|
|
376
|
+
- [`typescript/class-literal-property-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-class-literal-property-style.ts): prefer a `static readonly` field over a `get` accessor whose body is a single `return <literal>;`.
|
|
377
|
+
- [`typescript/consistent-generic-constructors`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-consistent-generic-constructors.ts): reject the redundant pattern where a variable is annotated with a generic type AND the same generic arguments are repeated on the constructor: `const m: Map<K, V> = new Map<K, V>()`.
|
|
378
|
+
- [`typescript/consistent-indexed-object-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/consistent-indexed-object-style.ts): prefers `Record` for single index-signature object types.
|
|
379
|
+
- [`typescript/consistent-type-assertions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/consistent-type-assertions.ts): prefers `as` type assertions over angle-bracket assertions.
|
|
380
|
+
- [`typescript/consistent-type-definitions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/consistent-type-definitions.ts): prefers interfaces for object-shaped type definitions.
|
|
381
|
+
- [`typescript/consistent-type-exports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-consistent-type-exports.ts): require type-only re-exports to use `export type { ... }` instead of mixing them with value-level re-exports.
|
|
382
|
+
- [`typescript/consistent-type-imports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/consistent-type-imports/violation.ts): uses `import type` when imported names are type-only.
|
|
383
|
+
- [`typescript/explicit-function-return-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-explicit-function-return-type.ts): require every exported function and method declaration to carry an explicit return-type annotation.
|
|
384
|
+
- [`typescript/explicit-member-accessibility`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-explicit-member-accessibility.ts): require an explicit accessibility modifier (`public`, `private`, or `protected`) on every class member declaration.
|
|
385
|
+
- [`typescript/method-signature-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/method-signature-style.ts): prefers function-property signatures over method shorthand signatures.
|
|
386
|
+
- [`typescript/no-array-delete`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-array-delete.ts): rejects `delete` on array elements.
|
|
387
|
+
- [`typescript/no-array-for-each`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-array-for-each.ts): prefer `for ... of` over `Array.prototype.forEach()`.
|
|
388
|
+
- [`typescript/no-base-to-string`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-base-to-string.ts): rejects string coercion of values whose `toString` resolves to the default `Object.prototype.toString` (type-aware).
|
|
389
|
+
- [`typescript/no-confusing-non-null-assertion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-confusing-non-null-assertion.ts): rejects confusing non-null assertions next to equality checks.
|
|
390
|
+
- [`typescript/no-confusing-void-expression`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-confusing-void-expression.ts): reject `void X` expressions used in any position where the surrounding context expects a value, initializer, call argument, `return` operand, conditional, binary, or ternary subexpression.
|
|
391
|
+
- [`typescript/no-deprecated`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-deprecated.ts): reject references to declarations annotated `@deprecated` in their JSDoc, with the deprecation comment surfaced at the reference site (type-aware).
|
|
392
|
+
- [`typescript/no-duplicate-enum-values`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-duplicate-enum-values.ts): rejects duplicate enum member values.
|
|
393
|
+
- [`typescript/no-dynamic-delete`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-dynamic-delete.ts): rejects `delete` on dynamically computed property keys.
|
|
394
|
+
- [`typescript/no-empty-interface`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-interface.ts): rejects empty interfaces.
|
|
395
|
+
- [`typescript/no-empty-object-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-empty-object-type.ts): rejects empty object type literals.
|
|
396
|
+
- [`typescript/no-explicit-any`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-explicit-any.ts): rejects explicit `any`.
|
|
397
|
+
- [`typescript/no-extra-non-null-assertion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-extra-non-null-assertion.ts): rejects repeated non-null assertions.
|
|
398
|
+
- [`typescript/no-extraneous-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-extraneous-class.ts): reject classes that exist purely as a namespace for static members or that are entirely empty.
|
|
399
|
+
- [`typescript/no-floating-promises`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-floating-promises.ts): rejects discarded built-in Promises, invalid rejection-handler chains, and Promise-bearing arrays; structural thenables, `void`, async IIFEs, and known-safe calls/types follow the rule's typed options.
|
|
400
|
+
- [`typescript/no-for-in-array`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-for-in-array.ts): reject `for (const k in arr)` where `arr` is statically typed as an array or tuple.
|
|
401
|
+
- [`typescript/no-import-type-side-effects`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-import-type-side-effects/violation.ts): hoists inline `type` modifiers into a single `import type` declaration.
|
|
402
|
+
- [`typescript/no-inferrable-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-inferrable-types.ts): rejects type annotations TypeScript can infer.
|
|
403
|
+
- [`typescript/no-invalid-void-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-invalid-void-type.ts): reject `void` used as anything other than a function return type.
|
|
404
|
+
- [`typescript/no-magic-numbers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-magic-numbers.ts): typeScript-aware extension of `no-magic-numbers` that additionally ignores enum member values.
|
|
405
|
+
- [`typescript/no-meaningless-void-operator`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-meaningless-void-operator.ts): reject `void X` where `X` is already statically typed `void`, the operator adds nothing because the operand already evaluates to `undefined` (type-aware).
|
|
406
|
+
- [`typescript/no-misused-new`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-misused-new.ts): rejects constructor-like signatures in interfaces.
|
|
407
|
+
- [`typescript/no-misused-promises`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-misused-promises.ts): reject thenables in boolean, spread, synchronous-disposal, and void-return contexts using resolved types.
|
|
408
|
+
- [`typescript/no-misused-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-misused-spread.ts): reject spread expressions whose operand is syntactically wrong for the surrounding context.
|
|
409
|
+
- [`typescript/no-mixed-enums`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-mixed-enums.ts): rejects enums that mix numeric and string members.
|
|
410
|
+
- [`typescript/no-namespace`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-namespace.ts): rejects non-ambient namespaces.
|
|
411
|
+
- [`typescript/no-non-null-asserted-nullish-coalescing`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-non-null-asserted-nullish-coalescing.ts): rejects non-null assertions next to `??`.
|
|
412
|
+
- [`typescript/no-non-null-asserted-optional-chain`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-non-null-asserted-optional-chain.ts): rejects non-null assertions on optional chains.
|
|
413
|
+
- [`typescript/no-non-null-assertion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-non-null-assertion.ts): rejects postfix non-null assertions.
|
|
414
|
+
- [`typescript/no-redundant-type-constituents`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-redundant-type-constituents.ts): reject union and intersection type constituents that the type system absorbs anyway, `string | any` collapses to `any`, `T & never` collapses to `never`, `T & unknown` collapses to `T`, and repeated constituents add nothing.
|
|
415
|
+
- [`typescript/no-require-imports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-require-imports.ts): rejects CommonJS `require` imports.
|
|
416
|
+
- [`typescript/no-restricted-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-restricted-types.ts): reject exact type spellings from the configured `types` map, with custom messages, automatic replacements, and editor suggestions; no options is a no-op.
|
|
417
|
+
- [`typescript/no-this-alias`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-this-alias.ts): rejects aliasing `this` to locals.
|
|
418
|
+
- [`typescript/no-unnecessary-boolean-literal-compare`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unnecessary-boolean-literal-compare.ts): reject direct comparison of a boolean-typed value with `true` / `false` literals, `x === true` is just `x`, `x !== false` is just `x`.
|
|
419
|
+
- [`typescript/no-unnecessary-condition`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unnecessary-condition.ts): reject conditions whose static type proves the runtime truthiness is fixed, `if ({})`, `if (null)`, `while ("")`, `0 && f()` (type-aware).
|
|
420
|
+
- [`typescript/no-unnecessary-parameter-property-assignment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unnecessary-parameter-property-assignment.ts): rejects constructor assignments already handled by parameter properties.
|
|
421
|
+
- [`typescript/no-unnecessary-qualifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unnecessary-qualifier.ts): reject namespace/enum qualifiers that the surrounding scope makes unnecessary (type-aware).
|
|
422
|
+
- [`typescript/no-unnecessary-template-expression`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unnecessary-template-expression.ts): reject template literals that collapse to a regular string, `` `${"abc"}` ``, `` `${name}` `` around a string-typed value, or a plain `` `abc` `` with no escaped backticks (type-aware).
|
|
423
|
+
- [`typescript/no-unnecessary-type-arguments`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unnecessary-type-arguments.ts): reject `Foo<DefaultT>` calls where the supplied generic argument is the same as the parameter's default, the argument adds nothing (type-aware).
|
|
424
|
+
- [`typescript/no-unnecessary-type-assertion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unnecessary-type-assertion.ts): reject `x as T`, `<T>x`, and `x!` assertions whose target type is the same as `x`'s already-known static type, the assertion adds nothing (type-aware).
|
|
425
|
+
- [`typescript/no-unnecessary-type-constraint`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unnecessary-type-constraint.ts): rejects redundant `extends any` and `extends unknown` constraints; its fix preserves the `<T,>` disambiguation required by single-parameter generic arrows in TSX, MTS, and CTS files.
|
|
426
|
+
- [`typescript/no-unsafe-argument`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-argument.ts): reject passing an `any`-typed value to a parameter whose declared type is concrete (type-aware).
|
|
427
|
+
- [`typescript/no-unsafe-assignment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-assignment.ts): reject direct and recursively nested `any` values escaping through annotated or inferred variables, reassignments, defaults, class members, contextual properties, spreads, and destructuring; `unknown` receivers remain allowed (type-aware, no options).
|
|
428
|
+
- [`typescript/no-unsafe-call`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-call.ts): reject calling a value whose static type is `any` (type-aware).
|
|
429
|
+
- [`typescript/no-unsafe-declaration-merging`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unsafe-declaration-merging.ts): rejects unsafe class/interface declaration merging.
|
|
430
|
+
- [`typescript/no-unsafe-enum-comparison`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-enum-comparison.ts): reject `==` / `===` / `!=` / `!==` comparisons between an enum-typed value and a plain `number` or `string` of the same widened primitive, the comparison silently accepts unrelated enums and raw literals that happen to share the underlying primitive (type-aware).
|
|
431
|
+
- [`typescript/no-unsafe-function-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-unsafe-function-type.ts): rejects the unsafe `Function` type.
|
|
432
|
+
- [`typescript/no-unsafe-member-access`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-member-access.ts): reject member access on a value whose static type is `any` (type-aware).
|
|
433
|
+
- [`typescript/no-unsafe-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-return.ts): reject a `return` expression whose static type is `any` from a function whose declared return type is a concrete (non-`any` / non-`unknown` / non-`void`) shape, the `any` leaks past the type boundary and disables every downstream check on the returned value (type-aware).
|
|
434
|
+
- [`typescript/no-unsafe-unary-minus`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-unsafe-unary-minus.ts): reject the unary `-` operator applied to an operand whose static type is not number-like or bigint-like, `-x` silently coerces strings, objects, and other shapes via `Number(x)` and almost always indicates a bug (type-aware).
|
|
435
|
+
- [`typescript/no-useless-constructor`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-no-useless-constructor.ts): typeScript-aware extension of `no-useless-constructor` that tolerates a constructor existing solely to expose parameter properties.
|
|
436
|
+
- [`typescript/no-useless-empty-export`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-useless-empty-export.ts): rejects redundant empty `export {}` declarations in module files.
|
|
437
|
+
- [`typescript/no-wrapper-object-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/no-wrapper-object-types.ts): rejects boxed object type names such as `String` and `Boolean`.
|
|
438
|
+
- [`typescript/non-nullable-type-assertion-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/non-nullable-type-assertion-style.ts): reject `x as Foo` assertions whose target type is the non-nullable version of `x`'s static type. Replace with the shorter `x!` non-null assertion.
|
|
439
|
+
- [`typescript/only-throw-error`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/only-throw-error.ts): reject `throw X` where `X` is statically known not to derive from `Error`, string literals, numbers, plain object literals, and the like.
|
|
440
|
+
- [`typescript/parameter-properties`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-parameter-properties.ts): reject TypeScript parameter-property constructors (`constructor(public foo: T)`). Prefer plain field declarations so the class shape is visible from the member list instead of buried inside the constructor parameter list.
|
|
441
|
+
- [`typescript/prefer-as-const`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-as-const.ts): prefers `as const` over literal type assertions and matching literal type annotations on variables and class properties.
|
|
442
|
+
- [`typescript/prefer-enum-initializers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-enum-initializers.ts): requires explicit enum member initializers.
|
|
443
|
+
- [`typescript/prefer-find`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-find.ts): prefer `array.find(predicate)` over `array.filter(predicate)[0]` / `.shift()` when only the first match is needed.
|
|
444
|
+
- [`typescript/prefer-function-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-function-type.ts): prefers function type aliases over single-call interfaces.
|
|
445
|
+
- [`typescript/prefer-includes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-includes.ts): prefer `array.includes(x)` over `array.indexOf(x) !== -1` (and the matching `=== -1`, `>= 0`, `< 0`, `> -1` shapes) on array, tuple, and string receivers (type-aware).
|
|
446
|
+
- [`typescript/prefer-literal-enum-member`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-literal-enum-member.ts): prefers literal enum member initializers over computed expressions.
|
|
447
|
+
- [`typescript/prefer-namespace-keyword`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/prefer-namespace-keyword.ts): prefers `namespace` over TypeScript's legacy `module` keyword.
|
|
448
|
+
- [`typescript/prefer-nullish-coalescing`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-nullish-coalescing.ts): prefer `??` over `||` (and `??=` over `||=`, and `??` over the ternary `x ? x : y`) when the intent is to default `null` / `undefined`.
|
|
449
|
+
- [`typescript/prefer-optional-chain`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-optional-chain.ts): prefer an optional chain (`a?.b?.c`) over chained boolean guards such as `a && a.b && a.b.c` or `a != null && a.b`.
|
|
450
|
+
- [`typescript/prefer-promise-reject-errors`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-promise-reject-errors.ts): reject `Promise.reject(value)` where `value` is statically known not to derive from `Error`, type-aware analog of `only-throw-error` for the rejection side of the promise contract.
|
|
451
|
+
- [`typescript/prefer-readonly`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-readonly.ts): consider readonly for initialized private fields with no resolved source-file reassignment (type-aware); aliases, computed keys and destructuring are tracked, while deep object mutation does not replace the field and dynamic or reflective mutation remains a limitation.
|
|
452
|
+
- [`typescript/prefer-reduce-type-parameter`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-reduce-type-parameter.ts): prefer `arr.reduce<T>(..., initial)` over `arr.reduce(..., initial as T)` so the accumulator type is set on the call site instead of widened away inside the assertion (type-aware).
|
|
453
|
+
- [`typescript/prefer-regexp-exec`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-regexp-exec.ts): prefer `regex.exec(str)` over `str.match(regex)` when the regex carries the `g` flag, `.match` returns only the matched substrings and discards capture groups.
|
|
454
|
+
- [`typescript/prefer-return-this-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-return-this-type.ts): prefer the polymorphic this return type only when every normal completion returns this, without bare return or fallthrough; nested function returns are excluded.
|
|
455
|
+
- [`typescript/prefer-string-starts-ends-with`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-prefer-string-starts-ends-with.ts): prefer `str.startsWith(p)` / `str.endsWith(p)` over `str.indexOf(p) === 0`, `str.indexOf(p, str.length - p.length) !== -1`, `str.lastIndexOf(p) === str.length - p.length`, and the anchored-regex `/^p/.test(str)` / `/p$/.test(str)` idioms (type-aware).
|
|
456
|
+
- [`typescript/promise-function-async`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-promise-function-async.ts): require functions whose return type is `Promise<T>` to be declared with the `async` keyword so synchronous throws surface as a rejected Promise (type-aware).
|
|
457
|
+
- [`typescript/related-getter-setter-pairs`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-related-getter-setter-pairs.ts): reject a `get` accessor whose declared return type does not match the parameter type of its companion `set` accessor on the same class, readers should not observe a type the writer cannot accept (type-aware).
|
|
458
|
+
- [`typescript/require-array-sort-compare`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-require-array-sort-compare.ts): require `arr.sort()` and `arr.toSorted()` calls to pass an explicit `compareFunction`.
|
|
459
|
+
- [`typescript/require-await`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/require-await.ts): reject `async` functions that have no `await` expression and return no promise.
|
|
460
|
+
- [`typescript/restrict-plus-operands`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-restrict-plus-operands.ts): rejects `+` expressions whose operands are not both `number`, both `string`, or both `bigint` (type-aware).
|
|
461
|
+
- [`typescript/restrict-template-expressions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-restrict-template-expressions.ts): reject template-literal interpolations whose expression carries a type that does not stringify cleanly, `${obj}` prints `"[object Object]"`, `${null}` prints `"null"`, and so on.
|
|
462
|
+
- [`typescript/return-await`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/return-await.ts): reject `return promise` inside `try`, `catch`, or `finally`; require `return await promise`.
|
|
463
|
+
- [`typescript/sort-type-constituents`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-sort-type-constituents.ts): sort the members of union (`A | B | C`) and intersection (`A & B & C`) types into a canonical order so reorderings don't show up as diffs.
|
|
464
|
+
- [`typescript/strict-boolean-expressions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-strict-boolean-expressions.ts): rejects non-boolean values used in a boolean context such as `if`, `&&`, `||`, or `!` (type-aware).
|
|
465
|
+
- [`typescript/switch-exhaustiveness-check`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-switch-exhaustiveness-check.ts): requires every enumerable discriminant member to have an explicit `case` by default; typed options control real/comment defaults and open types (type-aware).
|
|
466
|
+
- [`typescript/triple-slash-reference`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/triple-slash-reference/violation.ts): rejects triple-slash reference directives.
|
|
467
|
+
- [`typescript/unbound-method`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/typescript-unbound-method.ts): reject referencing a class instance method as a value instead of calling it (`obj.method` passed as a callback, aliased to a variable, or stored on another object).
|
|
468
|
+
- [`typescript/use-unknown-in-catch-callback-variable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/use-unknown-in-catch-callback-variable.ts): require the callback parameter of `.catch(...)` and the second argument of `.then(...)` to be typed `unknown`.
|
|
467
469
|
|
|
468
470
|
### React
|
|
469
471
|
|
|
@@ -471,35 +473,35 @@ React TSX rules, Hooks correctness, JSX safety, the React Compiler subset, and F
|
|
|
471
473
|
|
|
472
474
|
Source: [`eslint-plugin-react`](https://github.com/jsx-eslint/eslint-plugin-react), [`eslint-plugin-react-hooks`](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks), [`eslint-plugin-react-refresh`](https://github.com/ArnaudBarre/eslint-plugin-react-refresh).
|
|
473
475
|
|
|
474
|
-
- [`react/button-has-type`](https://github.com/samchon/ttsc/blob/master/
|
|
475
|
-
- [`react/component-hook-factories`](https://github.com/samchon/ttsc/blob/master/
|
|
476
|
-
- [`react/display-name`](https://github.com/samchon/ttsc/blob/master/
|
|
477
|
-
- [`react/exhaustive-deps`](https://github.com/samchon/ttsc/blob/master/
|
|
478
|
-
- [`react/iframe-missing-sandbox`](https://github.com/samchon/ttsc/blob/master/
|
|
479
|
-
- [`react/immutability`](https://github.com/samchon/ttsc/blob/master/
|
|
480
|
-
- [`react/jsx-key`](https://github.com/samchon/ttsc/blob/master/
|
|
481
|
-
- [`react/jsx-no-duplicate-props`](https://github.com/samchon/ttsc/blob/master/
|
|
482
|
-
- [`react/jsx-no-script-url`](https://github.com/samchon/ttsc/blob/master/
|
|
483
|
-
- [`react/jsx-no-target-blank`](https://github.com/samchon/ttsc/blob/master/
|
|
484
|
-
- [`react/jsx-no-undef`](https://github.com/samchon/ttsc/blob/master/
|
|
485
|
-
- [`react/jsx-no-useless-fragment`](https://github.com/samchon/ttsc/blob/master/
|
|
486
|
-
- [`react/no-array-index-key`](https://github.com/samchon/ttsc/blob/master/
|
|
487
|
-
- [`react/no-children-prop`](https://github.com/samchon/ttsc/blob/master/
|
|
488
|
-
- [`react/no-danger`](https://github.com/samchon/ttsc/blob/master/
|
|
489
|
-
- [`react/no-danger-with-children`](https://github.com/samchon/ttsc/blob/master/
|
|
490
|
-
- [`react/no-direct-mutation-state`](https://github.com/samchon/ttsc/blob/master/
|
|
491
|
-
- [`react/no-find-dom-node`](https://github.com/samchon/ttsc/blob/master/
|
|
492
|
-
- [`react/no-is-mounted`](https://github.com/samchon/ttsc/blob/master/
|
|
493
|
-
- [`react/no-string-refs`](https://github.com/samchon/ttsc/blob/master/
|
|
494
|
-
- [`react/no-unescaped-entities`](https://github.com/samchon/ttsc/blob/master/
|
|
495
|
-
- [`react/only-export-components`](https://github.com/samchon/ttsc/blob/master/
|
|
496
|
-
- [`react/refs`](https://github.com/samchon/ttsc/blob/master/
|
|
497
|
-
- [`react/rules-of-hooks`](https://github.com/samchon/ttsc/blob/master/
|
|
498
|
-
- [`react/set-state-in-effect`](https://github.com/samchon/ttsc/blob/master/
|
|
499
|
-
- [`react/set-state-in-render`](https://github.com/samchon/ttsc/blob/master/
|
|
500
|
-
- [`react/style-prop-object`](https://github.com/samchon/ttsc/blob/master/
|
|
501
|
-
- [`react/use-memo`](https://github.com/samchon/ttsc/blob/master/
|
|
502
|
-
- [`react/void-dom-elements-no-children`](https://github.com/samchon/ttsc/blob/master/
|
|
476
|
+
- [`react/button-has-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-button-has-type.tsx): requires explicit valid `type` values on JSX `button` elements.
|
|
477
|
+
- [`react/component-hook-factories`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-component-hook-factories.tsx): rejects nested component or Hook factories that call Hooks.
|
|
478
|
+
- [`react/display-name`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-display-name.tsx): require components wrapped in `React.memo(...)` or `React.forwardRef(...)` to be named, either by passing a named function, assigning the call to a named binding, or setting an explicit `displayName`.
|
|
479
|
+
- [`react/exhaustive-deps`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-exhaustive-deps.tsx): reports high-confidence missing identifier dependencies in `useEffect`, `useLayoutEffect`, `useInsertionEffect`, `useMemo`, and `useCallback`.
|
|
480
|
+
- [`react/iframe-missing-sandbox`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-iframe-missing-sandbox.tsx): requires JSX `iframe` elements to include a sandbox attribute.
|
|
481
|
+
- [`react/immutability`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-immutability.tsx): rejects local prop mutation inside components and Hooks.
|
|
482
|
+
- [`react/jsx-key`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-jsx-key.tsx): requires `key` props for JSX elements produced by arrays or `.map()`.
|
|
483
|
+
- [`react/jsx-no-duplicate-props`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-jsx-no-duplicate-props.tsx): rejects duplicate JSX prop names on the same element.
|
|
484
|
+
- [`react/jsx-no-script-url`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-jsx-no-script-url.tsx): rejects `javascript:` URLs in JSX URL-like props.
|
|
485
|
+
- [`react/jsx-no-target-blank`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-jsx-no-target-blank.tsx): reject `<a target="_blank">` (or any JSX element with `target="_blank"`) that does not also carry `rel="noreferrer"` (or `rel="noopener noreferrer"`).
|
|
486
|
+
- [`react/jsx-no-undef`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-jsx-no-undef.tsx): reject JSX elements whose tag is an uppercase identifier with no value-level declaration anywhere in the source file.
|
|
487
|
+
- [`react/jsx-no-useless-fragment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-jsx-no-useless-fragment.tsx): reject JSX fragments that wrap exactly one element child or have no meaningful content. The child (or nothing) can be returned directly.
|
|
488
|
+
- [`react/no-array-index-key`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-array-index-key.tsx): rejects array map index parameters as JSX keys.
|
|
489
|
+
- [`react/no-children-prop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-children-prop.tsx): rejects passing children through a JSX `children` prop.
|
|
490
|
+
- [`react/no-danger`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-danger.tsx): rejects `dangerouslySetInnerHTML`.
|
|
491
|
+
- [`react/no-danger-with-children`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-danger-with-children.tsx): rejects combining `dangerouslySetInnerHTML` with children.
|
|
492
|
+
- [`react/no-direct-mutation-state`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-direct-mutation-state.tsx): rejects direct writes to `this.state` outside constructor initialization.
|
|
493
|
+
- [`react/no-find-dom-node`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-find-dom-node.tsx): rejects `findDOMNode` calls.
|
|
494
|
+
- [`react/no-is-mounted`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-is-mounted.tsx): rejects `isMounted` calls.
|
|
495
|
+
- [`react/no-string-refs`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-string-refs.tsx): rejects string JSX refs.
|
|
496
|
+
- [`react/no-unescaped-entities`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-no-unescaped-entities.tsx): rejects unescaped `>`, `"`, `'`, and `}` in JSX text.
|
|
497
|
+
- [`react/only-export-components`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-only-export-components.tsx): keeps React Fast Refresh component modules from exporting non-components.
|
|
498
|
+
- [`react/refs`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-refs.tsx): rejects reading or writing `ref.current` during render.
|
|
499
|
+
- [`react/rules-of-hooks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-rules-of-hooks.tsx): rejects Hooks called outside components or custom Hooks, in nested callbacks, or in conditional/loop control flow.
|
|
500
|
+
- [`react/set-state-in-effect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-set-state-in-effect.tsx): rejects synchronous setter calls inside `useEffect`.
|
|
501
|
+
- [`react/set-state-in-render`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-set-state-in-render.tsx): rejects `useState` / `useReducer` setters called during render.
|
|
502
|
+
- [`react/style-prop-object`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-style-prop-object.tsx): rejects string literal JSX `style` prop values.
|
|
503
|
+
- [`react/use-memo`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-use-memo.tsx): rejects block-bodied `useMemo` callbacks that do not return a value.
|
|
504
|
+
- [`react/void-dom-elements-no-children`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-void-dom-elements-no-children.tsx): rejects children and HTML injection props on void DOM elements.
|
|
503
505
|
|
|
504
506
|
### React performance
|
|
505
507
|
|
|
@@ -507,10 +509,10 @@ Detects freshly-allocated reference values (arrays, objects, functions, JSX elem
|
|
|
507
509
|
|
|
508
510
|
Source: [`eslint-plugin-react-perf`](https://github.com/cvazac/eslint-plugin-react-perf).
|
|
509
511
|
|
|
510
|
-
- [`react-perf/jsx-no-jsx-as-prop`](https://github.com/samchon/ttsc/blob/master/
|
|
511
|
-
- [`react-perf/jsx-no-new-array-as-prop`](https://github.com/samchon/ttsc/blob/master/
|
|
512
|
-
- [`react-perf/jsx-no-new-function-as-prop`](https://github.com/samchon/ttsc/blob/master/
|
|
513
|
-
- [`react-perf/jsx-no-new-object-as-prop`](https://github.com/samchon/ttsc/blob/master/
|
|
512
|
+
- [`react-perf/jsx-no-jsx-as-prop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-perf-jsx-no-jsx-as-prop.tsx): rejects freshly-created JSX elements or fragments passed as JSX props.
|
|
513
|
+
- [`react-perf/jsx-no-new-array-as-prop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-perf-jsx-no-new-array-as-prop.tsx): rejects freshly-created arrays passed as JSX props.
|
|
514
|
+
- [`react-perf/jsx-no-new-function-as-prop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-perf-jsx-no-new-function-as-prop.tsx): rejects freshly-created functions passed as JSX props.
|
|
515
|
+
- [`react-perf/jsx-no-new-object-as-prop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/react-perf-jsx-no-new-object-as-prop.tsx): rejects freshly-created objects passed as JSX props.
|
|
514
516
|
|
|
515
517
|
### JSX accessibility
|
|
516
518
|
|
|
@@ -518,43 +520,43 @@ JSX accessibility rules applied to TSX (and JSX-in-TS) sources. Checks the stati
|
|
|
518
520
|
|
|
519
521
|
Source: [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y).
|
|
520
522
|
|
|
521
|
-
- [`jsx-a11y/alt-text`](https://github.com/samchon/ttsc/blob/master/
|
|
522
|
-
- [`jsx-a11y/anchor-ambiguous-text`](https://github.com/samchon/ttsc/blob/master/
|
|
523
|
-
- [`jsx-a11y/anchor-has-content`](https://github.com/samchon/ttsc/blob/master/
|
|
524
|
-
- [`jsx-a11y/anchor-is-valid`](https://github.com/samchon/ttsc/blob/master/
|
|
525
|
-
- [`jsx-a11y/aria-activedescendant-has-tabindex`](https://github.com/samchon/ttsc/blob/master/
|
|
526
|
-
- [`jsx-a11y/aria-props`](https://github.com/samchon/ttsc/blob/master/
|
|
527
|
-
- [`jsx-a11y/aria-proptypes`](https://github.com/samchon/ttsc/blob/master/
|
|
528
|
-
- [`jsx-a11y/aria-role`](https://github.com/samchon/ttsc/blob/master/
|
|
529
|
-
- [`jsx-a11y/aria-unsupported-elements`](https://github.com/samchon/ttsc/blob/master/
|
|
530
|
-
- [`jsx-a11y/autocomplete-valid`](https://github.com/samchon/ttsc/blob/master/
|
|
531
|
-
- [`jsx-a11y/click-events-have-key-events`](https://github.com/samchon/ttsc/blob/master/
|
|
532
|
-
- [`jsx-a11y/control-has-associated-label`](https://github.com/samchon/ttsc/blob/master/
|
|
533
|
-
- [`jsx-a11y/heading-has-content`](https://github.com/samchon/ttsc/blob/master/
|
|
534
|
-
- [`jsx-a11y/html-has-lang`](https://github.com/samchon/ttsc/blob/master/
|
|
535
|
-
- [`jsx-a11y/iframe-has-title`](https://github.com/samchon/ttsc/blob/master/
|
|
536
|
-
- [`jsx-a11y/img-redundant-alt`](https://github.com/samchon/ttsc/blob/master/
|
|
537
|
-
- [`jsx-a11y/interactive-supports-focus`](https://github.com/samchon/ttsc/blob/master/
|
|
538
|
-
- [`jsx-a11y/label-has-associated-control`](https://github.com/samchon/ttsc/blob/master/
|
|
539
|
-
- [`jsx-a11y/label-has-for`](https://github.com/samchon/ttsc/blob/master/
|
|
540
|
-
- [`jsx-a11y/lang`](https://github.com/samchon/ttsc/blob/master/
|
|
541
|
-
- [`jsx-a11y/media-has-caption`](https://github.com/samchon/ttsc/blob/master/
|
|
542
|
-
- [`jsx-a11y/mouse-events-have-key-events`](https://github.com/samchon/ttsc/blob/master/
|
|
543
|
-
- [`jsx-a11y/no-access-key`](https://github.com/samchon/ttsc/blob/master/
|
|
544
|
-
- [`jsx-a11y/no-aria-hidden-on-focusable`](https://github.com/samchon/ttsc/blob/master/
|
|
545
|
-
- [`jsx-a11y/no-autofocus`](https://github.com/samchon/ttsc/blob/master/
|
|
546
|
-
- [`jsx-a11y/no-distracting-elements`](https://github.com/samchon/ttsc/blob/master/
|
|
547
|
-
- [`jsx-a11y/no-interactive-element-to-noninteractive-role`](https://github.com/samchon/ttsc/blob/master/
|
|
548
|
-
- [`jsx-a11y/no-noninteractive-element-interactions`](https://github.com/samchon/ttsc/blob/master/
|
|
549
|
-
- [`jsx-a11y/no-noninteractive-element-to-interactive-role`](https://github.com/samchon/ttsc/blob/master/
|
|
550
|
-
- [`jsx-a11y/no-noninteractive-tabindex`](https://github.com/samchon/ttsc/blob/master/
|
|
551
|
-
- [`jsx-a11y/no-redundant-roles`](https://github.com/samchon/ttsc/blob/master/
|
|
552
|
-
- [`jsx-a11y/no-static-element-interactions`](https://github.com/samchon/ttsc/blob/master/
|
|
553
|
-
- [`jsx-a11y/prefer-tag-over-role`](https://github.com/samchon/ttsc/blob/master/
|
|
554
|
-
- [`jsx-a11y/role-has-required-aria-props`](https://github.com/samchon/ttsc/blob/master/
|
|
555
|
-
- [`jsx-a11y/role-supports-aria-props`](https://github.com/samchon/ttsc/blob/master/
|
|
556
|
-
- [`jsx-a11y/scope`](https://github.com/samchon/ttsc/blob/master/
|
|
557
|
-
- [`jsx-a11y/tabindex-no-positive`](https://github.com/samchon/ttsc/blob/master/
|
|
523
|
+
- [`jsx-a11y/alt-text`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-alt-text.tsx): requires image-like JSX elements to expose alt text or an ARIA label.
|
|
524
|
+
- [`jsx-a11y/anchor-ambiguous-text`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-anchor-ambiguous-text.tsx): rejects `<a>` elements whose visible text is a phrase that carries no information out of context.
|
|
525
|
+
- [`jsx-a11y/anchor-has-content`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-anchor-has-content.tsx): rejects empty JSX anchors with no accessible content.
|
|
526
|
+
- [`jsx-a11y/anchor-is-valid`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-anchor-is-valid.tsx): rejects anchors with missing, `#`-only, empty, or `javascript:` `href` values.
|
|
527
|
+
- [`jsx-a11y/aria-activedescendant-has-tabindex`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-aria-activedescendant-has-tabindex.tsx): requires `tabIndex` on any element carrying `aria-activedescendant` that is not focusable by default.
|
|
528
|
+
- [`jsx-a11y/aria-props`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-aria-props.tsx): rejects `aria-*` JSX attribute names that are not part of the WAI-ARIA spec.
|
|
529
|
+
- [`jsx-a11y/aria-proptypes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-aria-proptypes.tsx): validates literal ARIA property values against the type the spec declares for them.
|
|
530
|
+
- [`jsx-a11y/aria-role`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-aria-role.tsx): requires `role` values to be a concrete, non-abstract WAI-ARIA role.
|
|
531
|
+
- [`jsx-a11y/aria-unsupported-elements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-aria-unsupported-elements.tsx): rejects ARIA roles and attributes on elements that do not support them.
|
|
532
|
+
- [`jsx-a11y/autocomplete-valid`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-autocomplete-valid.tsx): validates literal `autocomplete` tokens against the HTML spec and the surrounding input `type`.
|
|
533
|
+
- [`jsx-a11y/click-events-have-key-events`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-click-events-have-key-events.tsx): requires keyboard handlers alongside `onClick` on non-interactive JSX elements.
|
|
534
|
+
- [`jsx-a11y/control-has-associated-label`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-control-has-associated-label.tsx): requires interactive controls to have an accessible label.
|
|
535
|
+
- [`jsx-a11y/heading-has-content`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-heading-has-content.tsx): rejects empty JSX headings.
|
|
536
|
+
- [`jsx-a11y/html-has-lang`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-html-has-lang.tsx): requires `<html>` JSX elements to declare a non-empty `lang` attribute.
|
|
537
|
+
- [`jsx-a11y/iframe-has-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-iframe-has-title.tsx): requires every `<iframe>` JSX element to declare a non-empty, unique `title`.
|
|
538
|
+
- [`jsx-a11y/img-redundant-alt`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-img-redundant-alt.tsx): rejects redundant words such as _image_, _photo_, or _picture_ inside the `alt` attribute of an `<img>`.
|
|
539
|
+
- [`jsx-a11y/interactive-supports-focus`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-interactive-supports-focus.tsx): requires elements with interactive ARIA roles to be focusable.
|
|
540
|
+
- [`jsx-a11y/label-has-associated-control`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-label-has-associated-control.tsx): requires `<label>` elements to wrap a form control or reference one via `htmlFor`.
|
|
541
|
+
- [`jsx-a11y/label-has-for`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-label-has-for.tsx): deprecated predecessor of `label-has-associated-control` that checks the same nesting / `htmlFor` association requirement.
|
|
542
|
+
- [`jsx-a11y/lang`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-lang.tsx): requires the `<html lang>` value to be a valid IETF BCP-47 tag.
|
|
543
|
+
- [`jsx-a11y/media-has-caption`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-media-has-caption.tsx): requires `<audio>` and `<video>` elements to provide a `<track kind="captions">` child.
|
|
544
|
+
- [`jsx-a11y/mouse-events-have-key-events`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-mouse-events-have-key-events.tsx): requires `onMouseOver` / `onMouseOut` handlers to have `onFocus` / `onBlur` parity.
|
|
545
|
+
- [`jsx-a11y/no-access-key`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-access-key.tsx): rejects the `accessKey` JSX attribute.
|
|
546
|
+
- [`jsx-a11y/no-aria-hidden-on-focusable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-aria-hidden-on-focusable.tsx): rejects `aria-hidden` on focusable JSX elements.
|
|
547
|
+
- [`jsx-a11y/no-autofocus`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-autofocus.tsx): rejects `autoFocus` / `autofocus` JSX attributes.
|
|
548
|
+
- [`jsx-a11y/no-distracting-elements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-distracting-elements.tsx): rejects `<blink>` and `<marquee>` elements whose motion cannot be paused.
|
|
549
|
+
- [`jsx-a11y/no-interactive-element-to-noninteractive-role`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-interactive-element-to-noninteractive-role.tsx): rejects non-interactive ARIA roles applied to natively interactive elements.
|
|
550
|
+
- [`jsx-a11y/no-noninteractive-element-interactions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-noninteractive-element-interactions.tsx): rejects interaction event handlers on known non-interactive elements without a role override.
|
|
551
|
+
- [`jsx-a11y/no-noninteractive-element-to-interactive-role`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-noninteractive-element-to-interactive-role.tsx): rejects interactive ARIA roles applied to non-interactive elements.
|
|
552
|
+
- [`jsx-a11y/no-noninteractive-tabindex`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-noninteractive-tabindex.tsx): rejects `tabIndex` on non-interactive JSX elements that have no interactive role.
|
|
553
|
+
- [`jsx-a11y/no-redundant-roles`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-redundant-roles.tsx): rejects explicit `role` attributes that duplicate the native semantics of the element.
|
|
554
|
+
- [`jsx-a11y/no-static-element-interactions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-no-static-element-interactions.tsx): requires static elements with interaction handlers to declare an interactive `role`.
|
|
555
|
+
- [`jsx-a11y/prefer-tag-over-role`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-prefer-tag-over-role.tsx): prefers native JSX tags over `div` / `span` plus an equivalent `role`.
|
|
556
|
+
- [`jsx-a11y/role-has-required-aria-props`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-role-has-required-aria-props.tsx): requires ARIA properties that the chosen role mandates.
|
|
557
|
+
- [`jsx-a11y/role-supports-aria-props`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-role-supports-aria-props.tsx): rejects ARIA properties that the role does not support.
|
|
558
|
+
- [`jsx-a11y/scope`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-scope.tsx): restricts the `scope` attribute to `<th>` cells.
|
|
559
|
+
- [`jsx-a11y/tabindex-no-positive`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsx-a11y-tabindex-no-positive.tsx): rejects `tabIndex` values greater than zero.
|
|
558
560
|
|
|
559
561
|
### Next.js
|
|
560
562
|
|
|
@@ -562,27 +564,27 @@ Next.js framework rules applied to TypeScript and TSX sources inside Next.js app
|
|
|
562
564
|
|
|
563
565
|
Source: [`@next/eslint-plugin-next`](https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next).
|
|
564
566
|
|
|
565
|
-
- [`nextjs/google-font-display`](https://github.com/samchon/ttsc/blob/master/
|
|
566
|
-
- [`nextjs/google-font-preconnect`](https://github.com/samchon/ttsc/blob/master/
|
|
567
|
-
- [`nextjs/inline-script-id`](https://github.com/samchon/ttsc/blob/master/
|
|
568
|
-
- [`nextjs/next-script-for-ga`](https://github.com/samchon/ttsc/blob/master/
|
|
569
|
-
- [`nextjs/no-assign-module-variable`](https://github.com/samchon/ttsc/blob/master/
|
|
570
|
-
- [`nextjs/no-async-client-component`](https://github.com/samchon/ttsc/blob/master/
|
|
571
|
-
- [`nextjs/no-before-interactive-script-outside-document`](https://github.com/samchon/ttsc/blob/master/
|
|
572
|
-
- [`nextjs/no-css-tags`](https://github.com/samchon/ttsc/blob/master/
|
|
573
|
-
- [`nextjs/no-document-import-in-page`](https://github.com/samchon/ttsc/blob/master/
|
|
574
|
-
- [`nextjs/no-duplicate-head`](https://github.com/samchon/ttsc/blob/master/
|
|
575
|
-
- [`nextjs/no-head-element`](https://github.com/samchon/ttsc/blob/master/
|
|
576
|
-
- [`nextjs/no-head-import-in-document`](https://github.com/samchon/ttsc/blob/master/
|
|
577
|
-
- [`nextjs/no-html-link-for-pages`](https://github.com/samchon/ttsc/blob/master/
|
|
578
|
-
- [`nextjs/no-img-element`](https://github.com/samchon/ttsc/blob/master/
|
|
579
|
-
- [`nextjs/no-page-custom-font`](https://github.com/samchon/ttsc/blob/master/
|
|
580
|
-
- [`nextjs/no-script-component-in-head`](https://github.com/samchon/ttsc/blob/master/
|
|
581
|
-
- [`nextjs/no-styled-jsx-in-document`](https://github.com/samchon/ttsc/blob/master/
|
|
582
|
-
- [`nextjs/no-sync-scripts`](https://github.com/samchon/ttsc/blob/master/
|
|
583
|
-
- [`nextjs/no-title-in-document-head`](https://github.com/samchon/ttsc/blob/master/
|
|
584
|
-
- [`nextjs/no-typos`](https://github.com/samchon/ttsc/blob/master/
|
|
585
|
-
- [`nextjs/no-unwanted-polyfillio`](https://github.com/samchon/ttsc/blob/master/
|
|
567
|
+
- [`nextjs/google-font-display`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-google-font-display.tsx): require `font-display` query on Google Font `<link>` URLs so initial render is not blocked.
|
|
568
|
+
- [`nextjs/google-font-preconnect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-google-font-preconnect.tsx): require `rel="preconnect"` for `fonts.gstatic.com` links to shave latency off Google Font fetches.
|
|
569
|
+
- [`nextjs/inline-script-id`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-inline-script-id.tsx): require an `id` attribute on inline `<Script>` components from `next/script`.
|
|
570
|
+
- [`nextjs/next-script-for-ga`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-next-script-for-ga.tsx): prefer the Next.js Google Analytics integration over hand-written `gtag` script tags.
|
|
571
|
+
- [`nextjs/no-assign-module-variable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-assign-module-variable.ts): reject local declarations named `module`, which shadow the CommonJS `module` binding Next.js relies on.
|
|
572
|
+
- [`nextjs/no-async-client-component`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-async-client-component.tsx): reject `async` function bodies on React Client Components.
|
|
573
|
+
- [`nextjs/no-before-interactive-script-outside-document`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-before-interactive-script-outside-document.tsx): restrict the `next/script` `strategy="beforeInteractive"` option to `pages/_document.tsx`.
|
|
574
|
+
- [`nextjs/no-css-tags`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-css-tags.tsx): reject raw `<link rel="stylesheet">` tags.
|
|
575
|
+
- [`nextjs/no-document-import-in-page`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-document-import-in-page.tsx): restrict `next/document` imports to `pages/_document.tsx`.
|
|
576
|
+
- [`nextjs/no-duplicate-head`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-duplicate-head.tsx): reject more than one `<Head>` element from `next/document` in `pages/_document.tsx`.
|
|
577
|
+
- [`nextjs/no-head-element`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-head-element.tsx): reject raw `<head>` elements outside the `app/` directory.
|
|
578
|
+
- [`nextjs/no-head-import-in-document`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-head-import-in-document.tsx): reject `next/head` imports inside `pages/_document.tsx`.
|
|
579
|
+
- [`nextjs/no-html-link-for-pages`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-html-link-for-pages.tsx): prefer `next/link` for internal anchors with a static `href`.
|
|
580
|
+
- [`nextjs/no-img-element`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-img-element.tsx): prefer `next/image` over raw `<img>` elements so the framework can optimize the asset.
|
|
581
|
+
- [`nextjs/no-page-custom-font`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-page-custom-font.tsx): reject Google font `<link>` tags inside regular pages files.
|
|
582
|
+
- [`nextjs/no-script-component-in-head`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-script-component-in-head.tsx): reject `next/script` inside `next/head`.
|
|
583
|
+
- [`nextjs/no-styled-jsx-in-document`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-styled-jsx-in-document.tsx): reject styled-jsx tags inside `pages/_document.tsx`.
|
|
584
|
+
- [`nextjs/no-sync-scripts`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-sync-scripts.tsx): require `async` or `defer` on external raw `<script>` tags.
|
|
585
|
+
- [`nextjs/no-title-in-document-head`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-title-in-document-head.tsx): reject `<title>` inside `Head` from `next/document`.
|
|
586
|
+
- [`nextjs/no-typos`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-typos.ts): catch near-miss typos in Next.js data-fetching export names (`getStaticProps`, `getStaticPaths`, `getServerSideProps`).
|
|
587
|
+
- [`nextjs/no-unwanted-polyfillio`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/nextjs-no-unwanted-polyfillio.tsx): reject Polyfill.io script URLs.
|
|
586
588
|
|
|
587
589
|
### Solid
|
|
588
590
|
|
|
@@ -590,26 +592,26 @@ Solid TSX rules. Solid components compile to fine-grained reactivity, so pattern
|
|
|
590
592
|
|
|
591
593
|
Source: [`eslint-plugin-solid`](https://github.com/solidjs-community/eslint-plugin-solid).
|
|
592
594
|
|
|
593
|
-
- [`solid/components-return-once`](https://github.com/samchon/ttsc/blob/master/
|
|
594
|
-
- [`solid/event-handlers`](https://github.com/samchon/ttsc/blob/master/
|
|
595
|
-
- [`solid/imports`](https://github.com/samchon/ttsc/blob/master/
|
|
596
|
-
- [`solid/jsx-no-duplicate-props`](https://github.com/samchon/ttsc/blob/master/
|
|
597
|
-
- [`solid/jsx-no-script-url`](https://github.com/samchon/ttsc/blob/master/
|
|
598
|
-
- [`solid/jsx-no-undef`](https://github.com/samchon/ttsc/blob/master/
|
|
599
|
-
- [`solid/no-array-handlers`](https://github.com/samchon/ttsc/blob/master/
|
|
600
|
-
- [`solid/no-destructure`](https://github.com/samchon/ttsc/blob/master/
|
|
601
|
-
- [`solid/no-innerhtml`](https://github.com/samchon/ttsc/blob/master/
|
|
602
|
-
- [`solid/no-proxy-apis`](https://github.com/samchon/ttsc/blob/master/
|
|
603
|
-
- [`solid/no-react-deps`](https://github.com/samchon/ttsc/blob/master/
|
|
604
|
-
- [`solid/no-react-specific-props`](https://github.com/samchon/ttsc/blob/master/
|
|
605
|
-
- [`solid/no-unknown-namespaces`](https://github.com/samchon/ttsc/blob/master/
|
|
606
|
-
- [`solid/prefer-classlist`](https://github.com/samchon/ttsc/blob/master/
|
|
607
|
-
- [`solid/prefer-for`](https://github.com/samchon/ttsc/blob/master/
|
|
608
|
-
- [`solid/prefer-show`](https://github.com/samchon/ttsc/blob/master/
|
|
609
|
-
- [`solid/reactivity`](https://github.com/samchon/ttsc/blob/master/
|
|
610
|
-
- [`solid/self-closing-comp`](https://github.com/samchon/ttsc/blob/master/
|
|
611
|
-
- [`solid/style-prop`](https://github.com/samchon/ttsc/blob/master/
|
|
612
|
-
- [`solid/validate-jsx-nesting`](https://github.com/samchon/ttsc/blob/master/
|
|
595
|
+
- [`solid/components-return-once`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-components-return-once.tsx): reject early returns inside Solid components that break the once-only setup contract.
|
|
596
|
+
- [`solid/event-handlers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-event-handlers.tsx): reject lowercase string event handlers that are forwarded as plain attributes.
|
|
597
|
+
- [`solid/imports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-imports.tsx): require Solid APIs to be imported from their canonical modules.
|
|
598
|
+
- [`solid/jsx-no-duplicate-props`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-jsx-no-duplicate-props.tsx): reject duplicate JSX attributes on the same element.
|
|
599
|
+
- [`solid/jsx-no-script-url`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-jsx-no-script-url.tsx): reject `javascript:` URLs on JSX `href`/`src` literals.
|
|
600
|
+
- [`solid/jsx-no-undef`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-jsx-no-undef.tsx): reject JSX component tags with no in-scope binding.
|
|
601
|
+
- [`solid/no-array-handlers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-array-handlers.tsx): reject array-form `[handler, data]` event handlers easily confused with React dep arrays.
|
|
602
|
+
- [`solid/no-destructure`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-destructure.tsx): reject destructured component props that lose reactive accessor wiring.
|
|
603
|
+
- [`solid/no-innerhtml`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-innerhtml.tsx): reject `innerHTML` JSX props that bypass the reconciler.
|
|
604
|
+
- [`solid/no-proxy-apis`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-proxy-apis.tsx): reject direct `new Proxy(...)` construction that defeats fine-grained tracking.
|
|
605
|
+
- [`solid/no-react-deps`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-react-deps.tsx): reject React-style dependency arrays passed to `createEffect`/`createMemo`/`createComputed`.
|
|
606
|
+
- [`solid/no-react-specific-props`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-react-specific-props.tsx): reject React-only JSX prop names like `className`, `htmlFor`, and `key`.
|
|
607
|
+
- [`solid/no-unknown-namespaces`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-no-unknown-namespaces.tsx): reject JSX namespaced attributes outside Solid's known prefixes.
|
|
608
|
+
- [`solid/prefer-classlist`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-prefer-classlist.tsx): prefer the `classList` JSX prop over `clsx`/`classnames` calls.
|
|
609
|
+
- [`solid/prefer-for`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-prefer-for.tsx): prefer the `<For>` component over `Array#map` for JSX list rendering.
|
|
610
|
+
- [`solid/prefer-show`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-prefer-show.tsx): prefer the `<Show>` component over `cond && <JSX />` conditionals.
|
|
611
|
+
- [`solid/reactivity`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-reactivity.tsx): flag bare signal accessors that break fine-grained reactivity tracking.
|
|
612
|
+
- [`solid/self-closing-comp`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-self-closing-comp.tsx): require empty JSX components to use the self-closing form.
|
|
613
|
+
- [`solid/style-prop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-style-prop.tsx): reject camelCased CSS keys in JSX `style` object literals.
|
|
614
|
+
- [`solid/validate-jsx-nesting`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/solid-validate-jsx-nesting.tsx): reject JSX nestings that the HTML parser would silently restructure at runtime, `<p>` cannot contain block-level children, `<a>` cannot contain another `<a>`, and `<button>` cannot contain other interactive elements.
|
|
613
615
|
|
|
614
616
|
### Jest
|
|
615
617
|
|
|
@@ -617,25 +619,25 @@ Jest test source rules. Apply to TypeScript test files that use the Jest runner
|
|
|
617
619
|
|
|
618
620
|
Source: [`eslint-plugin-jest`](https://github.com/jest-community/eslint-plugin-jest).
|
|
619
621
|
|
|
620
|
-
- [`jest/expect-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
621
|
-
- [`jest/max-expects`](https://github.com/samchon/ttsc/blob/master/
|
|
622
|
-
- [`jest/no-conditional-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
623
|
-
- [`jest/no-conditional-in-test`](https://github.com/samchon/ttsc/blob/master/
|
|
624
|
-
- [`jest/no-disabled-tests`](https://github.com/samchon/ttsc/blob/master/
|
|
625
|
-
- [`jest/no-done-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
626
|
-
- [`jest/no-duplicate-hooks`](https://github.com/samchon/ttsc/blob/master/
|
|
627
|
-
- [`jest/no-export`](https://github.com/samchon/ttsc/blob/master/
|
|
628
|
-
- [`jest/no-focused-tests`](https://github.com/samchon/ttsc/blob/master/
|
|
629
|
-
- [`jest/no-hooks`](https://github.com/samchon/ttsc/blob/master/
|
|
630
|
-
- [`jest/no-identical-title`](https://github.com/samchon/ttsc/blob/master/
|
|
631
|
-
- [`jest/no-standalone-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
632
|
-
- [`jest/no-test-prefixes`](https://github.com/samchon/ttsc/blob/master/
|
|
633
|
-
- [`jest/no-test-return-statement`](https://github.com/samchon/ttsc/blob/master/
|
|
634
|
-
- [`jest/prefer-to-have-length`](https://github.com/samchon/ttsc/blob/master/
|
|
635
|
-
- [`jest/require-to-throw-message`](https://github.com/samchon/ttsc/blob/master/
|
|
636
|
-
- [`jest/valid-describe-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
637
|
-
- [`jest/valid-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
638
|
-
- [`jest/valid-title`](https://github.com/samchon/ttsc/blob/master/
|
|
622
|
+
- [`jest/expect-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-expect-expect.ts): require every Jest test body to contain at least one `expect(...)` call.
|
|
623
|
+
- [`jest/max-expects`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-max-expects.ts): limit the number of `expect(...)` calls inside a single Jest test body.
|
|
624
|
+
- [`jest/no-conditional-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-conditional-expect.ts): reject `expect(...)` calls under conditional branches in Jest tests.
|
|
625
|
+
- [`jest/no-conditional-in-test`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-conditional-in-test.ts): reject conditional logic (`if`/`switch`/ternary) inside Jest test bodies.
|
|
626
|
+
- [`jest/no-disabled-tests`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-disabled-tests.ts): reject `test.skip` / `it.skip` / `describe.skip` / `.todo` variants.
|
|
627
|
+
- [`jest/no-done-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-done-callback.ts): reject `done` callback parameters in Jest tests and lifecycle hooks.
|
|
628
|
+
- [`jest/no-duplicate-hooks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-duplicate-hooks.ts): reject duplicate setup/teardown hook calls in the same `describe`.
|
|
629
|
+
- [`jest/no-export`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-export.ts): reject `export` statements inside Jest test files.
|
|
630
|
+
- [`jest/no-focused-tests`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-focused-tests.ts): reject `test.only` / `it.only` / `describe.only`.
|
|
631
|
+
- [`jest/no-hooks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-hooks.ts): reject Jest `beforeEach` / `afterEach` / `beforeAll` / `afterAll` hooks.
|
|
632
|
+
- [`jest/no-identical-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-identical-title.ts): reject duplicate Jest test or `describe` titles within the same suite scope.
|
|
633
|
+
- [`jest/no-standalone-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-standalone-expect.ts): reject `expect(...)` calls outside Jest tests and hooks.
|
|
634
|
+
- [`jest/no-test-prefixes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-test-prefixes.ts): reject the legacy `f`/`x` test prefixes (`fit`, `xit`, `fdescribe`, `xdescribe`).
|
|
635
|
+
- [`jest/no-test-return-statement`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-no-test-return-statement.ts): reject `return` statements that return non-Promise values from a Jest test callback.
|
|
636
|
+
- [`jest/prefer-to-have-length`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-prefer-to-have-length.ts): prefer `expect(value).toHaveLength(n)` over asserting on `value.length` with `toBe`.
|
|
637
|
+
- [`jest/require-to-throw-message`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-require-to-throw-message.ts): require a message argument on `expect(...).toThrow(...)`.
|
|
638
|
+
- [`jest/valid-describe-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-valid-describe-callback.ts): validate the shape of Jest `describe` callbacks.
|
|
639
|
+
- [`jest/valid-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-valid-expect.ts): validate `expect(...)` arity and matcher chaining: exactly one argument, terminated by a matcher call, and async matchers properly awaited.
|
|
640
|
+
- [`jest/valid-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jest-valid-title.ts): require non-empty static Jest test and `describe` titles.
|
|
639
641
|
|
|
640
642
|
### Vitest
|
|
641
643
|
|
|
@@ -643,19 +645,19 @@ Vitest test source rules. Vitest reuses much of Jest's testing surface but ships
|
|
|
643
645
|
|
|
644
646
|
Source: [`@vitest/eslint-plugin`](https://github.com/vitest-dev/eslint-plugin-vitest).
|
|
645
647
|
|
|
646
|
-
- [`vitest/expect-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
647
|
-
- [`vitest/no-conditional-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
648
|
-
- [`vitest/no-conditional-tests`](https://github.com/samchon/ttsc/blob/master/
|
|
649
|
-
- [`vitest/no-disabled-tests`](https://github.com/samchon/ttsc/blob/master/
|
|
650
|
-
- [`vitest/no-done-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
651
|
-
- [`vitest/no-focused-tests`](https://github.com/samchon/ttsc/blob/master/
|
|
652
|
-
- [`vitest/no-identical-title`](https://github.com/samchon/ttsc/blob/master/
|
|
653
|
-
- [`vitest/no-standalone-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
654
|
-
- [`vitest/no-test-return-statement`](https://github.com/samchon/ttsc/blob/master/
|
|
655
|
-
- [`vitest/prefer-to-have-length`](https://github.com/samchon/ttsc/blob/master/
|
|
656
|
-
- [`vitest/valid-describe-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
657
|
-
- [`vitest/valid-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
658
|
-
- [`vitest/valid-title`](https://github.com/samchon/ttsc/blob/master/
|
|
648
|
+
- [`vitest/expect-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-expect-expect.ts): require every Vitest test body to contain at least one `expect(...)` call.
|
|
649
|
+
- [`vitest/no-conditional-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-conditional-expect.ts): reject `expect(...)` calls under conditional branches in Vitest tests.
|
|
650
|
+
- [`vitest/no-conditional-tests`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-conditional-tests.ts): reject `test(...)` / `it(...)` declarations inside loops or `if` branches.
|
|
651
|
+
- [`vitest/no-disabled-tests`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-disabled-tests.ts): reject `test.skip`, `it.skip`, `describe.skip`, and `.todo` variants.
|
|
652
|
+
- [`vitest/no-done-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-done-callback.ts): reject `done` callback parameters in Vitest tests and lifecycle hooks.
|
|
653
|
+
- [`vitest/no-focused-tests`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-focused-tests.ts): reject `test.only`, `it.only`, and `describe.only`.
|
|
654
|
+
- [`vitest/no-identical-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-identical-title.ts): reject duplicate Vitest test or `describe` titles within the same suite scope.
|
|
655
|
+
- [`vitest/no-standalone-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-standalone-expect.ts): reject `expect(...)` calls outside Vitest tests and hooks.
|
|
656
|
+
- [`vitest/no-test-return-statement`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-no-test-return-statement.ts): reject `return` statements that return non-Promise values from a Vitest test callback.
|
|
657
|
+
- [`vitest/prefer-to-have-length`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-prefer-to-have-length.ts): prefer `expect(value).toHaveLength(n)` over asserting on `value.length` with `toBe`.
|
|
658
|
+
- [`vitest/valid-describe-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-valid-describe-callback.ts): validate the shape of Vitest `describe` callbacks.
|
|
659
|
+
- [`vitest/valid-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-valid-expect.ts): validate `expect(...)` arity and matcher chaining.
|
|
660
|
+
- [`vitest/valid-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/vitest-valid-title.ts): require non-empty static Vitest test and `describe` titles.
|
|
659
661
|
|
|
660
662
|
### Testing Library
|
|
661
663
|
|
|
@@ -663,35 +665,35 @@ Testing Library test source rules for TS/TSX test files. AST-only; rules report
|
|
|
663
665
|
|
|
664
666
|
Source: [`eslint-plugin-testing-library`](https://github.com/testing-library/eslint-plugin-testing-library).
|
|
665
667
|
|
|
666
|
-
- [`testing-library/await-async-events`](https://github.com/samchon/ttsc/blob/master/
|
|
667
|
-
- [`testing-library/await-async-queries`](https://github.com/samchon/ttsc/blob/master/
|
|
668
|
-
- [`testing-library/await-async-utils`](https://github.com/samchon/ttsc/blob/master/
|
|
669
|
-
- [`testing-library/no-await-sync-events`](https://github.com/samchon/ttsc/blob/master/
|
|
670
|
-
- [`testing-library/no-await-sync-queries`](https://github.com/samchon/ttsc/blob/master/
|
|
671
|
-
- [`testing-library/no-container`](https://github.com/samchon/ttsc/blob/master/
|
|
672
|
-
- [`testing-library/no-node-access`](https://github.com/samchon/ttsc/blob/master/
|
|
673
|
-
- [`testing-library/prefer-screen-queries`](https://github.com/samchon/ttsc/blob/master/
|
|
674
|
-
- [`testing-library/no-debugging-utils`](https://github.com/samchon/ttsc/blob/master/
|
|
675
|
-
- [`testing-library/no-dom-import`](https://github.com/samchon/ttsc/blob/master/
|
|
676
|
-
- [`testing-library/no-manual-cleanup`](https://github.com/samchon/ttsc/blob/master/
|
|
677
|
-
- [`testing-library/no-test-id-queries`](https://github.com/samchon/ttsc/blob/master/
|
|
678
|
-
- [`testing-library/no-wait-for-multiple-assertions`](https://github.com/samchon/ttsc/blob/master/
|
|
679
|
-
- [`testing-library/no-wait-for-side-effects`](https://github.com/samchon/ttsc/blob/master/
|
|
680
|
-
- [`testing-library/no-wait-for-snapshot`](https://github.com/samchon/ttsc/blob/master/
|
|
681
|
-
- [`testing-library/prefer-find-by`](https://github.com/samchon/ttsc/blob/master/
|
|
682
|
-
- [`testing-library/prefer-query-by-disappearance`](https://github.com/samchon/ttsc/blob/master/
|
|
683
|
-
- [`testing-library/prefer-user-event`](https://github.com/samchon/ttsc/blob/master/
|
|
684
|
-
- [`testing-library/prefer-user-event-setup`](https://github.com/samchon/ttsc/blob/master/
|
|
685
|
-
- [`testing-library/no-promise-in-fire-event`](https://github.com/samchon/ttsc/blob/master/
|
|
686
|
-
- [`testing-library/no-render-in-lifecycle`](https://github.com/samchon/ttsc/blob/master/
|
|
687
|
-
- [`testing-library/no-unnecessary-act`](https://github.com/samchon/ttsc/blob/master/
|
|
688
|
-
- [`testing-library/consistent-data-testid`](https://github.com/samchon/ttsc/blob/master/
|
|
689
|
-
- [`testing-library/no-global-regexp-flag-in-query`](https://github.com/samchon/ttsc/blob/master/
|
|
690
|
-
- [`testing-library/prefer-explicit-assert`](https://github.com/samchon/ttsc/blob/master/
|
|
691
|
-
- [`testing-library/prefer-implicit-assert`](https://github.com/samchon/ttsc/blob/master/
|
|
692
|
-
- [`testing-library/prefer-presence-queries`](https://github.com/samchon/ttsc/blob/master/
|
|
693
|
-
- [`testing-library/prefer-query-matchers`](https://github.com/samchon/ttsc/blob/master/
|
|
694
|
-
- [`testing-library/render-result-naming-convention`](https://github.com/samchon/ttsc/blob/master/
|
|
668
|
+
- [`testing-library/await-async-events`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-await-async-events.ts): require Promise-returning user-event methods to be awaited.
|
|
669
|
+
- [`testing-library/await-async-queries`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-await-async-queries.ts): require `findBy*` queries to be awaited.
|
|
670
|
+
- [`testing-library/await-async-utils`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-await-async-utils.ts): require async utilities such as `waitFor` to be awaited.
|
|
671
|
+
- [`testing-library/no-await-sync-events`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-await-sync-events.ts): reject `await` on synchronous `fireEvent.*` calls.
|
|
672
|
+
- [`testing-library/no-await-sync-queries`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-await-sync-queries.ts): reject `await` on synchronous `getBy*` and `queryBy*` queries.
|
|
673
|
+
- [`testing-library/no-container`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-container.ts): reject destructuring or accessing the render-result `container`.
|
|
674
|
+
- [`testing-library/no-node-access`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-node-access.ts): reject DOM traversal (`parentElement`, `children`, ...) off a query result.
|
|
675
|
+
- [`testing-library/prefer-screen-queries`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-screen-queries.ts): prefer `screen.*` queries over render-result query functions.
|
|
676
|
+
- [`testing-library/no-debugging-utils`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-debugging-utils.ts): reject committed debug helpers such as `debug()` and `logTestingPlaygroundURL()`.
|
|
677
|
+
- [`testing-library/no-dom-import`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-dom-import.ts): reject direct imports from `@testing-library/dom` in favor of the framework adapter.
|
|
678
|
+
- [`testing-library/no-manual-cleanup`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-manual-cleanup.ts): reject manual `cleanup()` calls when the runner registers them automatically.
|
|
679
|
+
- [`testing-library/no-test-id-queries`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-test-id-queries.ts): reject `*ByTestId` queries in favor of accessibility-driven queries.
|
|
680
|
+
- [`testing-library/no-wait-for-multiple-assertions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-wait-for-multiple-assertions.ts): reject more than one `expect(...)` inside a single `waitFor` callback.
|
|
681
|
+
- [`testing-library/no-wait-for-side-effects`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-wait-for-side-effects.ts): reject mutating calls (e.g. `fireEvent.*`) inside a `waitFor` callback.
|
|
682
|
+
- [`testing-library/no-wait-for-snapshot`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-wait-for-snapshot.ts): reject `toMatchSnapshot` / `toMatchInlineSnapshot` inside a `waitFor` callback.
|
|
683
|
+
- [`testing-library/prefer-find-by`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-find-by.ts): prefer `findBy*` over `waitFor(() => getBy*(...))`.
|
|
684
|
+
- [`testing-library/prefer-query-by-disappearance`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-query-by-disappearance.ts): prefer `queryBy*` when waiting for an element to disappear.
|
|
685
|
+
- [`testing-library/prefer-user-event`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-user-event.ts): prefer `user-event` interactions over equivalent `fireEvent.*` calls.
|
|
686
|
+
- [`testing-library/prefer-user-event-setup`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-user-event-setup.ts): require direct user-event interactions to go through `userEvent.setup()`.
|
|
687
|
+
- [`testing-library/no-promise-in-fire-event`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-promise-in-fire-event.ts): reject passing Promise-returning expressions into `fireEvent.*` arguments.
|
|
688
|
+
- [`testing-library/no-render-in-lifecycle`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-render-in-lifecycle.ts): reject `render()` calls inside `beforeEach` and other lifecycle hooks.
|
|
689
|
+
- [`testing-library/no-unnecessary-act`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-unnecessary-act.ts): reject wrapping Testing Library calls in `act(...)` when the helper already wraps them.
|
|
690
|
+
- [`testing-library/consistent-data-testid`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-consistent-data-testid.ts): require `data-testid` values to match the configured `testIdPattern`.
|
|
691
|
+
- [`testing-library/no-global-regexp-flag-in-query`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-no-global-regexp-flag-in-query.ts): reject `/g` regex flags inside Testing Library query arguments.
|
|
692
|
+
- [`testing-library/prefer-explicit-assert`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-explicit-assert.ts): reject standalone `getBy*` queries used as implicit assertions.
|
|
693
|
+
- [`testing-library/prefer-implicit-assert`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-implicit-assert.ts): reject redundant `toBeInTheDocument()` matchers around `getBy*` queries.
|
|
694
|
+
- [`testing-library/prefer-presence-queries`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-presence-queries.ts): require presence assertions to use `getBy*` and absence assertions to use `queryBy*`.
|
|
695
|
+
- [`testing-library/prefer-query-matchers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-prefer-query-matchers.ts): reject truthiness matchers (`toBeNull`, `toBeTruthy`, `toBeFalsy`) around Testing Library queries.
|
|
696
|
+
- [`testing-library/render-result-naming-convention`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/testing-library-render-result-naming-convention.ts): require `render()` results to be named `view`, `utils`, or destructured.
|
|
695
697
|
|
|
696
698
|
### Playwright
|
|
697
699
|
|
|
@@ -699,37 +701,37 @@ Playwright end-to-end test rules applied to TypeScript test files driven by the
|
|
|
699
701
|
|
|
700
702
|
Source: [`eslint-plugin-playwright`](https://github.com/playwright-community/eslint-plugin-playwright).
|
|
701
703
|
|
|
702
|
-
- [`playwright/expect-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
703
|
-
- [`playwright/max-expects`](https://github.com/samchon/ttsc/blob/master/
|
|
704
|
-
- [`playwright/no-conditional-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
705
|
-
- [`playwright/no-conditional-in-test`](https://github.com/samchon/ttsc/blob/master/
|
|
706
|
-
- [`playwright/no-duplicate-hooks`](https://github.com/samchon/ttsc/blob/master/
|
|
707
|
-
- [`playwright/no-duplicate-slow`](https://github.com/samchon/ttsc/blob/master/
|
|
708
|
-
- [`playwright/no-element-handle`](https://github.com/samchon/ttsc/blob/master/
|
|
709
|
-
- [`playwright/no-eval`](https://github.com/samchon/ttsc/blob/master/
|
|
710
|
-
- [`playwright/no-focused-test`](https://github.com/samchon/ttsc/blob/master/
|
|
711
|
-
- [`playwright/no-force-option`](https://github.com/samchon/ttsc/blob/master/
|
|
712
|
-
- [`playwright/no-get-by-title`](https://github.com/samchon/ttsc/blob/master/
|
|
713
|
-
- [`playwright/no-hooks`](https://github.com/samchon/ttsc/blob/master/
|
|
714
|
-
- [`playwright/no-nested-step`](https://github.com/samchon/ttsc/blob/master/
|
|
715
|
-
- [`playwright/no-networkidle`](https://github.com/samchon/ttsc/blob/master/
|
|
716
|
-
- [`playwright/no-nth-methods`](https://github.com/samchon/ttsc/blob/master/
|
|
717
|
-
- [`playwright/no-page-pause`](https://github.com/samchon/ttsc/blob/master/
|
|
718
|
-
- [`playwright/no-skipped-test`](https://github.com/samchon/ttsc/blob/master/
|
|
719
|
-
- [`playwright/no-slowed-test`](https://github.com/samchon/ttsc/blob/master/
|
|
720
|
-
- [`playwright/no-standalone-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
721
|
-
- [`playwright/no-wait-for-navigation`](https://github.com/samchon/ttsc/blob/master/
|
|
722
|
-
- [`playwright/no-wait-for-selector`](https://github.com/samchon/ttsc/blob/master/
|
|
723
|
-
- [`playwright/no-wait-for-timeout`](https://github.com/samchon/ttsc/blob/master/
|
|
724
|
-
- [`playwright/prefer-locator`](https://github.com/samchon/ttsc/blob/master/
|
|
725
|
-
- [`playwright/prefer-to-have-count`](https://github.com/samchon/ttsc/blob/master/
|
|
726
|
-
- [`playwright/prefer-to-have-length`](https://github.com/samchon/ttsc/blob/master/
|
|
727
|
-
- [`playwright/prefer-web-first-assertions`](https://github.com/samchon/ttsc/blob/master/
|
|
728
|
-
- [`playwright/require-to-pass-timeout`](https://github.com/samchon/ttsc/blob/master/
|
|
729
|
-
- [`playwright/require-to-throw-message`](https://github.com/samchon/ttsc/blob/master/
|
|
730
|
-
- [`playwright/valid-describe-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
731
|
-
- [`playwright/valid-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
732
|
-
- [`playwright/valid-title`](https://github.com/samchon/ttsc/blob/master/
|
|
704
|
+
- [`playwright/expect-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-expect-expect.ts): require every Playwright test body to contain at least one `expect(...)` call.
|
|
705
|
+
- [`playwright/max-expects`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-max-expects.ts): limit the assertion count inside a single Playwright test body.
|
|
706
|
+
- [`playwright/no-conditional-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-conditional-expect.ts): reject `expect(...)` calls under conditional branches in Playwright tests.
|
|
707
|
+
- [`playwright/no-conditional-in-test`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-conditional-in-test.ts): reject conditional logic inside Playwright test bodies.
|
|
708
|
+
- [`playwright/no-duplicate-hooks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-duplicate-hooks.ts): reject duplicate Playwright setup/teardown hook calls in the same `test.describe`.
|
|
709
|
+
- [`playwright/no-duplicate-slow`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-duplicate-slow.ts): reject repeated `test.slow()` calls inside the same test.
|
|
710
|
+
- [`playwright/no-element-handle`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-element-handle.ts): reject the legacy `ElementHandle`-style Playwright API (`page.$`, `page.$$`).
|
|
711
|
+
- [`playwright/no-eval`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-eval.ts): reject `page.$eval` and `page.$$eval`.
|
|
712
|
+
- [`playwright/no-focused-test`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-focused-test.ts): reject `test.only`, `test.describe.only`, and similar focused Playwright tests.
|
|
713
|
+
- [`playwright/no-force-option`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-force-option.ts): reject Playwright `{ force: true }` options on actionable commands.
|
|
714
|
+
- [`playwright/no-get-by-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-get-by-title.ts): reject `getByTitle(...)` locators.
|
|
715
|
+
- [`playwright/no-hooks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-hooks.ts): reject Playwright `test.beforeEach` / `test.afterEach` / etc.
|
|
716
|
+
- [`playwright/no-nested-step`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-nested-step.ts): reject nested `test.step(...)` calls.
|
|
717
|
+
- [`playwright/no-networkidle`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-networkidle.ts): reject the `networkidle` load-state in `page.waitForLoadState` and navigation options.
|
|
718
|
+
- [`playwright/no-nth-methods`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-nth-methods.ts): reject `.first()`, `.last()`, and `.nth(...)` on locators.
|
|
719
|
+
- [`playwright/no-page-pause`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-page-pause.ts): reject `page.pause()` debugging calls.
|
|
720
|
+
- [`playwright/no-skipped-test`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-skipped-test.ts): reject `test.skip`, `test.describe.skip`, and the conditional `test.skip()` annotation.
|
|
721
|
+
- [`playwright/no-slowed-test`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-slowed-test.ts): reject `test.slow()` marks on Playwright tests.
|
|
722
|
+
- [`playwright/no-standalone-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-standalone-expect.ts): reject `expect(...)` calls outside the body of a Playwright test or lifecycle hook.
|
|
723
|
+
- [`playwright/no-wait-for-navigation`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-wait-for-navigation.ts): reject `page.waitForNavigation`.
|
|
724
|
+
- [`playwright/no-wait-for-selector`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-wait-for-selector.ts): reject `page.waitForSelector`.
|
|
725
|
+
- [`playwright/no-wait-for-timeout`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-no-wait-for-timeout.ts): reject `page.waitForTimeout(ms)` sleeps.
|
|
726
|
+
- [`playwright/prefer-locator`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-prefer-locator.ts): prefer locator-based Playwright APIs over page-level convenience methods.
|
|
727
|
+
- [`playwright/prefer-to-have-count`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-prefer-to-have-count.ts): prefer `expect(locator).toHaveCount(n)` over asserting on `await locator.count()`.
|
|
728
|
+
- [`playwright/prefer-to-have-length`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-prefer-to-have-length.ts): prefer `expect(value).toHaveLength(n)` over asserting on `value.length` directly.
|
|
729
|
+
- [`playwright/prefer-web-first-assertions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-prefer-web-first-assertions.ts): prefer Playwright web-first assertions over composed manual waits.
|
|
730
|
+
- [`playwright/require-to-pass-timeout`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-require-to-pass-timeout.ts): require an explicit `timeout` option on `expect(...).toPass(...)`.
|
|
731
|
+
- [`playwright/require-to-throw-message`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-require-to-throw-message.ts): require a message argument on `expect(...).toThrow(...)`.
|
|
732
|
+
- [`playwright/valid-describe-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-valid-describe-callback.ts): validate the shape of Playwright `test.describe` callbacks.
|
|
733
|
+
- [`playwright/valid-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-valid-expect.ts): validate `expect(...)` arity and matcher chaining.
|
|
734
|
+
- [`playwright/valid-title`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/playwright-valid-title.ts): require non-empty static Playwright test and `describe` titles.
|
|
733
735
|
|
|
734
736
|
### Cypress
|
|
735
737
|
|
|
@@ -737,19 +739,19 @@ Cypress end-to-end test rules. Apply to TypeScript/TSX sources that use the Cypr
|
|
|
737
739
|
|
|
738
740
|
Source: [`eslint-plugin-cypress`](https://github.com/cypress-io/eslint-plugin-cypress).
|
|
739
741
|
|
|
740
|
-
- [`cypress/assertion-before-screenshot`](https://github.com/samchon/ttsc/blob/master/
|
|
741
|
-
- [`cypress/no-and`](https://github.com/samchon/ttsc/blob/master/
|
|
742
|
-
- [`cypress/no-assigning-return-values`](https://github.com/samchon/ttsc/blob/master/
|
|
743
|
-
- [`cypress/no-async-before`](https://github.com/samchon/ttsc/blob/master/
|
|
744
|
-
- [`cypress/no-async-tests`](https://github.com/samchon/ttsc/blob/master/
|
|
745
|
-
- [`cypress/no-chained-get`](https://github.com/samchon/ttsc/blob/master/
|
|
746
|
-
- [`cypress/no-debug`](https://github.com/samchon/ttsc/blob/master/
|
|
747
|
-
- [`cypress/no-force`](https://github.com/samchon/ttsc/blob/master/
|
|
748
|
-
- [`cypress/no-pause`](https://github.com/samchon/ttsc/blob/master/
|
|
749
|
-
- [`cypress/no-unnecessary-waiting`](https://github.com/samchon/ttsc/blob/master/
|
|
750
|
-
- [`cypress/no-xpath`](https://github.com/samchon/ttsc/blob/master/
|
|
751
|
-
- [`cypress/require-data-selectors`](https://github.com/samchon/ttsc/blob/master/
|
|
752
|
-
- [`cypress/unsafe-to-chain-command`](https://github.com/samchon/ttsc/blob/master/
|
|
742
|
+
- [`cypress/assertion-before-screenshot`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-assertion-before-screenshot.ts): require a Cypress assertion before `cy.screenshot()`.
|
|
743
|
+
- [`cypress/no-and`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-and.ts): prefer `.should()` over `.and()` when starting Cypress assertion chains.
|
|
744
|
+
- [`cypress/no-assigning-return-values`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-assigning-return-values.ts): reject assigning the return value of Cypress commands.
|
|
745
|
+
- [`cypress/no-async-before`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-async-before.ts): reject async `before` and `beforeEach` callbacks.
|
|
746
|
+
- [`cypress/no-async-tests`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-async-tests.ts): reject async Cypress test callbacks.
|
|
747
|
+
- [`cypress/no-chained-get`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-chained-get.ts): reject chained `.get()` calls.
|
|
748
|
+
- [`cypress/no-debug`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-debug.ts): reject `cy.debug()` and chained `.debug()` commands.
|
|
749
|
+
- [`cypress/no-force`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-force.ts): reject `{ force: true }` on Cypress action commands.
|
|
750
|
+
- [`cypress/no-pause`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-pause.ts): reject `cy.pause()` and chained `.pause()` commands.
|
|
751
|
+
- [`cypress/no-unnecessary-waiting`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-unnecessary-waiting.ts): reject numeric `cy.wait(...)` sleeps.
|
|
752
|
+
- [`cypress/no-xpath`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-no-xpath.ts): reject deprecated `cy.xpath()` selectors.
|
|
753
|
+
- [`cypress/require-data-selectors`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-require-data-selectors.ts): require statically known `cy.get()` selectors to target `data-*` attributes.
|
|
754
|
+
- [`cypress/unsafe-to-chain-command`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/cypress-unsafe-to-chain-command.ts): reject chaining more commands after Cypress action commands.
|
|
753
755
|
|
|
754
756
|
### Storybook
|
|
755
757
|
|
|
@@ -757,22 +759,22 @@ Storybook CSF and configuration rules. Apply to `*.stories.ts(x)` and `.storyboo
|
|
|
757
759
|
|
|
758
760
|
Source: [`eslint-plugin-storybook`](https://github.com/storybookjs/eslint-plugin-storybook).
|
|
759
761
|
|
|
760
|
-
- [`storybook/await-interactions`](https://github.com/samchon/ttsc/blob/master/
|
|
761
|
-
- [`storybook/context-in-play-function`](https://github.com/samchon/ttsc/blob/master/
|
|
762
|
-
- [`storybook/csf-component`](https://github.com/samchon/ttsc/blob/master/
|
|
763
|
-
- [`storybook/default-exports`](https://github.com/samchon/ttsc/blob/master/
|
|
764
|
-
- [`storybook/hierarchy-separator`](https://github.com/samchon/ttsc/blob/master/
|
|
765
|
-
- [`storybook/meta-inline-properties`](https://github.com/samchon/ttsc/blob/master/
|
|
766
|
-
- [`storybook/meta-satisfies-type`](https://github.com/samchon/ttsc/blob/master/
|
|
767
|
-
- [`storybook/no-redundant-story-name`](https://github.com/samchon/ttsc/blob/master/
|
|
768
|
-
- [`storybook/no-renderer-packages`](https://github.com/samchon/ttsc/blob/master/
|
|
769
|
-
- [`storybook/no-stories-of`](https://github.com/samchon/ttsc/blob/master/
|
|
770
|
-
- [`storybook/no-title-property-in-meta`](https://github.com/samchon/ttsc/blob/master/
|
|
771
|
-
- [`storybook/no-uninstalled-addons`](https://github.com/samchon/ttsc/blob/master/
|
|
772
|
-
- [`storybook/prefer-pascal-case`](https://github.com/samchon/ttsc/blob/master/
|
|
773
|
-
- [`storybook/story-exports`](https://github.com/samchon/ttsc/blob/master/
|
|
774
|
-
- [`storybook/use-storybook-expect`](https://github.com/samchon/ttsc/blob/master/
|
|
775
|
-
- [`storybook/use-storybook-testing-library`](https://github.com/samchon/ttsc/blob/master/
|
|
762
|
+
- [`storybook/await-interactions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-await-interactions.ts): require play-function interactions to be awaited.
|
|
763
|
+
- [`storybook/context-in-play-function`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-context-in-play-function.ts): require forwarding the play-function `context` argument when invoking another story's `play` function.
|
|
764
|
+
- [`storybook/csf-component`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-csf-component.ts): require the CSF default meta object to declare a `component`.
|
|
765
|
+
- [`storybook/default-exports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-default-exports.ts): require every story file to provide the CSF default export.
|
|
766
|
+
- [`storybook/hierarchy-separator`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-hierarchy-separator.ts): reject the legacy `|` separator in Storybook story titles.
|
|
767
|
+
- [`storybook/meta-inline-properties`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-meta-inline-properties.ts): require `title` and `args` in CSF meta to be inline literals.
|
|
768
|
+
- [`storybook/meta-satisfies-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-meta-satisfies-type.ts): require CSF meta objects to type-check with `satisfies Meta<…>` rather than a `: Meta<…>` annotation or `as` cast.
|
|
769
|
+
- [`storybook/no-redundant-story-name`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-no-redundant-story-name.ts): reject `name` metadata on a story when it matches Storybook's auto-derived name from the export identifier.
|
|
770
|
+
- [`storybook/no-renderer-packages`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-no-renderer-packages.ts): reject direct imports from Storybook renderer packages.
|
|
771
|
+
- [`storybook/no-stories-of`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-no-stories-of.ts): reject the legacy `storiesOf(...)` builder API.
|
|
772
|
+
- [`storybook/no-title-property-in-meta`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-no-title-property-in-meta.ts): reject the `title` property in CSF meta when the project uses Storybook's auto-title generation.
|
|
773
|
+
- [`storybook/no-uninstalled-addons`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-no-uninstalled-addons.ts): validate Storybook addon names against the project's dependencies.
|
|
774
|
+
- [`storybook/prefer-pascal-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-prefer-pascal-case.ts): require named story exports to use PascalCase.
|
|
775
|
+
- [`storybook/story-exports`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-story-exports.ts): require every story file to export at least one named story alongside the default meta.
|
|
776
|
+
- [`storybook/use-storybook-expect`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-use-storybook-expect.ts): require `expect` to be imported from `@storybook/test` in play functions.
|
|
777
|
+
- [`storybook/use-storybook-testing-library`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/storybook-use-storybook-testing-library.ts): reject direct Testing Library imports inside story files; use the Storybook-bundled re-exports.
|
|
776
778
|
|
|
777
779
|
### TanStack Query
|
|
778
780
|
|
|
@@ -780,14 +782,14 @@ TanStack Query rules. Guard the ergonomic and correctness contracts of TanStack
|
|
|
780
782
|
|
|
781
783
|
Source: [`@tanstack/eslint-plugin-query`](https://github.com/TanStack/query/tree/main/packages/eslint-plugin-query).
|
|
782
784
|
|
|
783
|
-
- [`tanstack-query/exhaustive-deps`](https://github.com/samchon/ttsc/blob/master/
|
|
784
|
-
- [`tanstack-query/infinite-query-property-order`](https://github.com/samchon/ttsc/blob/master/
|
|
785
|
-
- [`tanstack-query/mutation-property-order`](https://github.com/samchon/ttsc/blob/master/
|
|
786
|
-
- [`tanstack-query/no-rest-destructuring`](https://github.com/samchon/ttsc/blob/master/
|
|
787
|
-
- [`tanstack-query/no-unstable-deps`](https://github.com/samchon/ttsc/blob/master/
|
|
788
|
-
- [`tanstack-query/no-void-query-fn`](https://github.com/samchon/ttsc/blob/master/
|
|
789
|
-
- [`tanstack-query/prefer-query-options`](https://github.com/samchon/ttsc/blob/master/
|
|
790
|
-
- [`tanstack-query/stable-query-client`](https://github.com/samchon/ttsc/blob/master/
|
|
785
|
+
- [`tanstack-query/exhaustive-deps`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-exhaustive-deps.ts): require `queryKey` arrays to enumerate every reactive identifier the `queryFn` reads.
|
|
786
|
+
- [`tanstack-query/infinite-query-property-order`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-infinite-query-property-order.ts): require `queryFn`, `getPreviousPageParam`, and `getNextPageParam` inside `useInfiniteQuery` to appear in the order TanStack Query documents.
|
|
787
|
+
- [`tanstack-query/mutation-property-order`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-mutation-property-order.ts): require `useMutation` callbacks to declare `onMutate` before `onError` and `onSettled`.
|
|
788
|
+
- [`tanstack-query/no-rest-destructuring`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-no-rest-destructuring.ts): reject `...rest` destructuring on TanStack Query hook results.
|
|
789
|
+
- [`tanstack-query/no-unstable-deps`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-no-unstable-deps.ts): reject passing entire TanStack Query hook results into React dependency arrays.
|
|
790
|
+
- [`tanstack-query/no-void-query-fn`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-no-void-query-fn.ts): reject `queryFn` callbacks that resolve to `void`.
|
|
791
|
+
- [`tanstack-query/prefer-query-options`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-prefer-query-options.ts): prefer wrapping query options in the `queryOptions()` helper.
|
|
792
|
+
- [`tanstack-query/stable-query-client`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/tanstack-query-stable-query-client.ts): reject creating a `QueryClient` inside a React component or hook body.
|
|
791
793
|
|
|
792
794
|
### Promise
|
|
793
795
|
|
|
@@ -795,23 +797,23 @@ Promise correctness and style rules. Check the chain shape of Promise-using code
|
|
|
795
797
|
|
|
796
798
|
Source: [`eslint-plugin-promise`](https://github.com/eslint-community/eslint-plugin-promise).
|
|
797
799
|
|
|
798
|
-
- [`promise/always-return`](https://github.com/samchon/ttsc/blob/master/
|
|
799
|
-
- [`promise/avoid-new`](https://github.com/samchon/ttsc/blob/master/
|
|
800
|
-
- [`promise/catch-or-return`](https://github.com/samchon/ttsc/blob/master/
|
|
801
|
-
- [`promise/no-callback-in-promise`](https://github.com/samchon/ttsc/blob/master/
|
|
802
|
-
- [`promise/no-multiple-resolved`](https://github.com/samchon/ttsc/blob/master/
|
|
803
|
-
- [`promise/no-native`](https://github.com/samchon/ttsc/blob/master/
|
|
804
|
-
- [`promise/no-nesting`](https://github.com/samchon/ttsc/blob/master/
|
|
805
|
-
- [`promise/no-new-statics`](https://github.com/samchon/ttsc/blob/master/
|
|
806
|
-
- [`promise/no-promise-in-callback`](https://github.com/samchon/ttsc/blob/master/
|
|
807
|
-
- [`promise/no-return-in-finally`](https://github.com/samchon/ttsc/blob/master/
|
|
808
|
-
- [`promise/no-return-wrap`](https://github.com/samchon/ttsc/blob/master/
|
|
809
|
-
- [`promise/param-names`](https://github.com/samchon/ttsc/blob/master/
|
|
810
|
-
- [`promise/prefer-await-to-callbacks`](https://github.com/samchon/ttsc/blob/master/
|
|
811
|
-
- [`promise/prefer-await-to-then`](https://github.com/samchon/ttsc/blob/master/
|
|
812
|
-
- [`promise/prefer-catch`](https://github.com/samchon/ttsc/blob/master/
|
|
813
|
-
- [`promise/spec-only`](https://github.com/samchon/ttsc/blob/master/
|
|
814
|
-
- [`promise/valid-params`](https://github.com/samchon/ttsc/blob/master/
|
|
800
|
+
- [`promise/always-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-always-return.ts): require `.then(...)` callbacks to return a value or throw.
|
|
801
|
+
- [`promise/avoid-new`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-avoid-new.ts): reject every `new Promise(...)` construction.
|
|
802
|
+
- [`promise/catch-or-return`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-catch-or-return.ts): require unreturned promise chains to terminate with `catch()`.
|
|
803
|
+
- [`promise/no-callback-in-promise`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-callback-in-promise.ts): reject direct invocation of an error-first callback inside a `then()` or `catch()` handler.
|
|
804
|
+
- [`promise/no-multiple-resolved`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-multiple-resolved.ts): detect Promise executor bodies with more than one resolve/reject call.
|
|
805
|
+
- [`promise/no-native`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-native.ts): require every file that uses `Promise` to import or require the implementation explicitly.
|
|
806
|
+
- [`promise/no-nesting`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-nesting.ts): reject nested `then()`/`catch()` calls inside the body of a Promise callback.
|
|
807
|
+
- [`promise/no-new-statics`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-new-statics.ts): reject `new` applied to Promise statics such as `new Promise.resolve(x)`.
|
|
808
|
+
- [`promise/no-promise-in-callback`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-promise-in-callback.ts): reject building a promise chain inside the body of an error-first callback.
|
|
809
|
+
- [`promise/no-return-in-finally`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-return-in-finally.ts): reject `return` from inside a `finally()` callback.
|
|
810
|
+
- [`promise/no-return-wrap`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-no-return-wrap.ts): reject `return Promise.resolve(x)` and `return Promise.reject(x)` inside promise callbacks.
|
|
811
|
+
- [`promise/param-names`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-param-names.ts): enforce canonical parameter names (`resolve`, `reject`) on Promise executor functions.
|
|
812
|
+
- [`promise/prefer-await-to-callbacks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-prefer-await-to-callbacks.ts): flag continuation-passing callback shapes and suggest an `async`/`await` rewrite.
|
|
813
|
+
- [`promise/prefer-await-to-then`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-prefer-await-to-then.ts): prefer `await` over explicit `.then()`/`.catch()`/`.finally()` chains inside `async` functions.
|
|
814
|
+
- [`promise/prefer-catch`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-prefer-catch.ts): prefer `.catch(handler)` over the two-argument form `.then(onFulfilled, onRejected)`.
|
|
815
|
+
- [`promise/spec-only`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-spec-only.ts): reject non-standard `Promise` statics such as `Promise.done`, `Promise.spread`, or library-specific extensions shimmed onto the global.
|
|
816
|
+
- [`promise/valid-params`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/promise-valid-params.ts): enforce the argument counts the Promise spec defines for each method.
|
|
815
817
|
|
|
816
818
|
### Unicorn
|
|
817
819
|
|
|
@@ -819,152 +821,152 @@ Modernization and style rules spanning array iteration, string and regex idioms,
|
|
|
819
821
|
|
|
820
822
|
Source: [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn).
|
|
821
823
|
|
|
822
|
-
- [`unicorn/better-regex`](https://github.com/samchon/ttsc/blob/master/
|
|
823
|
-
- [`unicorn/catch-error-name`](https://github.com/samchon/ttsc/blob/master/
|
|
824
|
-
- [`unicorn/consistent-assert`](https://github.com/samchon/ttsc/blob/master/
|
|
825
|
-
- [`unicorn/consistent-date-clone`](https://github.com/samchon/ttsc/blob/master/
|
|
826
|
-
- [`unicorn/consistent-destructuring`](https://github.com/samchon/ttsc/blob/master/
|
|
827
|
-
- [`unicorn/consistent-empty-array-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
828
|
-
- [`unicorn/consistent-existence-index-check`](https://github.com/samchon/ttsc/blob/master/
|
|
829
|
-
- [`unicorn/consistent-function-scoping`](https://github.com/samchon/ttsc/blob/master/
|
|
830
|
-
- [`unicorn/consistent-template-literal-escape`](https://github.com/samchon/ttsc/blob/master/
|
|
831
|
-
- [`unicorn/custom-error-definition`](https://github.com/samchon/ttsc/blob/master/
|
|
832
|
-
- [`unicorn/empty-brace-spaces`](https://github.com/samchon/ttsc/blob/master/
|
|
833
|
-
- [`unicorn/error-message`](https://github.com/samchon/ttsc/blob/master/
|
|
834
|
-
- [`unicorn/escape-case`](https://github.com/samchon/ttsc/blob/master/
|
|
835
|
-
- [`unicorn/expiring-todo-comments`](https://github.com/samchon/ttsc/blob/master/
|
|
836
|
-
- [`unicorn/explicit-length-check`](https://github.com/samchon/ttsc/blob/master/
|
|
837
|
-
- [`unicorn/filename-case`](https://github.com/samchon/ttsc/blob/master/
|
|
838
|
-
- [`unicorn/import-style`](https://github.com/samchon/ttsc/blob/master/
|
|
839
|
-
- [`unicorn/isolated-functions`](https://github.com/samchon/ttsc/blob/master/
|
|
840
|
-
- [`unicorn/new-for-builtins`](https://github.com/samchon/ttsc/blob/master/
|
|
841
|
-
- [`unicorn/no-abusive-eslint-disable`](https://github.com/samchon/ttsc/blob/master/
|
|
842
|
-
- [`unicorn/no-accessor-recursion`](https://github.com/samchon/ttsc/blob/master/
|
|
843
|
-
- [`unicorn/no-anonymous-default-export`](https://github.com/samchon/ttsc/blob/master/
|
|
844
|
-
- [`unicorn/no-array-callback-reference`](https://github.com/samchon/ttsc/blob/master/
|
|
845
|
-
- [`unicorn/no-array-for-each`](https://github.com/samchon/ttsc/blob/master/
|
|
846
|
-
- [`unicorn/no-array-method-this-argument`](https://github.com/samchon/ttsc/blob/master/
|
|
847
|
-
- [`unicorn/no-array-reduce`](https://github.com/samchon/ttsc/blob/master/
|
|
848
|
-
- [`unicorn/no-array-reverse`](https://github.com/samchon/ttsc/blob/master/
|
|
849
|
-
- [`unicorn/no-array-sort`](https://github.com/samchon/ttsc/blob/master/
|
|
850
|
-
- [`unicorn/no-await-expression-member`](https://github.com/samchon/ttsc/blob/master/
|
|
851
|
-
- [`unicorn/no-await-in-promise-methods`](https://github.com/samchon/ttsc/blob/master/
|
|
852
|
-
- [`unicorn/no-console-spaces`](https://github.com/samchon/ttsc/blob/master/
|
|
853
|
-
- [`unicorn/no-document-cookie`](https://github.com/samchon/ttsc/blob/master/
|
|
854
|
-
- [`unicorn/no-empty-file`](https://github.com/samchon/ttsc/blob/master/
|
|
855
|
-
- [`unicorn/no-for-loop`](https://github.com/samchon/ttsc/blob/master/
|
|
856
|
-
- [`unicorn/no-hex-escape`](https://github.com/samchon/ttsc/blob/master/
|
|
857
|
-
- [`unicorn/no-immediate-mutation`](https://github.com/samchon/ttsc/blob/master/
|
|
858
|
-
- [`unicorn/no-instanceof-builtins`](https://github.com/samchon/ttsc/blob/master/
|
|
859
|
-
- [`unicorn/no-invalid-fetch-options`](https://github.com/samchon/ttsc/blob/master/
|
|
860
|
-
- [`unicorn/no-invalid-remove-event-listener`](https://github.com/samchon/ttsc/blob/master/
|
|
861
|
-
- [`unicorn/no-keyword-prefix`](https://github.com/samchon/ttsc/blob/master/
|
|
862
|
-
- [`unicorn/no-lonely-if`](https://github.com/samchon/ttsc/blob/master/
|
|
863
|
-
- [`unicorn/no-magic-array-flat-depth`](https://github.com/samchon/ttsc/blob/master/
|
|
864
|
-
- [`unicorn/no-named-default`](https://github.com/samchon/ttsc/blob/master/
|
|
865
|
-
- [`unicorn/no-negated-condition`](https://github.com/samchon/ttsc/blob/master/
|
|
866
|
-
- [`unicorn/no-negation-in-equality-check`](https://github.com/samchon/ttsc/blob/master/
|
|
867
|
-
- [`unicorn/no-nested-ternary`](https://github.com/samchon/ttsc/blob/master/
|
|
868
|
-
- [`unicorn/no-new-array`](https://github.com/samchon/ttsc/blob/master/
|
|
869
|
-
- [`unicorn/no-new-buffer`](https://github.com/samchon/ttsc/blob/master/
|
|
870
|
-
- [`unicorn/no-null`](https://github.com/samchon/ttsc/blob/master/
|
|
871
|
-
- [`unicorn/no-object-as-default-parameter`](https://github.com/samchon/ttsc/blob/master/
|
|
872
|
-
- [`unicorn/no-process-exit`](https://github.com/samchon/ttsc/blob/master/
|
|
873
|
-
- [`unicorn/no-single-promise-in-promise-methods`](https://github.com/samchon/ttsc/blob/master/
|
|
874
|
-
- [`unicorn/no-static-only-class`](https://github.com/samchon/ttsc/blob/master/
|
|
875
|
-
- [`unicorn/no-thenable`](https://github.com/samchon/ttsc/blob/master/
|
|
876
|
-
- [`unicorn/no-this-assignment`](https://github.com/samchon/ttsc/blob/master/
|
|
877
|
-
- [`unicorn/no-typeof-undefined`](https://github.com/samchon/ttsc/blob/master/
|
|
878
|
-
- [`unicorn/no-unnecessary-array-flat-depth`](https://github.com/samchon/ttsc/blob/master/
|
|
879
|
-
- [`unicorn/no-unnecessary-array-splice-count`](https://github.com/samchon/ttsc/blob/master/
|
|
880
|
-
- [`unicorn/no-unnecessary-await`](https://github.com/samchon/ttsc/blob/master/
|
|
881
|
-
- [`unicorn/no-unnecessary-polyfills`](https://github.com/samchon/ttsc/blob/master/
|
|
882
|
-
- [`unicorn/no-unnecessary-slice-end`](https://github.com/samchon/ttsc/blob/master/
|
|
883
|
-
- [`unicorn/no-unreadable-array-destructuring`](https://github.com/samchon/ttsc/blob/master/
|
|
884
|
-
- [`unicorn/no-unreadable-iife`](https://github.com/samchon/ttsc/blob/master/
|
|
885
|
-
- [`unicorn/no-unused-properties`](https://github.com/samchon/ttsc/blob/master/
|
|
886
|
-
- [`unicorn/no-useless-collection-argument`](https://github.com/samchon/ttsc/blob/master/
|
|
887
|
-
- [`unicorn/no-useless-error-capture-stack-trace`](https://github.com/samchon/ttsc/blob/master/
|
|
888
|
-
- [`unicorn/no-useless-fallback-in-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
889
|
-
- [`unicorn/no-useless-iterator-to-array`](https://github.com/samchon/ttsc/blob/master/
|
|
890
|
-
- [`unicorn/no-useless-length-check`](https://github.com/samchon/ttsc/blob/master/
|
|
891
|
-
- [`unicorn/no-useless-promise-resolve-reject`](https://github.com/samchon/ttsc/blob/master/
|
|
892
|
-
- [`unicorn/no-useless-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
893
|
-
- [`unicorn/no-useless-switch-case`](https://github.com/samchon/ttsc/blob/master/
|
|
894
|
-
- [`unicorn/no-useless-undefined`](https://github.com/samchon/ttsc/blob/master/
|
|
895
|
-
- [`unicorn/no-zero-fractions`](https://github.com/samchon/ttsc/blob/master/
|
|
896
|
-
- [`unicorn/number-literal-case`](https://github.com/samchon/ttsc/blob/master/
|
|
897
|
-
- [`unicorn/numeric-separators-style`](https://github.com/samchon/ttsc/blob/master/
|
|
898
|
-
- [`unicorn/prefer-add-event-listener`](https://github.com/samchon/ttsc/blob/master/
|
|
899
|
-
- [`unicorn/prefer-array-find`](https://github.com/samchon/ttsc/blob/master/
|
|
900
|
-
- [`unicorn/prefer-array-flat`](https://github.com/samchon/ttsc/blob/master/
|
|
901
|
-
- [`unicorn/prefer-array-flat-map`](https://github.com/samchon/ttsc/blob/master/
|
|
902
|
-
- [`unicorn/prefer-array-index-of`](https://github.com/samchon/ttsc/blob/master/
|
|
903
|
-
- [`unicorn/prefer-array-some`](https://github.com/samchon/ttsc/blob/master/
|
|
904
|
-
- [`unicorn/prefer-at`](https://github.com/samchon/ttsc/blob/master/
|
|
905
|
-
- [`unicorn/prefer-bigint-literals`](https://github.com/samchon/ttsc/blob/master/
|
|
906
|
-
- [`unicorn/prefer-blob-reading-methods`](https://github.com/samchon/ttsc/blob/master/
|
|
907
|
-
- [`unicorn/prefer-class-fields`](https://github.com/samchon/ttsc/blob/master/
|
|
908
|
-
- [`unicorn/prefer-classlist-toggle`](https://github.com/samchon/ttsc/blob/master/
|
|
909
|
-
- [`unicorn/prefer-code-point`](https://github.com/samchon/ttsc/blob/master/
|
|
910
|
-
- [`unicorn/prefer-date-now`](https://github.com/samchon/ttsc/blob/master/
|
|
911
|
-
- [`unicorn/prefer-default-parameters`](https://github.com/samchon/ttsc/blob/master/
|
|
912
|
-
- [`unicorn/prefer-dom-node-append`](https://github.com/samchon/ttsc/blob/master/
|
|
913
|
-
- [`unicorn/prefer-dom-node-dataset`](https://github.com/samchon/ttsc/blob/master/
|
|
914
|
-
- [`unicorn/prefer-dom-node-remove`](https://github.com/samchon/ttsc/blob/master/
|
|
915
|
-
- [`unicorn/prefer-dom-node-text-content`](https://github.com/samchon/ttsc/blob/master/
|
|
916
|
-
- [`unicorn/prefer-event-target`](https://github.com/samchon/ttsc/blob/master/
|
|
917
|
-
- [`unicorn/prefer-export-from`](https://github.com/samchon/ttsc/blob/master/
|
|
918
|
-
- [`unicorn/prefer-global-this`](https://github.com/samchon/ttsc/blob/master/
|
|
919
|
-
- [`unicorn/prefer-import-meta-properties`](https://github.com/samchon/ttsc/blob/master/
|
|
920
|
-
- [`unicorn/prefer-includes`](https://github.com/samchon/ttsc/blob/master/
|
|
921
|
-
- [`unicorn/prefer-json-parse-buffer`](https://github.com/samchon/ttsc/blob/master/
|
|
922
|
-
- [`unicorn/prefer-keyboard-event-key`](https://github.com/samchon/ttsc/blob/master/
|
|
923
|
-
- [`unicorn/prefer-logical-operator-over-ternary`](https://github.com/samchon/ttsc/blob/master/
|
|
924
|
-
- [`unicorn/prefer-math-min-max`](https://github.com/samchon/ttsc/blob/master/
|
|
925
|
-
- [`unicorn/prefer-math-trunc`](https://github.com/samchon/ttsc/blob/master/
|
|
926
|
-
- [`unicorn/prefer-modern-dom-apis`](https://github.com/samchon/ttsc/blob/master/
|
|
927
|
-
- [`unicorn/prefer-modern-math-apis`](https://github.com/samchon/ttsc/blob/master/
|
|
928
|
-
- [`unicorn/prefer-module`](https://github.com/samchon/ttsc/blob/master/
|
|
929
|
-
- [`unicorn/prefer-native-coercion-functions`](https://github.com/samchon/ttsc/blob/master/
|
|
930
|
-
- [`unicorn/prefer-negative-index`](https://github.com/samchon/ttsc/blob/master/
|
|
931
|
-
- [`unicorn/prefer-node-protocol`](https://github.com/samchon/ttsc/blob/master/
|
|
932
|
-
- [`unicorn/prefer-number-properties`](https://github.com/samchon/ttsc/blob/master/
|
|
933
|
-
- [`unicorn/prefer-object-from-entries`](https://github.com/samchon/ttsc/blob/master/
|
|
934
|
-
- [`unicorn/prefer-optional-catch-binding`](https://github.com/samchon/ttsc/blob/master/
|
|
935
|
-
- [`unicorn/prefer-prototype-methods`](https://github.com/samchon/ttsc/blob/master/
|
|
936
|
-
- [`unicorn/prefer-query-selector`](https://github.com/samchon/ttsc/blob/master/
|
|
937
|
-
- [`unicorn/prefer-reflect-apply`](https://github.com/samchon/ttsc/blob/master/
|
|
938
|
-
- [`unicorn/prefer-regexp-test`](https://github.com/samchon/ttsc/blob/master/
|
|
939
|
-
- [`unicorn/prefer-response-static-json`](https://github.com/samchon/ttsc/blob/master/
|
|
940
|
-
- [`unicorn/prefer-set-has`](https://github.com/samchon/ttsc/blob/master/
|
|
941
|
-
- [`unicorn/prefer-set-size`](https://github.com/samchon/ttsc/blob/master/
|
|
942
|
-
- [`unicorn/prefer-simple-condition-first`](https://github.com/samchon/ttsc/blob/master/
|
|
943
|
-
- [`unicorn/prefer-single-call`](https://github.com/samchon/ttsc/blob/master/
|
|
944
|
-
- [`unicorn/prefer-spread`](https://github.com/samchon/ttsc/blob/master/
|
|
945
|
-
- [`unicorn/prefer-string-raw`](https://github.com/samchon/ttsc/blob/master/
|
|
946
|
-
- [`unicorn/prefer-string-replace-all`](https://github.com/samchon/ttsc/blob/master/
|
|
947
|
-
- [`unicorn/prefer-string-slice`](https://github.com/samchon/ttsc/blob/master/
|
|
948
|
-
- [`unicorn/prefer-string-starts-ends-with`](https://github.com/samchon/ttsc/blob/master/
|
|
949
|
-
- [`unicorn/prefer-string-trim-start-end`](https://github.com/samchon/ttsc/blob/master/
|
|
950
|
-
- [`unicorn/prefer-structured-clone`](https://github.com/samchon/ttsc/blob/master/
|
|
951
|
-
- [`unicorn/prefer-switch`](https://github.com/samchon/ttsc/blob/master/
|
|
952
|
-
- [`unicorn/prefer-ternary`](https://github.com/samchon/ttsc/blob/master/
|
|
953
|
-
- [`unicorn/prefer-top-level-await`](https://github.com/samchon/ttsc/blob/master/
|
|
954
|
-
- [`unicorn/prefer-type-error`](https://github.com/samchon/ttsc/blob/master/
|
|
955
|
-
- [`unicorn/prevent-abbreviations`](https://github.com/samchon/ttsc/blob/master/
|
|
956
|
-
- [`unicorn/relative-url-style`](https://github.com/samchon/ttsc/blob/master/
|
|
957
|
-
- [`unicorn/require-array-join-separator`](https://github.com/samchon/ttsc/blob/master/
|
|
958
|
-
- [`unicorn/require-module-attributes`](https://github.com/samchon/ttsc/blob/master/
|
|
959
|
-
- [`unicorn/require-module-specifiers`](https://github.com/samchon/ttsc/blob/master/
|
|
960
|
-
- [`unicorn/require-number-to-fixed-digits-argument`](https://github.com/samchon/ttsc/blob/master/
|
|
961
|
-
- [`unicorn/require-post-message-target-origin`](https://github.com/samchon/ttsc/blob/master/
|
|
962
|
-
- [`unicorn/string-content`](https://github.com/samchon/ttsc/blob/master/
|
|
963
|
-
- [`unicorn/switch-case-braces`](https://github.com/samchon/ttsc/blob/master/
|
|
964
|
-
- [`unicorn/switch-case-break-position`](https://github.com/samchon/ttsc/blob/master/
|
|
965
|
-
- [`unicorn/template-indent`](https://github.com/samchon/ttsc/blob/master/
|
|
966
|
-
- [`unicorn/text-encoding-identifier-case`](https://github.com/samchon/ttsc/blob/master/
|
|
967
|
-
- [`unicorn/throw-new-error`](https://github.com/samchon/ttsc/blob/master/
|
|
824
|
+
- [`unicorn/better-regex`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-better-regex.ts): rewrite regex literals into shorter, consistent, and safer form (character-class shorthands, redundant ranges).
|
|
825
|
+
- [`unicorn/catch-error-name`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-catch-error-name.ts): enforce a canonical parameter name (`error`) in `catch` clauses.
|
|
826
|
+
- [`unicorn/consistent-assert`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-assert.ts): enforce consistent assertion style when using `node:assert`.
|
|
827
|
+
- [`unicorn/consistent-date-clone`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-date-clone.ts): prefer passing a `Date` directly to the `Date` constructor when cloning, not `+date` or `date.getTime()`.
|
|
828
|
+
- [`unicorn/consistent-destructuring`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-destructuring.ts): once a property is destructured from an object, require subsequent reads to use the destructured binding.
|
|
829
|
+
- [`unicorn/consistent-empty-array-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-empty-array-spread.ts): require both branches of a ternary spread inside an array literal to be array-typed.
|
|
830
|
+
- [`unicorn/consistent-existence-index-check`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-existence-index-check.ts): compare a `const` bound to `indexOf` / `lastIndexOf` / `findIndex` / `findLastIndex` against the `-1` sentinel (`=== -1` / `!== -1`) rather than against zero (`< 0`, `>= 0`, `> -1`).
|
|
831
|
+
- [`unicorn/consistent-function-scoping`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-function-scoping.ts): hoist function declarations, expressions, and (by default) arrows to the highest scope that does not capture an enclosing binding or lexical environment.
|
|
832
|
+
- [`unicorn/consistent-template-literal-escape`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-consistent-template-literal-escape.ts): enforce the `\${` spelling over `$\{` when escaping `${` in template literals.
|
|
833
|
+
- [`unicorn/custom-error-definition`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-custom-error-definition.ts): require user-defined `Error` subclasses to set `name`, call `super(message)`, and assign their stack correctly.
|
|
834
|
+
- [`unicorn/empty-brace-spaces`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-empty-brace-spaces.ts): reject whitespace inside empty `{}` braces.
|
|
835
|
+
- [`unicorn/error-message`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-error-message.ts): require a non-empty `message` argument when constructing a built-in `Error`.
|
|
836
|
+
- [`unicorn/escape-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-escape-case.ts): require consistent case for escape sequences (`\xA9` over `\xa9`, `\u00B5` over `\u00b5`).
|
|
837
|
+
- [`unicorn/expiring-todo-comments`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-expiring-todo-comments.ts): require every `TODO`/`FIXME`/`XXX` comment to declare an expiration date or package version.
|
|
838
|
+
- [`unicorn/explicit-length-check`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-explicit-length-check.ts): require explicit comparison of `.length` / `.size` instead of relying on truthy coercion.
|
|
839
|
+
- [`unicorn/filename-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-filename-case.ts): enforce a single case style (kebab/camel/snake/pascal) for source filenames and directory names.
|
|
840
|
+
- [`unicorn/import-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-import-style.ts): restrict each module's allowed import styles (named only, default only, namespace only); supports per-module `styles` maps, default-table extension, and per-syntax-family check toggles.
|
|
841
|
+
- [`unicorn/isolated-functions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-isolated-functions.ts): reject references to outer-scope variables inside functions marked as isolated (e.g., the body of a web worker).
|
|
842
|
+
- [`unicorn/new-for-builtins`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-new-for-builtins.ts): require `new` when calling builtin constructors like `Error`, `Map`, `Set`, `Date`, and forbid `new` on primitive wrappers like `String`, `Number`, `Boolean`.
|
|
843
|
+
- [`unicorn/no-abusive-eslint-disable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-abusive-eslint-disable.ts): require every `eslint-disable*` directive to name the rules it disables.
|
|
844
|
+
- [`unicorn/no-accessor-recursion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-accessor-recursion.ts): reject recursive reads on `this.<prop>` inside the getter / setter for `<prop>`.
|
|
845
|
+
- [`unicorn/no-anonymous-default-export`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-anonymous-default-export.ts): require a name on every default-exported function, class, or object.
|
|
846
|
+
- [`unicorn/no-array-callback-reference`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-array-callback-reference.ts): reject passing a function reference directly as the callback to `map`/`filter`/`forEach`/etc., which silently leaks extra index/array arguments.
|
|
847
|
+
- [`unicorn/no-array-for-each`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-array-for-each.ts): prefer `for...of` over `Array.prototype.forEach`.
|
|
848
|
+
- [`unicorn/no-array-method-this-argument`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-array-method-this-argument.ts): reject the second `thisArg` argument to array methods; use an explicit closure instead.
|
|
849
|
+
- [`unicorn/no-array-reduce`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-array-reduce.ts): reject `Array#reduce` / `Array#reduceRight` in favor of explicit loops or other helpers.
|
|
850
|
+
- [`unicorn/no-array-reverse`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-array-reverse.ts): prefer `Array#toReversed` over the mutating `Array#reverse`.
|
|
851
|
+
- [`unicorn/no-array-sort`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-array-sort.ts): prefer `Array#toSorted` over the mutating `Array#sort`.
|
|
852
|
+
- [`unicorn/no-await-expression-member`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-await-expression-member.ts): reject member access on an `await` expression without parens; require `(await x).y`.
|
|
853
|
+
- [`unicorn/no-await-in-promise-methods`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-await-in-promise-methods.ts): reject `await` inside arrays passed to `Promise.all`/`Promise.allSettled`/`Promise.race`/`Promise.any`. The awaits serialize the calls.
|
|
854
|
+
- [`unicorn/no-console-spaces`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-console-spaces.ts): reject leading or trailing spaces in arguments to `console.log` and friends, `console` already inserts spaces between arguments.
|
|
855
|
+
- [`unicorn/no-document-cookie`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-document-cookie.ts): reject direct reads or assignments to `document.cookie`; use the Cookie Store API or a wrapper.
|
|
856
|
+
- [`unicorn/no-empty-file`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-empty-file.ts): reject source files whose only content is whitespace and/or comments.
|
|
857
|
+
- [`unicorn/no-for-loop`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-for-loop.ts): prefer `for...of` over index-based `for` loops over arrays.
|
|
858
|
+
- [`unicorn/no-hex-escape`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-hex-escape.ts): prefer Unicode escape (`\u00A9`) over hexadecimal escape (`\xA9`).
|
|
859
|
+
- [`unicorn/no-immediate-mutation`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-immediate-mutation.ts): reject mutating a value on the same expression that produces it (`[...x].push(y)`); separate the construction and the mutation.
|
|
860
|
+
- [`unicorn/no-instanceof-builtins`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-instanceof-builtins.ts): reject `instanceof Array`, `instanceof Error`, `instanceof Map`, etc.. They fail across realms and for subclasses.
|
|
861
|
+
- [`unicorn/no-invalid-fetch-options`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-invalid-fetch-options.ts): reject GET / HEAD `fetch()` calls that also set a request `body`, which throws at runtime.
|
|
862
|
+
- [`unicorn/no-invalid-remove-event-listener`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-invalid-remove-event-listener.ts): reject `removeEventListener` calls whose handler argument is a fresh function reference and therefore matches no registered listener.
|
|
863
|
+
- [`unicorn/no-keyword-prefix`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-keyword-prefix.ts): reject identifiers that start with a reserved word (`newFoo`, `classBar`).
|
|
864
|
+
- [`unicorn/no-lonely-if`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-lonely-if.ts): reject `if` as the only statement inside an `else` block; use `else if` instead.
|
|
865
|
+
- [`unicorn/no-magic-array-flat-depth`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-magic-array-flat-depth.ts): reject magic-number depth arguments to `Array#flat`; require `Infinity` or a named constant.
|
|
866
|
+
- [`unicorn/no-named-default`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-named-default.ts): reject re-importing or re-exporting a default binding under a name that differs from the upstream binding.
|
|
867
|
+
- [`unicorn/no-negated-condition`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-negated-condition.ts): reject negated conditions in `if`/`else` and ternaries when the positive form is shorter.
|
|
868
|
+
- [`unicorn/no-negation-in-equality-check`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-negation-in-equality-check.ts): reject `!a === b`; require `a !== b` or `!(a === b)`.
|
|
869
|
+
- [`unicorn/no-nested-ternary`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-nested-ternary.ts): reject ternaries nested inside other ternaries.
|
|
870
|
+
- [`unicorn/no-new-array`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-new-array.ts): reject the `new Array(...)` constructor; use array literals or `Array.from` / `Array.of`.
|
|
871
|
+
- [`unicorn/no-new-buffer`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-new-buffer.ts): reject the deprecated `new Buffer()` constructor; use `Buffer.from` or `Buffer.alloc`.
|
|
872
|
+
- [`unicorn/no-null`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-null.ts): reject the `null` literal in favor of `undefined`.
|
|
873
|
+
- [`unicorn/no-object-as-default-parameter`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-object-as-default-parameter.ts): reject inline object literals as default values for function parameters.
|
|
874
|
+
- [`unicorn/no-process-exit`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-process-exit.ts): reject `process.exit()`; throw or return a non-zero status instead.
|
|
875
|
+
- [`unicorn/no-single-promise-in-promise-methods`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-single-promise-in-promise-methods.ts): reject `Promise.all`/`Promise.race`/etc. called with a single-element array; the wrapper is redundant.
|
|
876
|
+
- [`unicorn/no-static-only-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-static-only-class.ts): reject classes whose every member is `static`; use a plain module-level namespace instead.
|
|
877
|
+
- [`unicorn/no-thenable`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-thenable.ts): reject defining a property named `then` on objects, modules, or classes, `await` and Promise resolution accidentally invoke it.
|
|
878
|
+
- [`unicorn/no-this-assignment`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-this-assignment.ts): reject `const self = this` and similar aliases; capture via arrow functions instead.
|
|
879
|
+
- [`unicorn/no-typeof-undefined`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-typeof-undefined.ts): reject `typeof x === "undefined"`; compare against `undefined` directly.
|
|
880
|
+
- [`unicorn/no-unnecessary-array-flat-depth`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unnecessary-array-flat-depth.ts): reject `1` as the explicit depth argument of `Array#flat`; the default is already `1`.
|
|
881
|
+
- [`unicorn/no-unnecessary-array-splice-count`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unnecessary-array-splice-count.ts): reject a repeated receiver length or Infinity count in exactly two-argument splice/toSpliced calls; insertion arguments and other receiver lengths are retained.
|
|
882
|
+
- [`unicorn/no-unnecessary-await`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unnecessary-await.ts): reject `await` on non-thenable expressions.
|
|
883
|
+
- [`unicorn/no-unnecessary-polyfills`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unnecessary-polyfills.ts): reject polyfill imports for APIs already available in the project's targeted Node/browser baseline.
|
|
884
|
+
- [`unicorn/no-unnecessary-slice-end`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unnecessary-slice-end.ts): reject a repeated receiver length or Infinity as the end of a two-argument slice; another receiver's bound is retained.
|
|
885
|
+
- [`unicorn/no-unreadable-array-destructuring`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unreadable-array-destructuring.ts): reject destructuring patterns with long hole runs (`[,,,,a]`); use a named index instead.
|
|
886
|
+
- [`unicorn/no-unreadable-iife`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unreadable-iife.ts): reject IIFEs whose nesting (multiple parens, arrow IIFE arguments) is hard to read.
|
|
887
|
+
- [`unicorn/no-unused-properties`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-unused-properties.ts): reject object properties that are never read after definition.
|
|
888
|
+
- [`unicorn/no-useless-collection-argument`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-collection-argument.ts): reject useless initializer arguments (`new Set()`, `new Map([])`, `new Set(undefined)`) on collection constructors.
|
|
889
|
+
- [`unicorn/no-useless-error-capture-stack-trace`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-error-capture-stack-trace.ts): recommend omitting explicit `this` stack capture when it repeats the surrounding constructor capture. A supplied filter must name that constructor or `new.target`; an external frame filter is retained. The AST matcher does not prove inheritance or builtin identity.
|
|
890
|
+
- [`unicorn/no-useless-fallback-in-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-fallback-in-spread.ts): reject empty fallbacks in object spread; array and call-argument spread retain their iterable fallback.
|
|
891
|
+
- [`unicorn/no-useless-iterator-to-array`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-iterator-to-array.ts): reject `[...iterator]` / `Array.from(iterator)` when the iterator can be consumed directly (e.g., inside `for...of`).
|
|
892
|
+
- [`unicorn/no-useless-length-check`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-length-check.ts): reject `arr.length` checks that the iteration method itself already handles.
|
|
893
|
+
- [`unicorn/no-useless-promise-resolve-reject`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-promise-resolve-reject.ts): reject `return Promise.resolve(x)` / `return Promise.reject(e)` inside `async` functions, `return x` and `throw e` work identically.
|
|
894
|
+
- [`unicorn/no-useless-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-spread.ts): reject spreading a single iterable into a new collection of the same kind (`[...arr]`, `{...obj}`) when the original would suffice.
|
|
895
|
+
- [`unicorn/no-useless-switch-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-switch-case.ts): reject `case` clauses with an empty body that immediately precede a `default` whose body executes for them.
|
|
896
|
+
- [`unicorn/no-useless-undefined`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-useless-undefined.ts): reject explicit `undefined` returns, default initializers, and arguments where the omission has the same meaning.
|
|
897
|
+
- [`unicorn/no-zero-fractions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-no-zero-fractions.ts): reject `1.0` / `1.` / `.5e0` in favor of `1`, `1`, and `0.5`.
|
|
898
|
+
- [`unicorn/number-literal-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-number-literal-case.ts): enforce one consistent case for a numeric literal's radix prefix, hex digits, and exponent (`0xFF` over `0xff`, `1e10` over `1E10`).
|
|
899
|
+
- [`unicorn/numeric-separators-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-numeric-separators-style.ts): enforce `_` separator grouping (every 3 digits for decimal, every 4 for hex) in numeric literals.
|
|
900
|
+
- [`unicorn/prefer-add-event-listener`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-add-event-listener.ts): prefer `addEventListener` / `removeEventListener` over assigning to `on*` properties.
|
|
901
|
+
- [`unicorn/prefer-array-find`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-array-find.ts): prefer `Array#find` / `Array#findLast` over `filter(...)[0]` / `filter(...).at(-1)`.
|
|
902
|
+
- [`unicorn/prefer-array-flat`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-array-flat.ts): prefer `Array#flat` over legacy flattening idioms (`[].concat(...arrs)`, `reduce` with `concat`).
|
|
903
|
+
- [`unicorn/prefer-array-flat-map`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-array-flat-map.ts): prefer `Array#flatMap` over `map(...).flat()`.
|
|
904
|
+
- [`unicorn/prefer-array-index-of`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-array-index-of.ts): prefer `indexOf` / `lastIndexOf` over `findIndex` / `findLastIndex` when matching by `===`.
|
|
905
|
+
- [`unicorn/prefer-array-some`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-array-some.ts): prefer `Array#some` over `filter(...).length > 0` and nonzero-length existence comparisons.
|
|
906
|
+
- [`unicorn/prefer-at`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-at.ts): prefer `Array#at` / `String#at` over index arithmetic and `charAt`.
|
|
907
|
+
- [`unicorn/prefer-bigint-literals`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-bigint-literals.ts): prefer integer bigint literals for safe integer Number operands or exact decimal integer strings; literal spelling requires author normalization.
|
|
908
|
+
- [`unicorn/prefer-blob-reading-methods`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-blob-reading-methods.ts): prefer `Blob#arrayBuffer()` / `Blob#text()` over `FileReader#readAsArrayBuffer` / `readAsText`.
|
|
909
|
+
- [`unicorn/prefer-class-fields`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-class-fields.ts): prefer class field declarations over constructor assignments to `this.field = value`.
|
|
910
|
+
- [`unicorn/prefer-classlist-toggle`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-classlist-toggle.ts): prefer `Element#classList.toggle(name, condition)` over manual `add`/`remove` branches.
|
|
911
|
+
- [`unicorn/prefer-code-point`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-code-point.ts): prefer `String#codePointAt` / `String.fromCodePoint` over `charCodeAt` / `fromCharCode`.
|
|
912
|
+
- [`unicorn/prefer-date-now`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-date-now.ts): prefer Date.now() for zero-argument Date timestamp idioms; explicit constructor arguments are retained.
|
|
913
|
+
- [`unicorn/prefer-default-parameters`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-default-parameters.ts): suggest parameter defaults for first-statement nullish assignments; authors check the different null policy.
|
|
914
|
+
- [`unicorn/prefer-dom-node-append`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-dom-node-append.ts): prefer `Node#append` over `Node#appendChild`.
|
|
915
|
+
- [`unicorn/prefer-dom-node-dataset`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-dom-node-dataset.ts): prefer `Element#dataset` over `getAttribute` / `setAttribute` for `data-*` attributes.
|
|
916
|
+
- [`unicorn/prefer-dom-node-remove`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-dom-node-remove.ts): prefer `ChildNode#remove` over `parent.removeChild(child)`.
|
|
917
|
+
- [`unicorn/prefer-dom-node-text-content`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-dom-node-text-content.ts): prefer `Node#textContent` over `HTMLElement#innerText`.
|
|
918
|
+
- [`unicorn/prefer-event-target`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-event-target.ts): prefer `EventTarget` over Node's `EventEmitter` when the code is shared between Node and the browser.
|
|
919
|
+
- [`unicorn/prefer-export-from`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-export-from.ts): prefer `export ... from` over importing-then-re-exporting in two statements.
|
|
920
|
+
- [`unicorn/prefer-global-this`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-global-this.ts): prefer `globalThis` over `window`, `self`, and `global`.
|
|
921
|
+
- [`unicorn/prefer-import-meta-properties`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-import-meta-properties.ts): prefer `import.meta.dirname` / `import.meta.filename` over `fileURLToPath` workarounds.
|
|
922
|
+
- [`unicorn/prefer-includes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-includes.ts): prefer `String#includes` / `Array#includes` over `indexOf(...) !== -1` and `some(x => x === target)`.
|
|
923
|
+
- [`unicorn/prefer-json-parse-buffer`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-json-parse-buffer.ts): prefer passing a `Buffer` directly to `JSON.parse` (Node 21+) instead of decoding to a string first.
|
|
924
|
+
- [`unicorn/prefer-keyboard-event-key`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-keyboard-event-key.ts): prefer `KeyboardEvent#key` over the deprecated `KeyboardEvent#keyCode` / `charCode` / `which`.
|
|
925
|
+
- [`unicorn/prefer-logical-operator-over-ternary`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-logical-operator-over-ternary.ts): suggest logical operators for `a ? a : b`; authors check evaluation count and fallback policy.
|
|
926
|
+
- [`unicorn/prefer-math-min-max`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-math-min-max.ts): prefer `Math.min` / `Math.max` over ternaries computing the same value.
|
|
927
|
+
- [`unicorn/prefer-math-trunc`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-math-trunc.ts): prefer `Math.trunc` over `~~x` / `x | 0` for integer truncation.
|
|
928
|
+
- [`unicorn/prefer-modern-dom-apis`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-modern-dom-apis.ts): prefer `before` / `after` / `replaceWith` over `insertBefore` / `replaceChild` / `insertAdjacentText`.
|
|
929
|
+
- [`unicorn/prefer-modern-math-apis`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-modern-math-apis.ts): prefer `Math.log10` / `Math.hypot` / `Math.log2` / `Math.cbrt` over their legacy approximations.
|
|
930
|
+
- [`unicorn/prefer-module`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-module.ts): prefer ES modules (`import` / `export`) over CommonJS (`require` / `module.exports` / `__dirname` / `__filename`).
|
|
931
|
+
- [`unicorn/prefer-native-coercion-functions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-native-coercion-functions.ts): prefer the bare `String` / `Number` / `Boolean` / `BigInt` functions over `x => String(x)` arrow wrappers.
|
|
932
|
+
- [`unicorn/prefer-negative-index`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-negative-index.ts): prefer a tail-relative first index argument derived from the same receiver; lastIndexOf search values are excluded and offsets exceeding length require author review.
|
|
933
|
+
- [`unicorn/prefer-node-protocol`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-node-protocol.ts): prefer `node:fs` / `node:path` / etc. over the bare Node builtin specifier.
|
|
934
|
+
- [`unicorn/prefer-number-properties`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-number-properties.ts): prefer `Number.isNaN` / `Number.parseInt` / `Number.NaN` over their global counterparts.
|
|
935
|
+
- [`unicorn/prefer-object-from-entries`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-object-from-entries.ts): suggest reviewing empty-object-seed reduce calls for actual key/value entry construction.
|
|
936
|
+
- [`unicorn/prefer-optional-catch-binding`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-optional-catch-binding.ts): prefer `catch { ... }` over `catch (e) { ... }` when `e` is unused.
|
|
937
|
+
- [`unicorn/prefer-prototype-methods`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-prototype-methods.ts): prefer borrowing prototype methods (`Array.prototype.slice.call`) over `[].slice.call` empty-instance lookups.
|
|
938
|
+
- [`unicorn/prefer-query-selector`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-query-selector.ts): prefer `Document#querySelector` over `getElementById`, `getElementsByClassName`, and `getElementsByTagName`.
|
|
939
|
+
- [`unicorn/prefer-reflect-apply`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-reflect-apply.ts): prefer `Reflect.apply(fn, thisArg, args)` over `Function.prototype.apply.call(fn, thisArg, args)`.
|
|
940
|
+
- [`unicorn/prefer-regexp-test`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-regexp-test.ts): prefer `RegExp#test` over `String#match` / `RegExp#exec` when only a boolean is needed.
|
|
941
|
+
- [`unicorn/prefer-response-static-json`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-response-static-json.ts): prefer `Response.json(value)` over `new Response(JSON.stringify(value), { headers: { "content-type": "application/json" } })`.
|
|
942
|
+
- [`unicorn/prefer-set-has`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-set-has.ts): prefer `Set#has` over `Array#includes` for repeated membership lookups against a constant collection.
|
|
943
|
+
- [`unicorn/prefer-set-size`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-set-size.ts): prefer `Set#size` over `[...set].length` and `Array.from(set).length`.
|
|
944
|
+
- [`unicorn/prefer-simple-condition-first`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-simple-condition-first.ts): place identifier and strict-comparison gates before complex conditions in boolean `&&`/`||` chains.
|
|
945
|
+
- [`unicorn/prefer-single-call`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-single-call.ts): prefer a single variadic `push` / `unshift` over consecutive calls; EventTarget listener methods are excluded.
|
|
946
|
+
- [`unicorn/prefer-spread`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-spread.ts): suggest spread for single-argument `Array.from` calls when the input is iterable.
|
|
947
|
+
- [`unicorn/prefer-string-raw`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-string-raw.ts): prefer `String.raw` for path literals and other strings that would otherwise need backslash escapes.
|
|
948
|
+
- [`unicorn/prefer-string-replace-all`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-string-replace-all.ts): prefer `String#replaceAll(literal, replacement)` over `replace(/literal/g, replacement)` for fixed patterns without case-insensitive or sticky flags.
|
|
949
|
+
- [`unicorn/prefer-string-slice`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-string-slice.ts): prefer `String#slice` over the deprecated `substr` / `substring`.
|
|
950
|
+
- [`unicorn/prefer-string-starts-ends-with`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-string-starts-ends-with.ts): prefer `String#startsWith` / `String#endsWith` over slice-then-compare when the fixed bound equals the literal's JavaScript UTF-16 length, including surrogate pairs and lone surrogates.
|
|
951
|
+
- [`unicorn/prefer-string-trim-start-end`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-string-trim-start-end.ts): prefer `String#trimStart` / `String#trimEnd` over the deprecated `trimLeft` / `trimRight`.
|
|
952
|
+
- [`unicorn/prefer-structured-clone`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-structured-clone.ts): prefer `structuredClone(x)` over `JSON.parse(JSON.stringify(x))` for deep cloning.
|
|
953
|
+
- [`unicorn/prefer-switch`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-switch.ts): prefer `switch` over chains of three or more `else if` clauses comparing the same discriminant.
|
|
954
|
+
- [`unicorn/prefer-ternary`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-ternary.ts): prefer a ternary over `if` / `else` whose two branches differ only in the right-hand side of a common assignment, `return`, or `throw`.
|
|
955
|
+
- [`unicorn/prefer-top-level-await`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-top-level-await.ts): prefer top-level `await` over `.then` / IIFE wrappers in ES modules.
|
|
956
|
+
- [`unicorn/prefer-type-error`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prefer-type-error.ts): require throwing `TypeError` (not a bare `Error`) when the surrounding `if` is a runtime type check.
|
|
957
|
+
- [`unicorn/prevent-abbreviations`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-prevent-abbreviations.ts): apply the canonical word-replacement table to bindings, compound names, opt-in property checks, and filenames. This compatibility ID retains the final upstream behavior from before the rule was renamed to `name-replacements`.
|
|
958
|
+
- [`unicorn/relative-url-style`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-relative-url-style.ts): remove a leading `./` only when it retains the relative path meaning. Scheme-like and network-path references are retained; empty, query and fragment references require a literal directory base.
|
|
959
|
+
- [`unicorn/require-array-join-separator`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-require-array-join-separator.ts): require an explicit separator argument to `Array#join` instead of relying on the default `","`.
|
|
960
|
+
- [`unicorn/require-module-attributes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-require-module-attributes.ts): require non-empty `with` / `assert` options on `import` / `export` statements that use them at all.
|
|
961
|
+
- [`unicorn/require-module-specifiers`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-require-module-specifiers.ts): require a non-empty specifier list on every `import` / `export` statement.
|
|
962
|
+
- [`unicorn/require-number-to-fixed-digits-argument`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-require-number-to-fixed-digits-argument.ts): require an explicit digits argument to `Number#toFixed`.
|
|
963
|
+
- [`unicorn/require-post-message-target-origin`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-require-post-message-target-origin.ts): require an explicit `targetOrigin` argument to `window.postMessage`.
|
|
964
|
+
- [`unicorn/string-content`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-string-content.ts): rewrite configured `patterns` inside string literals and template quasis (e.g., curly quotes for straight ones); no default patterns, per-pattern `suggest` / `fix` / `caseSensitive` / `message`, and AST-selector targeting.
|
|
965
|
+
- [`unicorn/switch-case-braces`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-switch-case-braces.ts): enforce a consistent presence/absence of `{}` braces around `case` clauses inside `switch`.
|
|
966
|
+
- [`unicorn/switch-case-break-position`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-switch-case-break-position.ts): require a terminating `break`, `continue`, `return`, or `throw` to sit inside a `case` clause's sole block instead of immediately after it.
|
|
967
|
+
- [`unicorn/template-indent`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-template-indent.ts): normalize selected multiline template bodies while preserving substitutions and raw escapes; supports tag, function, block-comment, AST-selector, and explicit indentation options.
|
|
968
|
+
- [`unicorn/text-encoding-identifier-case`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-text-encoding-identifier-case.ts): enforce a canonical case for text-encoding identifiers — the dash-less `"utf8"` by default (`"UTF-8"` / `"utf-8"` report toward `"utf8"`); the dashed `"utf-8"` is enforced only in `new TextDecoder(...)` / JSX `<meta charset>` / `<form accept-charset>` or under `withDash`, and only `fs.readFile` encodings are autofixed.
|
|
969
|
+
- [`unicorn/throw-new-error`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/unicorn-throw-new-error.ts): require `throw new Error(...)` over `throw Error(...)`.
|
|
968
970
|
|
|
969
971
|
### Regular expressions
|
|
970
972
|
|
|
@@ -972,28 +974,28 @@ Regex-shape rules. Check the structure of regex literals, emptiness, uselessness
|
|
|
972
974
|
|
|
973
975
|
Source: [`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp).
|
|
974
976
|
|
|
975
|
-
- [`regexp/no-control-character`](https://github.com/samchon/ttsc/blob/master/
|
|
976
|
-
- [`regexp/no-dupe-characters-character-class`](https://github.com/samchon/ttsc/blob/master/
|
|
977
|
-
- [`regexp/no-empty-alternative`](https://github.com/samchon/ttsc/blob/master/
|
|
978
|
-
- [`regexp/no-empty-capturing-group`](https://github.com/samchon/ttsc/blob/master/
|
|
979
|
-
- [`regexp/no-empty-character-class`](https://github.com/samchon/ttsc/blob/master/
|
|
980
|
-
- [`regexp/no-empty-group`](https://github.com/samchon/ttsc/blob/master/
|
|
981
|
-
- [`regexp/no-empty-lookarounds-assertion`](https://github.com/samchon/ttsc/blob/master/
|
|
982
|
-
- [`regexp/no-misleading-unicode-character`](https://github.com/samchon/ttsc/blob/master/
|
|
983
|
-
- [`regexp/no-useless-character-class`](https://github.com/samchon/ttsc/blob/master/
|
|
984
|
-
- [`regexp/no-useless-escape`](https://github.com/samchon/ttsc/blob/master/
|
|
985
|
-
- [`regexp/no-useless-flag`](https://github.com/samchon/ttsc/blob/master/
|
|
986
|
-
- [`regexp/no-useless-quantifier`](https://github.com/samchon/ttsc/blob/master/
|
|
987
|
-
- [`regexp/no-useless-two-nums-quantifier`](https://github.com/samchon/ttsc/blob/master/
|
|
988
|
-
- [`regexp/no-zero-quantifier`](https://github.com/samchon/ttsc/blob/master/
|
|
989
|
-
- [`regexp/prefer-d`](https://github.com/samchon/ttsc/blob/master/
|
|
990
|
-
- [`regexp/prefer-plus-quantifier`](https://github.com/samchon/ttsc/blob/master/
|
|
991
|
-
- [`regexp/prefer-question-quantifier`](https://github.com/samchon/ttsc/blob/master/
|
|
992
|
-
- [`regexp/prefer-star-quantifier`](https://github.com/samchon/ttsc/blob/master/
|
|
993
|
-
- [`regexp/prefer-w`](https://github.com/samchon/ttsc/blob/master/
|
|
994
|
-
- [`regexp/require-unicode-regexp`](https://github.com/samchon/ttsc/blob/master/
|
|
995
|
-
- [`regexp/require-unicode-sets-regexp`](https://github.com/samchon/ttsc/blob/master/
|
|
996
|
-
- [`regexp/sort-flags`](https://github.com/samchon/ttsc/blob/master/
|
|
977
|
+
- [`regexp/no-control-character`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-control-character.ts): reject control characters (`\x00`–`\x1F`) embedded in regex literals.
|
|
978
|
+
- [`regexp/no-dupe-characters-character-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-dupe-characters-character-class.ts): reject duplicate decoded literal characters in simple classes; u/v use Unicode code points and legacy mode uses UTF-16 code units, while ranges and set notation remain conservative.
|
|
979
|
+
- [`regexp/no-empty-alternative`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-empty-alternative.ts): reject empty alternatives in a disjunction (`/a||b/`).
|
|
980
|
+
- [`regexp/no-empty-capturing-group`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-empty-capturing-group.ts): reject empty capturing groups such as `/()/`.
|
|
981
|
+
- [`regexp/no-empty-character-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-empty-character-class.ts): reject empty regex character classes (`[]`).
|
|
982
|
+
- [`regexp/no-empty-group`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-empty-group.ts): reject empty non-capturing groups such as `/(?:)/`.
|
|
983
|
+
- [`regexp/no-empty-lookarounds-assertion`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-empty-lookarounds-assertion.ts): reject empty lookaround assertions such as `/(?=)/` or `/(?!)/`.
|
|
984
|
+
- [`regexp/no-misleading-unicode-character`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-misleading-unicode-character.ts): reject misleading Unicode characters in regex classes.
|
|
985
|
+
- [`regexp/no-useless-character-class`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-useless-character-class.ts): reject single-character character classes such as `/[x]/`.
|
|
986
|
+
- [`regexp/no-useless-escape`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-useless-escape.ts): reject unnecessary escapes inside regex literals.
|
|
987
|
+
- [`regexp/no-useless-flag`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-useless-flag.ts): reject regex flags that the literal does not exercise.
|
|
988
|
+
- [`regexp/no-useless-quantifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-useless-quantifier.ts): reject quantifiers that do not change the match.
|
|
989
|
+
- [`regexp/no-useless-two-nums-quantifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-useless-two-nums-quantifier.ts): reject equal min/max quantifiers (`/a{2,2}/`) in favor of `/a{2}/`.
|
|
990
|
+
- [`regexp/no-zero-quantifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-no-zero-quantifier.ts): reject zero-repeat quantifiers (`/a{0}/`, `/a{0,0}/`).
|
|
991
|
+
- [`regexp/prefer-d`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-prefer-d.ts): prefer `\d` over `[0-9]` in regex literals.
|
|
992
|
+
- [`regexp/prefer-plus-quantifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-prefer-plus-quantifier.ts): prefer `+` over `{1,}` in regex literals.
|
|
993
|
+
- [`regexp/prefer-question-quantifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-prefer-question-quantifier.ts): prefer `?` over `{0,1}` in regex literals.
|
|
994
|
+
- [`regexp/prefer-star-quantifier`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-prefer-star-quantifier.ts): prefer `*` over `{0,}` in regex literals.
|
|
995
|
+
- [`regexp/prefer-w`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-prefer-w.ts): prefer `\w` over `[A-Za-z0-9_]` in regex literals.
|
|
996
|
+
- [`regexp/require-unicode-regexp`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-require-unicode-regexp.ts): require regex literals to use the `u` or `v` flag.
|
|
997
|
+
- [`regexp/require-unicode-sets-regexp`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-require-unicode-sets-regexp.ts): require regex literals to use the `v` flag specifically.
|
|
998
|
+
- [`regexp/sort-flags`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/regexp-sort-flags.ts): require regex flags to appear in canonical alphabetical order (`dgimsuvy`).
|
|
997
999
|
|
|
998
1000
|
### Security
|
|
999
1001
|
|
|
@@ -1001,20 +1003,20 @@ Security-focused TypeScript source rules. Report likely security smells, non-lit
|
|
|
1001
1003
|
|
|
1002
1004
|
Source: [`eslint-plugin-security@4.0.0`](https://github.com/eslint-community/eslint-plugin-security).
|
|
1003
1005
|
|
|
1004
|
-
- [`security/detect-bidi-characters`](https://github.com/samchon/ttsc/blob/master/
|
|
1005
|
-
- [`security/detect-buffer-noassert`](https://github.com/samchon/ttsc/blob/master/
|
|
1006
|
-
- [`security/detect-child-process`](https://github.com/samchon/ttsc/blob/master/
|
|
1007
|
-
- [`security/detect-disable-mustache-escape`](https://github.com/samchon/ttsc/blob/master/
|
|
1008
|
-
- [`security/detect-eval-with-expression`](https://github.com/samchon/ttsc/blob/master/
|
|
1009
|
-
- [`security/detect-new-buffer`](https://github.com/samchon/ttsc/blob/master/
|
|
1010
|
-
- [`security/detect-no-csrf-before-method-override`](https://github.com/samchon/ttsc/blob/master/
|
|
1011
|
-
- [`security/detect-non-literal-fs-filename`](https://github.com/samchon/ttsc/blob/master/
|
|
1012
|
-
- [`security/detect-non-literal-regexp`](https://github.com/samchon/ttsc/blob/master/
|
|
1013
|
-
- [`security/detect-non-literal-require`](https://github.com/samchon/ttsc/blob/master/
|
|
1014
|
-
- [`security/detect-object-injection`](https://github.com/samchon/ttsc/blob/master/
|
|
1015
|
-
- [`security/detect-possible-timing-attacks`](https://github.com/samchon/ttsc/blob/master/
|
|
1016
|
-
- [`security/detect-pseudoRandomBytes`](https://github.com/samchon/ttsc/blob/master/
|
|
1017
|
-
- [`security/detect-unsafe-regex`](https://github.com/samchon/ttsc/blob/master/
|
|
1006
|
+
- [`security/detect-bidi-characters`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-bidi-characters.ts): detect Trojan Source bidi control characters.
|
|
1007
|
+
- [`security/detect-buffer-noassert`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-buffer-noassert.ts): detect Buffer reads/writes with `noAssert` set to true.
|
|
1008
|
+
- [`security/detect-child-process`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-child-process.ts): detect child_process imports and non-literal `exec` commands.
|
|
1009
|
+
- [`security/detect-disable-mustache-escape`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-disable-mustache-escape.ts): detect `escapeMarkup = false` on objects.
|
|
1010
|
+
- [`security/detect-eval-with-expression`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-eval-with-expression.ts): detect `eval` fed by non-literal expressions.
|
|
1011
|
+
- [`security/detect-new-buffer`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-new-buffer.ts): detect `new Buffer` with non-literal input.
|
|
1012
|
+
- [`security/detect-no-csrf-before-method-override`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-no-csrf-before-method-override.ts): detect Express csrf middleware before methodOverride.
|
|
1013
|
+
- [`security/detect-non-literal-fs-filename`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-non-literal-fs-filename.ts): detect filesystem calls with non-literal filename arguments.
|
|
1014
|
+
- [`security/detect-non-literal-regexp`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-non-literal-regexp.ts): detect RegExp construction from non-literal patterns.
|
|
1015
|
+
- [`security/detect-non-literal-require`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-non-literal-require.ts): detect `require` calls with non-literal module specifiers.
|
|
1016
|
+
- [`security/detect-object-injection`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-object-injection.ts): detect dynamic bracket access sinks.
|
|
1017
|
+
- [`security/detect-possible-timing-attacks`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-possible-timing-attacks.ts): detect direct equality comparisons involving secret-like identifiers.
|
|
1018
|
+
- [`security/detect-pseudoRandomBytes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-pseudoRandomBytes.ts): detect `crypto.pseudoRandomBytes`.
|
|
1019
|
+
- [`security/detect-unsafe-regex`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/security-detect-unsafe-regex.ts): detect high-confidence catastrophic backtracking regex shapes.
|
|
1018
1020
|
|
|
1019
1021
|
### JSDoc
|
|
1020
1022
|
|
|
@@ -1022,19 +1024,19 @@ Documentation-comment validation rules. Bundles `eslint-plugin-jsdoc` content ch
|
|
|
1022
1024
|
|
|
1023
1025
|
Source: [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc), [`eslint-plugin-tsdoc`](https://github.com/microsoft/tsdoc).
|
|
1024
1026
|
|
|
1025
|
-
- [`jsdoc/check-tag-names`](https://github.com/samchon/ttsc/blob/master/
|
|
1026
|
-
- [`jsdoc/check-values`](https://github.com/samchon/ttsc/blob/master/
|
|
1027
|
-
- [`jsdoc/empty-tags`](https://github.com/samchon/ttsc/blob/master/
|
|
1028
|
-
- [`jsdoc/no-types`](https://github.com/samchon/ttsc/blob/master/
|
|
1029
|
-
- [`jsdoc/reject-any-type`](https://github.com/samchon/ttsc/blob/master/
|
|
1030
|
-
- [`jsdoc/reject-function-type`](https://github.com/samchon/ttsc/blob/master/
|
|
1031
|
-
- [`jsdoc/require-description`](https://github.com/samchon/ttsc/blob/master/
|
|
1032
|
-
- [`jsdoc/require-param-description`](https://github.com/samchon/ttsc/blob/master/
|
|
1033
|
-
- [`jsdoc/require-param-name`](https://github.com/samchon/ttsc/blob/master/
|
|
1034
|
-
- [`jsdoc/require-property-description`](https://github.com/samchon/ttsc/blob/master/
|
|
1035
|
-
- [`jsdoc/require-property-name`](https://github.com/samchon/ttsc/blob/master/
|
|
1036
|
-
- [`jsdoc/require-returns-description`](https://github.com/samchon/ttsc/blob/master/
|
|
1037
|
-
- [`jsdoc/tsdoc-syntax`](https://github.com/samchon/ttsc/blob/master/
|
|
1027
|
+
- [`jsdoc/check-tag-names`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-check-tag-names.ts): reject unknown JSDoc block tag names.
|
|
1028
|
+
- [`jsdoc/check-values`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-check-values.ts): validate closed-set JSDoc tag values such as `@access`.
|
|
1029
|
+
- [`jsdoc/empty-tags`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-empty-tags.ts): reject content on marker-only JSDoc tags such as `@async`.
|
|
1030
|
+
- [`jsdoc/no-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-no-types.ts): reject redundant JSDoc type braces in TypeScript source comments.
|
|
1031
|
+
- [`jsdoc/reject-any-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-reject-any-type.ts): reject `any` and `*` inside JSDoc type braces.
|
|
1032
|
+
- [`jsdoc/reject-function-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-reject-function-type.ts): reject the unsafe `Function` type inside JSDoc type braces.
|
|
1033
|
+
- [`jsdoc/require-description`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-require-description.ts): require JSDoc blocks to include block-level description text.
|
|
1034
|
+
- [`jsdoc/require-param-description`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-require-param-description.ts): require every `@param` tag with a name to include a description.
|
|
1035
|
+
- [`jsdoc/require-param-name`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-require-param-name.ts): require every `@param` tag to include a parameter name.
|
|
1036
|
+
- [`jsdoc/require-property-description`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-require-property-description.ts): require every `@property` tag with a name to include a description.
|
|
1037
|
+
- [`jsdoc/require-property-name`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-require-property-name.ts): require every `@property` tag to include a property name.
|
|
1038
|
+
- [`jsdoc/require-returns-description`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-require-returns-description.ts): require every `@returns` tag to include a description.
|
|
1039
|
+
- [`jsdoc/tsdoc-syntax`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/jsdoc-tsdoc-syntax.ts): validate malformed TSDoc block tags and inline tags in `/** ... */` comments.
|
|
1038
1040
|
|
|
1039
1041
|
### Functional
|
|
1040
1042
|
|
|
@@ -1063,26 +1065,26 @@ export default {
|
|
|
1063
1065
|
} satisfies ITtscLintConfig;
|
|
1064
1066
|
```
|
|
1065
1067
|
|
|
1066
|
-
- [`functional/functional-parameters`](https://github.com/samchon/ttsc/blob/master/
|
|
1067
|
-
- [`functional/immutable-data`](https://github.com/samchon/ttsc/blob/master/
|
|
1068
|
-
- [`functional/no-class-inheritance`](https://github.com/samchon/ttsc/blob/master/
|
|
1069
|
-
- [`functional/no-classes`](https://github.com/samchon/ttsc/blob/master/
|
|
1070
|
-
- [`functional/no-conditional-statements`](https://github.com/samchon/ttsc/blob/master/
|
|
1071
|
-
- [`functional/no-expression-statements`](https://github.com/samchon/ttsc/blob/master/
|
|
1072
|
-
- [`functional/no-let`](https://github.com/samchon/ttsc/blob/master/
|
|
1073
|
-
- [`functional/no-loop-statements`](https://github.com/samchon/ttsc/blob/master/
|
|
1074
|
-
- [`functional/no-mixed-types`](https://github.com/samchon/ttsc/blob/master/
|
|
1075
|
-
- [`functional/no-promise-reject`](https://github.com/samchon/ttsc/blob/master/
|
|
1076
|
-
- [`functional/no-return-void`](https://github.com/samchon/ttsc/blob/master/
|
|
1077
|
-
- [`functional/no-this-expressions`](https://github.com/samchon/ttsc/blob/master/
|
|
1078
|
-
- [`functional/no-throw-statements`](https://github.com/samchon/ttsc/blob/master/
|
|
1079
|
-
- [`functional/no-try-statements`](https://github.com/samchon/ttsc/blob/master/
|
|
1080
|
-
- [`functional/prefer-immutable-types`](https://github.com/samchon/ttsc/blob/master/
|
|
1081
|
-
- [`functional/prefer-property-signatures`](https://github.com/samchon/ttsc/blob/master/
|
|
1082
|
-
- [`functional/prefer-readonly-type`](https://github.com/samchon/ttsc/blob/master/
|
|
1083
|
-
- [`functional/prefer-tacit`](https://github.com/samchon/ttsc/blob/master/
|
|
1084
|
-
- [`functional/readonly-type`](https://github.com/samchon/ttsc/blob/master/
|
|
1085
|
-
- [`functional/type-declaration-immutability`](https://github.com/samchon/ttsc/blob/master/
|
|
1068
|
+
- [`functional/functional-parameters`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-functional-parameters.ts): rejects rest parameters, `arguments`, and optionally zero-parameter functions.
|
|
1069
|
+
- [`functional/immutable-data`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-immutable-data.ts): rejects writes through object/array members and mutable collection methods.
|
|
1070
|
+
- [`functional/no-class-inheritance`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-class-inheritance.ts): rejects class inheritance and abstract classes.
|
|
1071
|
+
- [`functional/no-classes`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-classes.ts): rejects class declarations and expressions.
|
|
1072
|
+
- [`functional/no-conditional-statements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-conditional-statements.ts): rejects `if` and `switch` statements.
|
|
1073
|
+
- [`functional/no-expression-statements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-expression-statements.ts): rejects expression statements used for side effects.
|
|
1074
|
+
- [`functional/no-let`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-let.ts): rejects `let` declarations.
|
|
1075
|
+
- [`functional/no-loop-statements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-loop-statements.ts): rejects imperative loop statements.
|
|
1076
|
+
- [`functional/no-mixed-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-mixed-types.ts): rejects type/interface declarations that mix member shapes.
|
|
1077
|
+
- [`functional/no-promise-reject`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-promise-reject.ts): rejects `Promise.reject(...)`.
|
|
1078
|
+
- [`functional/no-return-void`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-return-void.ts): rejects void returns and void-returning declarations.
|
|
1079
|
+
- [`functional/no-this-expressions`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-this-expressions.ts): rejects `this` expressions.
|
|
1080
|
+
- [`functional/no-throw-statements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-throw-statements.ts): rejects `throw` statements.
|
|
1081
|
+
- [`functional/no-try-statements`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-no-try-statements.ts): rejects `try`/`catch`/`finally` statements.
|
|
1082
|
+
- [`functional/prefer-immutable-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-prefer-immutable-types.ts): prefers readonly/immutable type annotations.
|
|
1083
|
+
- [`functional/prefer-property-signatures`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-prefer-property-signatures.ts): prefers function-property signatures over method signatures.
|
|
1084
|
+
- [`functional/prefer-readonly-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-prefer-readonly-type.ts): requires readonly array, tuple, and property type syntax.
|
|
1085
|
+
- [`functional/prefer-tacit`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-prefer-tacit.ts): reports simple one-argument forwarding wrappers.
|
|
1086
|
+
- [`functional/readonly-type`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-readonly-type.ts): enforces the configured readonly type spelling.
|
|
1087
|
+
- [`functional/type-declaration-immutability`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/functional-type-declaration-immutability.ts): requires matching type declarations to expose readonly member shapes.
|
|
1086
1088
|
|
|
1087
1089
|
### Architecture boundaries
|
|
1088
1090
|
|
|
@@ -1120,12 +1122,12 @@ export default {
|
|
|
1120
1122
|
} satisfies ITtscLintConfig;
|
|
1121
1123
|
```
|
|
1122
1124
|
|
|
1123
|
-
- [`boundaries/dependencies`](https://github.com/samchon/ttsc/blob/master/
|
|
1124
|
-
- [`boundaries/element-types`](https://github.com/samchon/ttsc/blob/master/
|
|
1125
|
-
- [`boundaries/entry-point`](https://github.com/samchon/ttsc/blob/master/
|
|
1126
|
-
- [`boundaries/external`](https://github.com/samchon/ttsc/blob/master/
|
|
1127
|
-
- [`boundaries/no-private`](https://github.com/samchon/ttsc/blob/master/
|
|
1128
|
-
- [`boundaries/no-unknown`](https://github.com/samchon/ttsc/blob/master/
|
|
1125
|
+
- [`boundaries/dependencies`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/boundaries-dependencies.ts): unified dependency-direction rule from upstream `eslint-plugin-boundaries`, intended to replace `element-types` / `entry-point` / `external` / `no-private` / `no-unknown` with a single policy block.
|
|
1126
|
+
- [`boundaries/element-types`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/boundaries-element-types.ts): enforces allowed dependency directions between configured source-path element types.
|
|
1127
|
+
- [`boundaries/entry-point`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/boundaries-entry-point.ts): requires imports into an element to target its configured public entry files.
|
|
1128
|
+
- [`boundaries/external`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/boundaries-external.ts): restricts external package imports by package/specifier pattern.
|
|
1129
|
+
- [`boundaries/no-private`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/boundaries-no-private.ts): rejects imports of configured private files from outside their element.
|
|
1130
|
+
- [`boundaries/no-unknown`](https://github.com/samchon/ttsc/blob/master/packages/lint/test/testdata/corpus/boundaries-no-unknown.ts): rejects relative imports whose resolved source file matches no configured element.
|
|
1129
1131
|
|
|
1130
1132
|
## Third-party rule plugins
|
|
1131
1133
|
|
|
@@ -1146,22 +1148,30 @@ export default {
|
|
|
1146
1148
|
|
|
1147
1149
|
Contributor rules emit autofixes the same way built-ins do, call `ctx.ReportFix(node, message, edits...)` or `ctx.ReportRangeFix(pos, end, message, edits...)`. The `rule/astutil` package re-exports the byte-range helpers built-ins use (`NodeText`, `KeywordStart`, `FindKeyword`, `TokenRange`). See the [contributor autofix path](https://ttsc.dev/docs/development/walkthroughs/lint#the-contributor-autofix-path) section for the full contract and an example.
|
|
1148
1150
|
|
|
1149
|
-
Contributor rules run on declaration files (`.d.ts`) by default. The engine skips
|
|
1151
|
+
Contributor lint rules run on declaration files (`.d.ts`, `.d.mts`, `.d.cts`) by default. The engine skips built-in rules whose inspected grammar is not relevant there, but it cannot infer a third-party rule's shape, so contributors keep the conservative default. A lint rule that only inspects executable code can implement the optional `rule.DeclarationFileRule` marker (`VisitsDeclarationFiles() bool { return false }`) to skip those inputs. A true `rule.FormatRule` marker takes precedence over this opt-out: formatting rules always visit declaration files.
|
|
1150
1152
|
|
|
1151
1153
|
Contributor rules also keep accepting options by default because `rule.Context.Options` predates the options-capability contract. A contributor that is genuinely optionless can implement `rule.OptionsRule` with `AcceptsTtscLintOptions() bool { return false }`; the host then rejects any payload before calling the rule. The domain-specific method name avoids capturing an unrelated `AcceptsOptions` method on an existing contributor. The same marker applies to `rule.ProjectRule` implementations.
|
|
1152
1154
|
|
|
1153
|
-
A typed contributor package
|
|
1155
|
+
A typed contributor package publishes an ordinary exported interface that maps each rule name to its options object, or to `void` for a severity-only rule. The user passes it, or an intersection of several, as the generic argument of `ITtscLintConfig`; the listed rules then get exact option checking and a payload on a `void` rule is rejected. A namespace that is not passed keeps the open fallback that accepts an unknown payload.
|
|
1154
1156
|
|
|
1155
1157
|
```ts
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
"demo/capitalize-exports"?: TtscLintRuleSetting;
|
|
1161
|
-
}
|
|
1158
|
+
// the contributor package
|
|
1159
|
+
export interface IDemoLintRules {
|
|
1160
|
+
"demo/no-marker-comment": { markers?: readonly string[] };
|
|
1161
|
+
"demo/capitalize-exports": void;
|
|
1162
1162
|
}
|
|
1163
|
+
|
|
1164
|
+
// lint.config.ts
|
|
1165
|
+
import type { ITtscLintConfig } from "@ttsc/lint";
|
|
1166
|
+
import type { IDemoLintRules } from "ttsc-lint-plugin-demo";
|
|
1167
|
+
|
|
1168
|
+
export default {
|
|
1169
|
+
rules: { "demo/no-marker-comment": ["error", { markers: ["TODO"] }] },
|
|
1170
|
+
} satisfies ITtscLintConfig<IDemoLintRules>;
|
|
1163
1171
|
```
|
|
1164
1172
|
|
|
1173
|
+
Packages that already augment `ITtscLintRuleOptionsMap` or `ITtscLintContributorRules` with `declare module "@ttsc/lint"` keep compiling; the exported-interface form needs no ambient declaration.
|
|
1174
|
+
|
|
1165
1175
|
### Project-scoped contributor rules
|
|
1166
1176
|
|
|
1167
1177
|
Contributors that validate the loaded Program rather than individual AST nodes can register a public `rule.ProjectRule`:
|
|
@@ -1183,7 +1193,7 @@ func (noCycles) Check(ctx *rule.ProjectContext) {
|
|
|
1183
1193
|
func init() { rule.RegisterProject(noCycles{}) }
|
|
1184
1194
|
```
|
|
1185
1195
|
|
|
1186
|
-
Each project rule runs once per
|
|
1196
|
+
Each project rule runs once per project evaluation cycle, before file rules. A resident request can evaluate a new cycle while reusing the loaded Program. `ctx.Identity` includes the invocation cwd, logical and physical config paths and roots, an optional explicit project root, the plugin-config origin, and a lifecycle id. `Report` marks the rule failed and emits one project finding; `Fail` marks it failed without a finding. Later file rules can call `ctx.ProjectResult(name)` and distinguish `absent`, `off`, `not_evaluated`, `passed`, and `failed`.
|
|
1187
1197
|
|
|
1188
1198
|
`ctx.ReportSeverity(rule.SeverityWarn, message)` overrides the level of one project finding. An off rule or off finding remains silent. A warning still marks the project result failed, while only an error fails the command. Snapshots retain each finding's severity, and duplicate messages keep the strongest reported level. Hosts implementing only `ProjectReporter` receive the message at the rule's configured level; `ProjectSeverityReporter` is the optional extension for individual levels.
|
|
1189
1199
|
|
|
@@ -1214,6 +1224,8 @@ func (evidenceRule) ProjectInputs(ctx *rule.ProjectInputContext) []rule.ProjectI
|
|
|
1214
1224
|
|
|
1215
1225
|
Relative patterns are anchored to `ctx.Identity.PhysicalProjectRoot`. Exact files remain dependencies while missing, and globs remain populations while they match nothing, so later create, rename, and repair events are observable. The host normalizes symlink aliases and shares duplicate declarations before publishing one snapshot. Declare configured topology rather than only files a successful `Check` happened to read; `ProjectInputs` runs after options and project identity are resolved but before a TypeScript Program is loaded. HTTP(S) URLs are not filesystem inputs and require a contributor-owned polling or conditional-revalidation policy.
|
|
1216
1226
|
|
|
1227
|
+
For reusable check results, read external inputs through the optional `ctx.Inputs` reader and implement `rule.ProjectInputObservationRule` with `UsesProjectInputReader() bool` returning `true`. The reader belongs to the current Program: its `ReadFile` returns raw bytes and its native directory/path operations preserve their normal results. Keep the existing OS operations when `ctx.Inputs == nil`, as in manually constructed contexts. Call `ctx.Inputs.Unavailable()` when an external bridge or other operation consumes inputs the reader cannot observe. The capability declaration and `ProjectInputs` topology do not certify consumed bytes; unsupported, conflicting or incomplete observations prevent reuse of that check result.
|
|
1228
|
+
|
|
1217
1229
|
Use `ctx.SetState(value)` when a later file rule needs the exact project binding selected during that check. The host returns the same value without interpreting or serializing it:
|
|
1218
1230
|
|
|
1219
1231
|
```go
|
|
@@ -1242,7 +1254,7 @@ func (guardedFileRule) Check(ctx *rule.Context, node *ast.Node) {
|
|
|
1242
1254
|
|
|
1243
1255
|
`ProjectResult` is a snapshot of the current status and findings, while its `Report` and `Fail` methods remain live until file dispatch finishes. Call `ctx.ProjectResult(name)` again to observe a failure reported by an earlier helper. Equal messages are deduplicated, distinct messages are sorted, and finalized project findings stay ahead of file findings. `absent`, `off`, and `not_evaluated` results expose no state and their mutation methods do nothing.
|
|
1244
1256
|
|
|
1245
|
-
State belongs to one
|
|
1257
|
+
State belongs to one project evaluation cycle. When a resident request evaluates project rules, it starts a new cycle even if it reuses the loaded Program. The host does not carry it into a watch or LSP rebuild: the new project check attaches that cycle's value and receives a new reporter. A reporter retained past file dispatch is inert. The host synchronizes status changes and finding deduplication across concurrent files. The contributor must create any required fresh state and synchronize mutable data inside its own value.
|
|
1246
1258
|
|
|
1247
1259
|
Project rules use the normal `rules` map and `extends` order, but only global config entries may configure them. Any entry that contains `files`, including `files: []` or an `off` value, is rejected. Global `ignores` remain source-file filters rather than project-rule selectors. A later bare severity preserves the last explicit tuple options while replacing severity.
|
|
1248
1260
|
|
|
@@ -1309,6 +1321,6 @@ When you add a new rule family to [Rules](#rules), do all of:
|
|
|
1309
1321
|
|
|
1310
1322
|
To the maintainers of every plugin listed above: the rule semantics under `react/*`, `jest/*`, `playwright/*`, `tanstack-query/*`, `promise/*`, and the other family namespaces inside `@ttsc/lint` are a Go re-implementation of your work for the TypeScript-Go Checker. The intent is convenience, projects on `ttsc` get your rules without standing up a separate ESLint process, not ownership.
|
|
1311
1323
|
|
|
1312
|
-
If you would prefer to publish a first-party `@ttsc/lint` plugin for your family yourself, you are welcome to take the Go sources under [`packages/lint/linthost/rules_*.go`](https://github.com/samchon/ttsc/tree/master/packages/lint/linthost) and the fixtures under [`
|
|
1324
|
+
If you would prefer to publish a first-party `@ttsc/lint` plugin for your family yourself, you are welcome to take the Go sources under [`packages/lint/linthost/rules_*.go`](https://github.com/samchon/ttsc/tree/master/packages/lint/linthost) and the fixtures under [`packages/lint/test/testdata/corpus/`](https://github.com/samchon/ttsc/tree/master/packages/lint/test/testdata/corpus) and ship them as your own contributor plugin. Open an issue at [samchon/ttsc](https://github.com/samchon/ttsc/issues) when the upstream package is ready, and I will retire the in-tree port and add a redirect line under [Rules](#rules) pointing at your package. Same offer for partial coverage. Name a subset and I will remove just those rules.
|
|
1313
1325
|
|
|
1314
1326
|
The contributor-plugin walkthrough is the [`@ttsc/lint` development guide](https://ttsc.dev/docs/development/walkthroughs/lint).
|