@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/rule/rule.go
CHANGED
|
@@ -50,6 +50,15 @@ import (
|
|
|
50
50
|
// Severity mirrors the engine's three-level severity ladder. The
|
|
51
51
|
// constants are kept value-compatible with the engine's internal
|
|
52
52
|
// `Severity` type so the adapter layer can cast safely.
|
|
53
|
+
//
|
|
54
|
+
// @evidence contracts/common.md#principled-implementation The integer ladder uses the same off, warning and error values as the host adapter.
|
|
55
|
+
// @evidence contracts/common.md#clear-and-simple-design One named type centralizes contributor severity without exposing engine storage.
|
|
56
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The ordinal constants are protocol values rather than consumer-specific outcomes.
|
|
57
|
+
// @evidence contracts/common.md#meaningful-documentation Native comments explain adapter compatibility and each level's command effect; tags follow documentation guidance.
|
|
58
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Severity is a declaration of data shape and performs no filesystem, path or process operation.
|
|
59
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Severity is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
60
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Severity is a declaration of data shape and coordinates no computation that could be shared.
|
|
61
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Severity is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
53
62
|
type Severity int
|
|
54
63
|
|
|
55
64
|
const (
|
|
@@ -65,18 +74,57 @@ const (
|
|
|
65
74
|
// Rule is the contract every contributor rule satisfies. Mirrors the
|
|
66
75
|
// internal host interface so the host can dispatch via a thin adapter
|
|
67
76
|
// without re-implementing the engine.
|
|
77
|
+
//
|
|
78
|
+
// @evidence contracts/common.md#principled-implementation Identity, visit kinds and node checking match the host dispatch contract over the shared shim AST.
|
|
79
|
+
// @evidence contracts/common.md#clear-and-simple-design Three methods separate configuration identity, dispatch selection and inspection.
|
|
80
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Contributors use the declared registry and context instead of replacing engine methods.
|
|
81
|
+
// @evidence contracts/common.md#meaningful-documentation Native method comments describe namespacing, kind dispatch and reporting; member and tag spacing follow documentation guidance.
|
|
82
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Rule is a declaration of data shape and performs no filesystem, path or process operation.
|
|
83
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Rule is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
84
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Rule is a declaration of data shape and coordinates no computation that could be shared.
|
|
85
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Rule is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
68
86
|
type Rule interface {
|
|
69
87
|
// Name is the identifier users put in their `rules` map.
|
|
70
88
|
// Conventionally namespaced as "<plugin-namespace>/<rule-name>" to
|
|
71
89
|
// avoid colliding with built-in rule names.
|
|
90
|
+
//
|
|
91
|
+
// @evidence contracts/common.md#principled-implementation The stable rule identifier binds configuration to the registered implementation.
|
|
92
|
+
// @evidence contracts/common.md#clear-and-simple-design A dedicated method exposes identity separately from dispatch and checking.
|
|
93
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The registered name is a public configuration key rather than a fixture-specific selector.
|
|
94
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents the namespaced convention; tags follow documentation guidance.
|
|
95
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Rule.Name is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
96
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Rule.Name is a method signature without a body; each implementation chooses its own algorithm.
|
|
97
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Rule.Name is a method signature without a body; each implementation decides what, if anything, to share.
|
|
98
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Rule.Name is a method signature without a body; each implementation owns any retained state.
|
|
72
99
|
Name() string
|
|
73
100
|
|
|
74
101
|
// Visits returns the AST kinds the rule cares about. The engine only
|
|
75
102
|
// dispatches to rules that registered for the visited node's kind.
|
|
103
|
+
//
|
|
104
|
+
// @evidence contracts/common.md#principled-implementation The returned AST kinds describe exactly which nodes the rule's Check operation accepts.
|
|
105
|
+
// @evidence contracts/common.md#clear-and-simple-design Dispatch selection is declared once per rule instead of repeated in every file walk.
|
|
106
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Selection uses supported AST kinds without a consumer-name branch or foreign dispatch patch.
|
|
107
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states kind-based dispatch; tags follow documentation guidance.
|
|
108
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Rule.Visits is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
109
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Rule.Visits is a method signature without a body; each implementation chooses its own algorithm.
|
|
110
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Rule.Visits is a method signature without a body; each implementation decides what, if anything, to share.
|
|
111
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Rule.Visits is a method signature without a body; each implementation owns any retained state.
|
|
76
112
|
Visits() []shimast.Kind
|
|
77
113
|
|
|
78
|
-
// Check is invoked
|
|
79
|
-
// `ctx.ReportRange` to emit findings.
|
|
114
|
+
// Check is invoked for selected nodes while this rule remains active in
|
|
115
|
+
// the current file. Use `ctx.Report` or `ctx.ReportRange` to emit findings.
|
|
116
|
+
// A panic becomes an error finding and disables this rule for the rest
|
|
117
|
+
// of that file, including its other selected kinds. Other rules and later
|
|
118
|
+
// files remain eligible for dispatch.
|
|
119
|
+
//
|
|
120
|
+
// @evidence contracts/common.md#principled-implementation The context and selected AST node provide the file binding and reporting channel for one node inspection.
|
|
121
|
+
// @evidence contracts/common.md#clear-and-simple-design Checking is one responsibility separate from rule identity and visit registration.
|
|
122
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Findings flow through the supported context rather than patched compiler diagnostics.
|
|
123
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states invocation scope and reporting APIs; tags follow documentation guidance.
|
|
124
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Rule.Check is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
125
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Rule.Check is a method signature without a body; each implementation chooses its own algorithm.
|
|
126
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Rule.Check is a method signature without a body; each implementation decides what, if anything, to share.
|
|
127
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Rule.Check is a method signature without a body; each implementation owns any retained state.
|
|
80
128
|
Check(ctx *Context, node *shimast.Node)
|
|
81
129
|
}
|
|
82
130
|
|
|
@@ -92,34 +140,87 @@ type Rule interface {
|
|
|
92
140
|
// `IsFormat` exists as a structural marker, not a runtime toggle:
|
|
93
141
|
// returning `false` is equivalent to not implementing the interface at
|
|
94
142
|
// all, and the host treats either form the same way.
|
|
143
|
+
//
|
|
144
|
+
// @evidence contracts/common.md#principled-implementation The embedded Rule plus boolean marker lets the host distinguish format-category findings without changing normal rule dispatch.
|
|
145
|
+
// @evidence contracts/common.md#clear-and-simple-design One optional marker extends category selection while reusing the mandatory Rule interface.
|
|
146
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Format selection is a supported capability rather than a host-name patch.
|
|
147
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose distinguishes fix and format commands and false-marker behavior; paragraphs and tags follow documentation guidance.
|
|
148
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation FormatRule is a declaration of data shape and performs no filesystem, path or process operation.
|
|
149
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms FormatRule is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
150
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work FormatRule is a declaration of data shape and coordinates no computation that could be shared.
|
|
151
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources FormatRule is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
95
152
|
type FormatRule interface {
|
|
96
153
|
Rule
|
|
154
|
+
|
|
155
|
+
// IsFormat marks findings as belonging to the formatter category.
|
|
156
|
+
//
|
|
157
|
+
// @evidence contracts/common.md#principled-implementation A true result requests format-category handling; false retains ordinary lint behavior.
|
|
158
|
+
// @evidence contracts/common.md#clear-and-simple-design One marker conveys category without another rule implementation interface.
|
|
159
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The category uses declared capability detection rather than name matching.
|
|
160
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose identifies category selection; the tag boundary follows documentation guidance.
|
|
161
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation FormatRule.IsFormat is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
162
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms FormatRule.IsFormat is a method signature without a body; each implementation chooses its own algorithm.
|
|
163
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work FormatRule.IsFormat is a method signature without a body; each implementation decides what, if anything, to share.
|
|
164
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources FormatRule.IsFormat is a method signature without a body; each implementation owns any retained state.
|
|
97
165
|
IsFormat() bool
|
|
98
166
|
}
|
|
99
167
|
|
|
100
168
|
// DeclarationFileRule is an optional marker contributors implement to
|
|
101
169
|
// control whether their rule runs on declaration-file inputs (`.d.ts`,
|
|
102
170
|
// `.d.mts`, `.d.cts`). The engine skips most built-in rules on declaration
|
|
103
|
-
// files
|
|
104
|
-
// keep the conservative default
|
|
171
|
+
// files when their inspected grammar is not relevant there; contributor rules
|
|
172
|
+
// keep the conservative default (they run on declaration files) since
|
|
105
173
|
// the host cannot infer a third-party rule's shape (mirror of the implicit
|
|
106
174
|
// checker default). A contributor whose rule inspects executable code only
|
|
107
175
|
// can implement this with `return false` to skip declaration files and
|
|
108
176
|
// save the dispatch on declaration-heavy projects; returning `true` is
|
|
109
177
|
// equivalent to not implementing the interface at all.
|
|
178
|
+
//
|
|
179
|
+
// FormatRule with IsFormat returning true takes precedence: formatting
|
|
180
|
+
// rules always visit declaration files, even when this marker returns false.
|
|
181
|
+
//
|
|
182
|
+
// @evidence contracts/common.md#principled-implementation The marker selects declaration-file inputs for ordinary lint rules; a true FormatRule capability takes precedence so formatting still covers declarations.
|
|
183
|
+
// @evidence contracts/common.md#clear-and-simple-design One optional method refines input selection while keeping the original Rule contract intact.
|
|
184
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Skipping is capability-based and never inferred from a particular contributor name.
|
|
185
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose describes declaration extensions, conservative default and opt-out consequences; paragraphs and tags follow documentation guidance.
|
|
186
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation DeclarationFileRule is a declaration of data shape and performs no filesystem, path or process operation.
|
|
187
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms DeclarationFileRule is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
188
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work DeclarationFileRule is a declaration of data shape and coordinates no computation that could be shared.
|
|
189
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources DeclarationFileRule is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
110
190
|
type DeclarationFileRule interface {
|
|
111
191
|
Rule
|
|
192
|
+
|
|
193
|
+
// VisitsDeclarationFiles selects declaration-file dispatch for lint rules.
|
|
194
|
+
// A true FormatRule marker takes precedence over a false answer here.
|
|
195
|
+
//
|
|
196
|
+
// @evidence contracts/common.md#principled-implementation The boolean selects declaration grammar for a lint rule; the host gives true FormatRule classification precedence over an explicit false answer.
|
|
197
|
+
// @evidence contracts/common.md#clear-and-simple-design One input capability expresses the selection policy directly.
|
|
198
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts A declared capability replaces rule-name exceptions.
|
|
199
|
+
// @evidence contracts/common.md#meaningful-documentation The native comment identifies dispatch selection with separated tags under documentation guidance.
|
|
200
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation DeclarationFileRule.VisitsDeclarationFiles is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
201
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms DeclarationFileRule.VisitsDeclarationFiles is a method signature without a body; each implementation chooses its own algorithm.
|
|
202
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work DeclarationFileRule.VisitsDeclarationFiles is a method signature without a body; each implementation decides what, if anything, to share.
|
|
203
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources DeclarationFileRule.VisitsDeclarationFiles is a method signature without a body; each implementation owns any retained state.
|
|
112
204
|
VisitsDeclarationFiles() bool
|
|
113
205
|
}
|
|
114
206
|
|
|
115
207
|
// DiagnosticTag classifies what a finding IS, orthogonally to how severe it is.
|
|
116
|
-
// The values match the LSP DiagnosticTag enum
|
|
117
|
-
//
|
|
208
|
+
// The values match the LSP DiagnosticTag enum. Clients may fade unnecessary
|
|
209
|
+
// code or strike through deprecated code; presentation remains client policy.
|
|
210
|
+
//
|
|
211
|
+
// @evidence contracts/common.md#principled-implementation The numeric values match LSP's unnecessary and deprecated classifications independently from severity.
|
|
212
|
+
// @evidence contracts/common.md#clear-and-simple-design One type owns visual classification without coupling it to command failure.
|
|
213
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Values are protocol discriminants rather than a workaround for diagnostic severity.
|
|
214
|
+
// @evidence contracts/common.md#meaningful-documentation Native constants explain deletion and migration meaning, preventing an unfinished-work misclassification; tags follow documentation guidance.
|
|
215
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation DiagnosticTag is a declaration of data shape and performs no filesystem, path or process operation.
|
|
216
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms DiagnosticTag is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
217
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work DiagnosticTag is a declaration of data shape and coordinates no computation that could be shared.
|
|
218
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources DiagnosticTag is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
118
219
|
type DiagnosticTag int
|
|
119
220
|
|
|
120
221
|
const (
|
|
121
|
-
// DiagnosticTagUnnecessary marks code that is safe to delete
|
|
122
|
-
// import
|
|
222
|
+
// DiagnosticTagUnnecessary marks code that is safe to delete, such as an unused
|
|
223
|
+
// import or an unreachable branch. A client may fade it.
|
|
123
224
|
//
|
|
124
225
|
// This is a claim about what the code is, not how bad it is, and the
|
|
125
226
|
// distinction bites: "unnecessary" says "remove this." A finding that means
|
|
@@ -128,25 +229,49 @@ const (
|
|
|
128
229
|
// what deletion would mean, never by severity.
|
|
129
230
|
DiagnosticTagUnnecessary DiagnosticTag = 1
|
|
130
231
|
// DiagnosticTagDeprecated marks code that still works but should be migrated
|
|
131
|
-
// away from.
|
|
232
|
+
// away from. A client may strike it through.
|
|
132
233
|
DiagnosticTagDeprecated DiagnosticTag = 2
|
|
133
234
|
)
|
|
134
235
|
|
|
135
236
|
// TaggedRule is an optional marker a rule implements to classify its findings
|
|
136
|
-
// with DiagnosticTags. Every
|
|
137
|
-
// tags
|
|
138
|
-
//
|
|
237
|
+
// with DiagnosticTags. Every diagnostic reported through its Context carries
|
|
238
|
+
// the returned tags. This rule-level classification fits a rule that
|
|
239
|
+
// reports only unused code. Host-generated rule-panic errors are untagged.
|
|
139
240
|
//
|
|
140
241
|
// It is separate from severity on purpose. Severity is how much a finding
|
|
141
242
|
// matters and is the user's to configure; a tag is what the finding is and is
|
|
142
243
|
// the rule's to state. A host that does not read tags loses the greying, not the
|
|
143
|
-
// diagnostic
|
|
244
|
+
// diagnostic, as with the other optional markers.
|
|
144
245
|
//
|
|
145
246
|
// Return nil, or do not implement it, for a rule whose findings are neither
|
|
146
247
|
// unnecessary nor deprecated. Most findings are neither, and guessing wrong is
|
|
147
248
|
// worse than saying nothing: a spurious Unnecessary tells the author to delete
|
|
148
249
|
// correct code.
|
|
250
|
+
//
|
|
251
|
+
// Tags are registration metadata. Return a stable slice and do not mutate
|
|
252
|
+
// its backing storage after registration: the host shares the captured tags
|
|
253
|
+
// with ordinary findings rather than cloning them for each report.
|
|
254
|
+
//
|
|
255
|
+
// @evidence contracts/common.md#principled-implementation A rule-level tag slice describes classification shared by its findings while severity remains user configured.
|
|
256
|
+
// @evidence contracts/common.md#clear-and-simple-design One optional method adds classification without changing the main checking interface.
|
|
257
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Interface capability supplies tags without replacing reporter logic or guessing from severity.
|
|
258
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents no-tag defaults, classification scope, immutable metadata and harmful unnecessary-code guesses; paragraphs and tags follow documentation guidance.
|
|
259
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation TaggedRule is a declaration of data shape and performs no filesystem, path or process operation.
|
|
260
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms TaggedRule is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
261
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work TaggedRule is a declaration of data shape and coordinates no computation that could be shared.
|
|
262
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources TaggedRule is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
149
263
|
type TaggedRule interface {
|
|
264
|
+
// DiagnosticTags returns immutable registration metadata for diagnostics
|
|
265
|
+
// reported through this rule's Context. Rule-panic errors do not inherit it.
|
|
266
|
+
//
|
|
267
|
+
// @evidence contracts/common.md#principled-implementation The returned tags classify findings independently from their configured level.
|
|
268
|
+
// @evidence contracts/common.md#clear-and-simple-design One method supplies the rule's shared classification metadata.
|
|
269
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Classification uses explicit tags rather than deriving deletion advice from severity.
|
|
270
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states the report scope, panic exception and immutable metadata lifetime with a separated tag block.
|
|
271
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation TaggedRule.DiagnosticTags is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
272
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms TaggedRule.DiagnosticTags is a method signature without a body; each implementation chooses its own algorithm.
|
|
273
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work TaggedRule.DiagnosticTags is a method signature without a body; each implementation decides what, if anything, to share.
|
|
274
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources TaggedRule.DiagnosticTags is a method signature without a body; each implementation owns any retained state.
|
|
150
275
|
DiagnosticTags() []DiagnosticTag
|
|
151
276
|
}
|
|
152
277
|
|
|
@@ -163,7 +288,9 @@ type TaggedRule interface {
|
|
|
163
288
|
//
|
|
164
289
|
// A contributor whose rule is AST-only can implement this with
|
|
165
290
|
// `NeedsTypeChecker() bool { return false }` to opt out of the checker path,
|
|
166
|
-
//
|
|
291
|
+
// allowing a checker-free parallel walk when no other active rule requires
|
|
292
|
+
// a checker and the caller has not requested serial execution. Returning true is
|
|
293
|
+
// equivalent
|
|
167
294
|
// to not implementing the interface at all. A rule that returns `false` must
|
|
168
295
|
// not read `Context.Checker`: the host is free to leave it nil.
|
|
169
296
|
//
|
|
@@ -171,7 +298,26 @@ type TaggedRule interface {
|
|
|
171
298
|
// existing contributor cannot opt out by accident. ProjectRule implementations
|
|
172
299
|
// may use the same marker; the serial walk it governs is engine-wide, so one
|
|
173
300
|
// type-aware project rule serializes every file rule in the run.
|
|
301
|
+
//
|
|
302
|
+
// @evidence contracts/common.md#principled-implementation The explicit checker requirement lets the host enforce checker availability and its serial-access constraint.
|
|
303
|
+
// @evidence contracts/common.md#clear-and-simple-design One optional capability separates syntactic inspection from type-checker dependence.
|
|
304
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Opt-out is declared by the contributor instead of inferred from unrelated method names or rule identities.
|
|
305
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents conservative defaults, nil-checker consequences and serialization; paragraphs and tags follow documentation guidance.
|
|
306
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation TypeAwareRule is a declaration of data shape and performs no filesystem, path or process operation.
|
|
307
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms TypeAwareRule is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
308
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work TypeAwareRule is a declaration of data shape and coordinates no computation that could be shared.
|
|
309
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources TypeAwareRule is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
174
310
|
type TypeAwareRule interface {
|
|
311
|
+
// NeedsTypeChecker declares whether checking reads Context.Checker.
|
|
312
|
+
//
|
|
313
|
+
// @evidence contracts/common.md#principled-implementation The boolean binds checker availability to the rule's actual inspection needs.
|
|
314
|
+
// @evidence contracts/common.md#clear-and-simple-design A single capability exposes the checker dependency without changing Check's arguments.
|
|
315
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Capability detection avoids rule-name shortcuts and accidental generic-method matches.
|
|
316
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose identifies the dependency declaration with separated tags under documentation guidance.
|
|
317
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation TypeAwareRule.NeedsTypeChecker is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
318
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms TypeAwareRule.NeedsTypeChecker is a method signature without a body; each implementation chooses its own algorithm.
|
|
319
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work TypeAwareRule.NeedsTypeChecker is a method signature without a body; each implementation decides what, if anything, to share.
|
|
320
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources TypeAwareRule.NeedsTypeChecker is a method signature without a body; each implementation owns any retained state.
|
|
175
321
|
NeedsTypeChecker() bool
|
|
176
322
|
}
|
|
177
323
|
|
|
@@ -181,21 +327,69 @@ type TypeAwareRule interface {
|
|
|
181
327
|
// with the original public Context.Options contract. Return false for a
|
|
182
328
|
// genuinely optionless rule so the host can reject accidental payloads before
|
|
183
329
|
// linting. The domain-specific method name prevents an unrelated generic
|
|
184
|
-
// AcceptsOptions method on an existing contributor from
|
|
330
|
+
// AcceptsOptions method on an existing contributor from changing its options
|
|
331
|
+
// acceptance by accident.
|
|
185
332
|
// ProjectRule implementations may use the same marker.
|
|
333
|
+
//
|
|
334
|
+
// @evidence contracts/common.md#principled-implementation The marker distinguishes a genuine options slot from an optionless rule so the host rejects unsupported payloads before checking.
|
|
335
|
+
// @evidence contracts/common.md#clear-and-simple-design One optional capability covers file and project rules without introducing parallel option-name lists.
|
|
336
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The domain-specific method avoids accidentally capturing unrelated contributor methods.
|
|
337
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states legacy defaults, early rejection and method-name rationale; tags follow documentation guidance.
|
|
338
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation OptionsRule is a declaration of data shape and performs no filesystem, path or process operation.
|
|
339
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms OptionsRule is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
340
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work OptionsRule is a declaration of data shape and coordinates no computation that could be shared.
|
|
341
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources OptionsRule is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
186
342
|
type OptionsRule interface {
|
|
343
|
+
// AcceptsTtscLintOptions declares whether a setting may include an options payload.
|
|
344
|
+
//
|
|
345
|
+
// @evidence contracts/common.md#principled-implementation The boolean identifies the supported setting shape before rule execution.
|
|
346
|
+
// @evidence contracts/common.md#clear-and-simple-design One named capability makes option acceptance independent from rule-name tables.
|
|
347
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The explicit marker avoids unvalidated special-case payload acceptance.
|
|
348
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents the setting-shape capability with separated tags under documentation guidance.
|
|
349
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation OptionsRule.AcceptsTtscLintOptions is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
350
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms OptionsRule.AcceptsTtscLintOptions is a method signature without a body; each implementation chooses its own algorithm.
|
|
351
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work OptionsRule.AcceptsTtscLintOptions is a method signature without a body; each implementation decides what, if anything, to share.
|
|
352
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources OptionsRule.AcceptsTtscLintOptions is a method signature without a body; each implementation owns any retained state.
|
|
187
353
|
AcceptsTtscLintOptions() bool
|
|
188
354
|
}
|
|
189
355
|
|
|
190
356
|
// Reporter is the engine-supplied callback that records a finding. The
|
|
191
357
|
// host implements this and passes it to `NewContext` when invoking a
|
|
192
358
|
// contributor rule.
|
|
359
|
+
//
|
|
360
|
+
// @evidence contracts/common.md#principled-implementation Node and byte-range reporting both bind findings to the currently inspected source file.
|
|
361
|
+
// @evidence contracts/common.md#clear-and-simple-design Two reporting forms separate AST-node ranges from explicit sub-token ranges while hiding aggregation.
|
|
362
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Findings use the supported host callback instead of compiler-internal mutation.
|
|
363
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose identifies host ownership and member range semantics; member and tag spacing follow documentation guidance.
|
|
364
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Reporter is a declaration of data shape and performs no filesystem, path or process operation.
|
|
365
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Reporter is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
366
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Reporter is a declaration of data shape and coordinates no computation that could be shared.
|
|
367
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Reporter is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
193
368
|
type Reporter interface {
|
|
194
369
|
// Report records a finding at the given node's source range.
|
|
370
|
+
//
|
|
371
|
+
// @evidence contracts/common.md#principled-implementation The source node supplies the finding's byte range in the current file.
|
|
372
|
+
// @evidence contracts/common.md#clear-and-simple-design Node reporting is one operation separate from manual range selection.
|
|
373
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The declared callback routes findings without replacing compiler methods.
|
|
374
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose identifies node-range reporting with separated tags under documentation guidance.
|
|
375
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Reporter.Report is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
376
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Reporter.Report is a method signature without a body; each implementation chooses its own algorithm.
|
|
377
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Reporter.Report is a method signature without a body; each implementation decides what, if anything, to share.
|
|
378
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Reporter.Report is a method signature without a body; each implementation owns any retained state.
|
|
195
379
|
Report(node *shimast.Node, message string)
|
|
380
|
+
|
|
196
381
|
// ReportRange records a finding at an explicit byte range inside the
|
|
197
382
|
// current file. Use this when the rule wants to highlight a
|
|
198
383
|
// sub-token.
|
|
384
|
+
//
|
|
385
|
+
// @evidence contracts/common.md#principled-implementation Explicit byte positions identify a finding range within the bound source file.
|
|
386
|
+
// @evidence contracts/common.md#clear-and-simple-design Range reporting keeps sub-token location choice with the rule while the host aggregates findings.
|
|
387
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The supported callback avoids inventing AST nodes solely to carry a diagnostic.
|
|
388
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents current-file byte positions and sub-token use; tags follow documentation guidance.
|
|
389
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Reporter.ReportRange is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
390
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Reporter.ReportRange is a method signature without a body; each implementation chooses its own algorithm.
|
|
391
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Reporter.ReportRange is a method signature without a body; each implementation decides what, if anything, to share.
|
|
392
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Reporter.ReportRange is a method signature without a body; each implementation owns any retained state.
|
|
199
393
|
ReportRange(pos, end int, message string)
|
|
200
394
|
}
|
|
201
395
|
|
|
@@ -205,16 +399,45 @@ type Reporter interface {
|
|
|
205
399
|
// both methods opts into fix support without depending on a private
|
|
206
400
|
// interface name.
|
|
207
401
|
//
|
|
208
|
-
// Rule
|
|
209
|
-
//
|
|
210
|
-
//
|
|
211
|
-
//
|
|
212
|
-
//
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
//
|
|
402
|
+
// Rule implementations submit edits through ctx.ReportFix or
|
|
403
|
+
// ctx.ReportRangeFix. A custom host or test reporter passed to NewContext
|
|
404
|
+
// must satisfy Reporter to provide diagnostics. To receive edits as well,
|
|
405
|
+
// it must implement both FixReporter methods; implementing only one leaves
|
|
406
|
+
// the optional capability absent and Context falls back to plain reporting.
|
|
407
|
+
// A var _ rule.FixReporter = &myReporter{} assertion checks only this optional
|
|
408
|
+
// fix surface, not the separate Reporter requirement.
|
|
409
|
+
//
|
|
410
|
+
// @evidence contracts/common.md#principled-implementation Optional node and range methods extend a finding with atomic byte edits without changing its original location semantics.
|
|
411
|
+
// @evidence contracts/common.md#clear-and-simple-design Fix support is one optional extension separate from mandatory diagnostic reporting.
|
|
412
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Structural capability detection preserves legacy reporters rather than patching their methods.
|
|
413
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains context access and complete interface satisfaction; method and tag spacing follow documentation guidance.
|
|
414
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation FixReporter is a declaration of data shape and performs no filesystem, path or process operation.
|
|
415
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms FixReporter is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
416
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work FixReporter is a declaration of data shape and coordinates no computation that could be shared.
|
|
417
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources FixReporter is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
216
418
|
type FixReporter interface {
|
|
419
|
+
// ReportFix records a node finding with its candidate edit group.
|
|
420
|
+
//
|
|
421
|
+
// @evidence contracts/common.md#principled-implementation One call associates all byte edits with the same node finding for atomic conflict handling.
|
|
422
|
+
// @evidence contracts/common.md#clear-and-simple-design One operation keeps diagnostic and fix association explicit.
|
|
423
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Fixes use a supported extension instead of direct source mutation during checking.
|
|
424
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose describes the associated edit group with separated tags under documentation guidance.
|
|
425
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation FixReporter.ReportFix is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
426
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms FixReporter.ReportFix is a method signature without a body; each implementation chooses its own algorithm.
|
|
427
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work FixReporter.ReportFix is a method signature without a body; each implementation decides what, if anything, to share.
|
|
428
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources FixReporter.ReportFix is a method signature without a body; each implementation owns any retained state.
|
|
217
429
|
ReportFix(node *shimast.Node, message string, edits ...TextEdit)
|
|
430
|
+
|
|
431
|
+
// ReportRangeFix records an explicit-range finding with its candidate edit group.
|
|
432
|
+
//
|
|
433
|
+
// @evidence contracts/common.md#principled-implementation The finding range and edit ranges are distinct byte positions associated in one report.
|
|
434
|
+
// @evidence contracts/common.md#clear-and-simple-design One method extends range reporting without requiring a synthetic AST node.
|
|
435
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Edits travel through the declared fix boundary rather than foreign source mutation.
|
|
436
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains explicit-range fix association with separated tags under documentation guidance.
|
|
437
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation FixReporter.ReportRangeFix is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
438
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms FixReporter.ReportRangeFix is a method signature without a body; each implementation chooses its own algorithm.
|
|
439
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work FixReporter.ReportRangeFix is a method signature without a body; each implementation decides what, if anything, to share.
|
|
440
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources FixReporter.ReportRangeFix is a method signature without a body; each implementation owns any retained state.
|
|
218
441
|
ReportRangeFix(pos, end int, message string, edits ...TextEdit)
|
|
219
442
|
}
|
|
220
443
|
|
|
@@ -222,36 +445,75 @@ type FixReporter interface {
|
|
|
222
445
|
// finding's related source locations. Like FixReporter, the public
|
|
223
446
|
// `rule.Context` type-asserts against this shape, so any host whose reporter
|
|
224
447
|
// exposes both methods opts into related locations without depending on a
|
|
225
|
-
// private interface name. A host
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
//
|
|
229
|
-
//
|
|
230
|
-
//
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
//
|
|
234
|
-
//
|
|
235
|
-
//
|
|
448
|
+
// private interface name. A host without this capability still receives the
|
|
449
|
+
// primary diagnostic, without its optional related locations.
|
|
450
|
+
//
|
|
451
|
+
// Rule implementations submit locations through ctx.ReportRelated or
|
|
452
|
+
// ctx.ReportRangeRelated. A custom host or test reporter passed to NewContext
|
|
453
|
+
// must satisfy Reporter; implementing both RelatedReporter methods also
|
|
454
|
+
// enables related locations. The optional interface alone does not satisfy
|
|
455
|
+
// the separate Reporter parameter.
|
|
456
|
+
//
|
|
457
|
+
// @evidence contracts/common.md#principled-implementation Optional related locations attach explanatory current-file ranges while the primary finding remains independently reportable.
|
|
458
|
+
// @evidence contracts/common.md#clear-and-simple-design The related-location extension remains separate from fix and mandatory reporter interfaces.
|
|
459
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Capability-based degradation preserves real findings without patching old reporters.
|
|
460
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains direct context access and absent-capability behavior; method and tag spacing follow documentation guidance.
|
|
461
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation RelatedReporter is a declaration of data shape and performs no filesystem, path or process operation.
|
|
462
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms RelatedReporter is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
463
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work RelatedReporter is a declaration of data shape and coordinates no computation that could be shared.
|
|
464
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources RelatedReporter is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
236
465
|
type RelatedReporter interface {
|
|
466
|
+
// ReportRelated records a node finding with additional current-file locations.
|
|
467
|
+
//
|
|
468
|
+
// @evidence contracts/common.md#principled-implementation Related ranges explain the node finding while retaining the same bound file identity.
|
|
469
|
+
// @evidence contracts/common.md#clear-and-simple-design One operation attaches related information without adding another result store.
|
|
470
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Related locations use the supported extension rather than fabricated cross-file identities.
|
|
471
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states same-file location scope with separated tags under documentation guidance.
|
|
472
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation RelatedReporter.ReportRelated is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
473
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms RelatedReporter.ReportRelated is a method signature without a body; each implementation chooses its own algorithm.
|
|
474
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work RelatedReporter.ReportRelated is a method signature without a body; each implementation decides what, if anything, to share.
|
|
475
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources RelatedReporter.ReportRelated is a method signature without a body; each implementation owns any retained state.
|
|
237
476
|
ReportRelated(node *shimast.Node, message string, related ...RelatedInformation)
|
|
477
|
+
|
|
478
|
+
// ReportRangeRelated records a range finding with additional current-file locations.
|
|
479
|
+
//
|
|
480
|
+
// @evidence contracts/common.md#principled-implementation Explicit primary and related ranges share the bound source-file byte coordinate system.
|
|
481
|
+
// @evidence contracts/common.md#clear-and-simple-design The range form avoids creating a synthetic node for sub-token findings.
|
|
482
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The declared extension routes locations without changing host internals.
|
|
483
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents range reporting and location scope; tags follow documentation guidance.
|
|
484
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation RelatedReporter.ReportRangeRelated is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
485
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms RelatedReporter.ReportRangeRelated is a method signature without a body; each implementation chooses its own algorithm.
|
|
486
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work RelatedReporter.ReportRangeRelated is a method signature without a body; each implementation decides what, if anything, to share.
|
|
487
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources RelatedReporter.ReportRangeRelated is a method signature without a body; each implementation owns any retained state.
|
|
238
488
|
ReportRangeRelated(pos, end int, message string, related ...RelatedInformation)
|
|
239
489
|
}
|
|
240
490
|
|
|
241
|
-
// RelatedInformation is a secondary
|
|
242
|
-
//
|
|
243
|
-
//
|
|
244
|
-
//
|
|
245
|
-
//
|
|
246
|
-
// Pos
|
|
247
|
-
//
|
|
248
|
-
//
|
|
249
|
-
//
|
|
250
|
-
//
|
|
251
|
-
//
|
|
491
|
+
// RelatedInformation is a secondary current-file location paired with a
|
|
492
|
+
// message naming its connection to the primary finding. For example, a
|
|
493
|
+
// duplicate-definition diagnostic can also identify the first definition.
|
|
494
|
+
// An LSP client may expose these locations as navigation targets.
|
|
495
|
+
//
|
|
496
|
+
// Pos and End are byte offsets into the finding's source file, in the same
|
|
497
|
+
// coordinate system as shim AST nodes and ReportRange. The host normalizes
|
|
498
|
+
// these ranges and supplies that file's URI during LSP serialization. This
|
|
499
|
+
// value carries no URI or source identity for locations in another file.
|
|
500
|
+
//
|
|
501
|
+
// @evidence contracts/common.md#principled-implementation Byte positions and message represent a secondary location in the current file; the API deliberately carries no cross-file URI.
|
|
502
|
+
// @evidence contracts/common.md#clear-and-simple-design A three-member value separates location and explanatory text without adding unsupported cross-file navigation.
|
|
503
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Same-file coordinates are explicit instead of fabricating a URI from unrelated paths.
|
|
504
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose documents byte units and the same-file limitation; member and tag boundaries follow documentation guidance.
|
|
505
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation RelatedInformation is a declaration of data shape and performs no filesystem, path or process operation.
|
|
506
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms RelatedInformation is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
507
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work RelatedInformation is a declaration of data shape and coordinates no computation that could be shared.
|
|
508
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources RelatedInformation is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
252
509
|
type RelatedInformation struct {
|
|
253
|
-
Pos
|
|
254
|
-
|
|
510
|
+
// Pos is the inclusive byte start in the current source file.
|
|
511
|
+
Pos int
|
|
512
|
+
|
|
513
|
+
// End is the exclusive byte end in the current source file.
|
|
514
|
+
End int
|
|
515
|
+
|
|
516
|
+
// Message explains why this secondary range relates to the finding.
|
|
255
517
|
Message string
|
|
256
518
|
}
|
|
257
519
|
|
|
@@ -268,8 +530,9 @@ type RelatedInformation struct {
|
|
|
268
530
|
// group first, and accepts a group only when every member coexists with the
|
|
269
531
|
// edits already accepted. If any member would be dropped, the whole group is
|
|
270
532
|
// skipped, so a multi-edit fix never half-applies. The skipped finding is not
|
|
271
|
-
// lost:
|
|
272
|
-
//
|
|
533
|
+
// lost: a later cascade pass may re-evaluate it against rewritten source.
|
|
534
|
+
// Application is not guaranteed; the cascade can finish without that edit or
|
|
535
|
+
// reach its pass limit and report non-convergence.
|
|
273
536
|
//
|
|
274
537
|
// A finding's own edits must therefore not overlap each other either, or the
|
|
275
538
|
// finding can never apply. Exact duplicates within one finding are collapsed
|
|
@@ -283,45 +546,95 @@ type RelatedInformation struct {
|
|
|
283
546
|
// multi-edit fixes include `typescript/no-import-type-side-effects`,
|
|
284
547
|
// `format/whitespace`, `format/indent`, `unicorn/prevent-abbreviations`, and
|
|
285
548
|
// `unicorn/template-indent`.
|
|
549
|
+
//
|
|
550
|
+
// @evidence contracts/common.md#principled-implementation A half-open byte range and replacement string describe insertion, deletion or replacement without confusing UTF-8 bytes with visual columns.
|
|
551
|
+
// @evidence contracts/common.md#clear-and-simple-design One minimal edit value serves fixes and suggestions; conflict policy remains with the host applier.
|
|
552
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Edits describe supported source rewrites rather than mutating foreign AST or compiler internals during checking.
|
|
553
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains byte units, atomic groups, overlap and narrow-edit guidance; members and tags follow documentation guidance.
|
|
554
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation TextEdit is a declaration of data shape and performs no filesystem, path or process operation.
|
|
555
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms TextEdit is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
556
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work TextEdit is a declaration of data shape and coordinates no computation that could be shared.
|
|
557
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources TextEdit is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
286
558
|
type TextEdit struct {
|
|
287
|
-
Pos
|
|
288
|
-
|
|
559
|
+
// Pos is the inclusive byte start; equal Pos and End insert text.
|
|
560
|
+
Pos int
|
|
561
|
+
|
|
562
|
+
// End is the exclusive byte end and must not split a UTF-8 sequence.
|
|
563
|
+
End int
|
|
564
|
+
|
|
565
|
+
// Text replaces the range; an empty value deletes it.
|
|
289
566
|
Text string
|
|
290
567
|
}
|
|
291
568
|
|
|
292
|
-
// Suggestion is one
|
|
293
|
-
//
|
|
294
|
-
//
|
|
569
|
+
// Suggestion is one author-selected edit group with its own title. Use it when
|
|
570
|
+
// a change needs an explicit choice, including a single repair that automatic
|
|
571
|
+
// fixing must withhold or several alternatives among which the rule cannot
|
|
572
|
+
// choose. Automatic fix and fix-all operations do not apply suggestions.
|
|
295
573
|
//
|
|
296
|
-
// The
|
|
297
|
-
//
|
|
298
|
-
//
|
|
299
|
-
//
|
|
300
|
-
//
|
|
301
|
-
// this shape and contributors could not reach.
|
|
574
|
+
// The lint host omits choices with an empty title or no edits, while keeping
|
|
575
|
+
// the primary diagnostic. Each advertised choice must contain distinct,
|
|
576
|
+
// non-overlapping, in-bounds edits. The LSP application rejects a choice if
|
|
577
|
+
// edit validation drops any member, including an exact duplicate; the
|
|
578
|
+
// automatic-fix group's internal duplicate collapsing does not apply here.
|
|
302
579
|
//
|
|
303
|
-
//
|
|
304
|
-
//
|
|
580
|
+
// @evidence contracts/common.md#principled-implementation Title and edit group express one author-selected alternative rather than imposing an arbitrary valid repair.
|
|
581
|
+
// @evidence contracts/common.md#clear-and-simple-design One value groups display text with the candidate's edits independently from the finding.
|
|
582
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Explicit alternatives do not silently replace a required fix with a guessed consumer preference.
|
|
583
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose distinguishes suggestions from automatic fixes and documents empty edits; member and tag spacing follow documentation guidance.
|
|
584
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Suggestion is a declaration of data shape and performs no filesystem, path or process operation.
|
|
585
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Suggestion is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
586
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Suggestion is a declaration of data shape and coordinates no computation that could be shared.
|
|
587
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Suggestion is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
305
588
|
type Suggestion struct {
|
|
306
589
|
// Title is what the editor shows for this choice, e.g. "Rename to `frames`".
|
|
307
590
|
Title string
|
|
308
|
-
|
|
309
|
-
//
|
|
591
|
+
|
|
592
|
+
// Edits apply this choice after selection. The lint host omits a choice
|
|
593
|
+
// with no edits rather than advertising a label-only action.
|
|
310
594
|
Edits []TextEdit
|
|
311
595
|
}
|
|
312
596
|
|
|
313
|
-
// SuggestionReporter is the optional
|
|
314
|
-
//
|
|
315
|
-
// finding through
|
|
316
|
-
//
|
|
597
|
+
// SuggestionReporter is the optional reporter extension that carries
|
|
598
|
+
// author-selected edit choices. A host without it still receives the primary
|
|
599
|
+
// finding through Reporter, without the choices.
|
|
600
|
+
//
|
|
601
|
+
// This channel is separate from FixReporter because explicit selection and
|
|
602
|
+
// automatic application have different policies. One suggestion may require
|
|
603
|
+
// consent even when it is the only available repair; several suggestions may
|
|
604
|
+
// offer alternatives. Rules submit them through Context.ReportSuggestion or
|
|
605
|
+
// ReportRangeSuggestion, and the host decides which choices it can publish.
|
|
317
606
|
//
|
|
318
|
-
//
|
|
319
|
-
//
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
//
|
|
607
|
+
// @evidence contracts/common.md#principled-implementation Optional suggestion reporting keeps multiple candidate repairs attached to the finding while legacy reporters retain the diagnostic alone.
|
|
608
|
+
// @evidence contracts/common.md#clear-and-simple-design A separate extension represents author choice without conflating it with an automatic fix.
|
|
609
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Optional capability handling preserves existing reporters through their supported interfaces.
|
|
610
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains fallback and the fix-versus-choice boundary; method and tag spacing follow documentation guidance.
|
|
611
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation SuggestionReporter is a declaration of data shape and performs no filesystem, path or process operation.
|
|
612
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms SuggestionReporter is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
613
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work SuggestionReporter is a declaration of data shape and coordinates no computation that could be shared.
|
|
614
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources SuggestionReporter is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
323
615
|
type SuggestionReporter interface {
|
|
616
|
+
// ReportSuggestion associates author-selectable repairs with a node finding.
|
|
617
|
+
//
|
|
618
|
+
// @evidence contracts/common.md#principled-implementation Each suggestion remains a separate candidate edit group for the same primary node finding.
|
|
619
|
+
// @evidence contracts/common.md#clear-and-simple-design One method groups alternatives without selecting or applying them during checking.
|
|
620
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Alternatives use the public reporter instead of imposing an arbitrary fixture-driven choice.
|
|
621
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states candidate association with separated tags under documentation guidance.
|
|
622
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation SuggestionReporter.ReportSuggestion is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
623
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms SuggestionReporter.ReportSuggestion is a method signature without a body; each implementation chooses its own algorithm.
|
|
624
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work SuggestionReporter.ReportSuggestion is a method signature without a body; each implementation decides what, if anything, to share.
|
|
625
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources SuggestionReporter.ReportSuggestion is a method signature without a body; each implementation owns any retained state.
|
|
324
626
|
ReportSuggestion(node *shimast.Node, message string, suggestions ...Suggestion)
|
|
627
|
+
|
|
628
|
+
// ReportRangeSuggestion associates author-selectable repairs with a range finding.
|
|
629
|
+
//
|
|
630
|
+
// @evidence contracts/common.md#principled-implementation Explicit byte-range findings receive distinct candidate groups without synthetic node identity.
|
|
631
|
+
// @evidence contracts/common.md#clear-and-simple-design One range variant reuses the same suggestion values and host aggregation.
|
|
632
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Candidates travel through a declared extension rather than direct edits during validation.
|
|
633
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose identifies range-based candidate reporting with separated tags under documentation guidance.
|
|
634
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation SuggestionReporter.ReportRangeSuggestion is a method signature without a body; each implementation owns any filesystem or process behavior.
|
|
635
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms SuggestionReporter.ReportRangeSuggestion is a method signature without a body; each implementation chooses its own algorithm.
|
|
636
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work SuggestionReporter.ReportRangeSuggestion is a method signature without a body; each implementation decides what, if anything, to share.
|
|
637
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources SuggestionReporter.ReportRangeSuggestion is a method signature without a body; each implementation owns any retained state.
|
|
325
638
|
ReportRangeSuggestion(pos, end int, message string, suggestions ...Suggestion)
|
|
326
639
|
}
|
|
327
640
|
|
|
@@ -329,25 +642,35 @@ type SuggestionReporter interface {
|
|
|
329
642
|
// The `Reporter` is supplied by the host when constructing the context;
|
|
330
643
|
// contributors call `ctx.Report` / `ctx.ReportRange` directly through
|
|
331
644
|
// this Context rather than touching the reporter.
|
|
645
|
+
//
|
|
646
|
+
// @evidence contracts/common.md#principled-implementation File, checker, resolved settings and private cycle channels bind every contributor inspection to the host's current file and Program.
|
|
647
|
+
// @evidence contracts/common.md#clear-and-simple-design Public inspection inputs are separated from reporter and project-result capabilities behind context methods.
|
|
648
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The context provides supported reporting and project-state access without foreign engine mutation.
|
|
649
|
+
// @evidence contracts/common.md#meaningful-documentation Native members document source availability, checker dependence and raw options; member gaps and separated tags follow documentation guidance.
|
|
650
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context is a declaration of data shape and performs no filesystem, path or process operation.
|
|
651
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Context is a declaration of data shape and chooses no algorithm or processing strategy.
|
|
652
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Context is a declaration of data shape and coordinates no computation that could be shared.
|
|
653
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Context is a declaration of data shape; the code that holds its values owns their lifetime.
|
|
332
654
|
type Context struct {
|
|
333
655
|
// File is the source file currently being walked. Always non-nil
|
|
334
656
|
// when `Check` is invoked.
|
|
335
657
|
File *shimast.SourceFile
|
|
336
658
|
|
|
337
659
|
// Checker is the host's tsgo type checker. Available for type-aware
|
|
338
|
-
// rules
|
|
660
|
+
// rules when requested. A checker-free invocation may leave it nil.
|
|
339
661
|
Checker *shimchecker.Checker
|
|
340
662
|
|
|
341
663
|
// Severity is the rule's resolved severity for this file. Already
|
|
342
|
-
// filtered by the engine
|
|
664
|
+
// filtered by the engine, so rules do not need to check for
|
|
343
665
|
// SeverityOff.
|
|
344
666
|
Severity Severity
|
|
345
667
|
|
|
346
|
-
// Options is
|
|
347
|
-
//
|
|
348
|
-
//
|
|
349
|
-
//
|
|
350
|
-
//
|
|
668
|
+
// Options is this source file's effective raw JSON payload. One option slot
|
|
669
|
+
// retains its value shape; multiple positional slots form an array, and a
|
|
670
|
+
// severity-only override may inherit a matching earlier payload. Nil means
|
|
671
|
+
// no effective payload. Constructors copy the bytes, so local mutation does
|
|
672
|
+
// not alter resolver storage or another invocation. DecodeOptions reads it
|
|
673
|
+
// into the contributor's own destination.
|
|
351
674
|
Options json.RawMessage
|
|
352
675
|
|
|
353
676
|
reporter Reporter
|
|
@@ -357,6 +680,15 @@ type Context struct {
|
|
|
357
680
|
// NewContext constructs a Context for the engine to pass into a
|
|
358
681
|
// contributor rule's `Check`. Reserved for host code; contributors
|
|
359
682
|
// should not need to call this.
|
|
683
|
+
//
|
|
684
|
+
// @evidence contracts/common.md#principled-implementation Delegating with a nil project reader preserves the original context semantics while reusing defensive option copying.
|
|
685
|
+
// @evidence contracts/common.md#clear-and-simple-design The legacy constructor has one delegation point to the fuller constructor.
|
|
686
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The nil-reader path is supported backwards compatibility rather than a fabricated project result.
|
|
687
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose names host ownership and normal contributor usage; tags follow documentation guidance.
|
|
688
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation NewContext performs no filesystem or process operation of its own.
|
|
689
|
+
// @evidence contracts/performance.md#efficient-algorithms Delegation copies b raw option bytes and allocates the returned context, O(1+b) work and storage; the absence of a wrapper loop does not make the fuller constructor fixed-cost.
|
|
690
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Construction creates invocation-local mutable option storage, not a shared computation coordinator. The caller owns snapshot validity and any immutable input reuse; sharing the resulting writable options across invocations would violate their ownership.
|
|
691
|
+
// @evidence contracts/performance.md#bound-retention-and-release-resources The returned context owns its copied option bytes and retains borrowed file, checker and reporter references until callers release it. The host owns Program/checker resource closure; this constructor stores no global context history and acquires no handle or running task.
|
|
360
692
|
func NewContext(
|
|
361
693
|
file *shimast.SourceFile,
|
|
362
694
|
checker *shimchecker.Checker,
|
|
@@ -369,6 +701,15 @@ func NewContext(
|
|
|
369
701
|
|
|
370
702
|
// NewContextWithProjectResults constructs a file-rule Context with the live
|
|
371
703
|
// project results for the same loaded Program cycle.
|
|
704
|
+
//
|
|
705
|
+
// @evidence contracts/common.md#principled-implementation The constructor keeps the host's file, checker and live readers while copying raw option bytes to prevent slice alias mutation.
|
|
706
|
+
// @evidence contracts/common.md#clear-and-simple-design One constructor establishes all per-file inputs and private channels together.
|
|
707
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Live state is supplied through its declared reader instead of inferred from unrelated Program identities.
|
|
708
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose identifies the same-cycle binding and members document ownership; the tag boundary follows documentation guidance.
|
|
709
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation NewContextWithProjectResults performs no filesystem or process operation of its own.
|
|
710
|
+
// @evidence contracts/performance.md#efficient-algorithms Copying b raw option bytes and constructing one context costs O(1+b) work and storage. File, checker, reporter and result-reader references are passed through without traversal or copying their underlying Program and cycle.
|
|
711
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work This constructor creates a separate writable option buffer per invocation and coordinates no requests or shared result cache. The host establishes same-cycle validity for the borrowed source/checker/reader; equal bytes do not authorize sharing their mutable option destination.
|
|
712
|
+
// @evidence contracts/performance.md#bound-retention-and-release-resources The caller receives a context with b owned option bytes and borrowed file/checker/reporter/result-reader references, which can keep those objects reachable while the context is retained. The host owns their live Program/cycle and resource closure. This constructor has no historical-context cache, handle or task of its own.
|
|
372
713
|
func NewContextWithProjectResults(
|
|
373
714
|
file *shimast.SourceFile,
|
|
374
715
|
checker *shimchecker.Checker,
|
|
@@ -389,6 +730,15 @@ func NewContextWithProjectResults(
|
|
|
389
730
|
|
|
390
731
|
// ProjectResult returns a current snapshot for a named project rule in this
|
|
391
732
|
// file's Program cycle. Missing registrations return ProjectRuleAbsent.
|
|
733
|
+
//
|
|
734
|
+
// @evidence contracts/common.md#principled-implementation Nil contexts and missing readers return absent; a live reader supplies the named rule's current snapshot without caching stale status locally.
|
|
735
|
+
// @evidence contracts/common.md#clear-and-simple-design One lookup method hides the project-result storage and lifecycle.
|
|
736
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Missing project bindings are explicit absent results rather than invented passed results.
|
|
737
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose specifies current-cycle lookup and absent semantics; tags follow documentation guidance.
|
|
738
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ProjectResult performs no filesystem or process operation of its own.
|
|
739
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Local absence guards and direct delegation choose no lookup or snapshot algorithm. ProjectResultReader owns the dominant work, including any finding-copy or locking cost; the wrapper does not certify a fixed total cost.
|
|
740
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work This lookup delegates to the live cycle reader and owns no cross-query memo. The reader establishes current rule/cycle identity and snapshot validity; a cached result based only on this context or name could hide a changed status.
|
|
741
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The returned snapshot can contain finding storage and producer-owned State references; the reader and caller own their lifetime. This wrapper adds no stored result history, handle or task, and it does not close or mutate the producer's state.
|
|
392
742
|
func (c *Context) ProjectResult(name string) ProjectRuleResult {
|
|
393
743
|
if c == nil || c.results == nil {
|
|
394
744
|
return ProjectRuleResult{Status: ProjectRuleAbsent}
|
|
@@ -403,6 +753,15 @@ func (c *Context) ProjectResult(name string) ProjectRuleResult {
|
|
|
403
753
|
// var opts myRuleOptions
|
|
404
754
|
// _ = ctx.DecodeOptions(&opts)
|
|
405
755
|
// // opts now holds either the user's settings or the zero value.
|
|
756
|
+
//
|
|
757
|
+
// @evidence contracts/common.md#principled-implementation A nil or empty options payload preserves caller defaults; encoding/json decodes present input and returns its error.
|
|
758
|
+
// @evidence contracts/common.md#clear-and-simple-design One context helper owns raw JSON decoding without independent rule-specific parsing policy.
|
|
759
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts No arbitrary payload substitute or fixture-specific options bypass is introduced.
|
|
760
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose and the example describe default-preserving decoding; paragraphs and tags follow documentation guidance.
|
|
761
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.DecodeOptions performs no filesystem or process operation of its own.
|
|
762
|
+
// @evidence contracts/performance.md#efficient-algorithms The absence check is constant work; present options delegate validation and decoding to encoding/json, with work driven by JSON bytes and destination shape and storage allocated as required by decoded values. A destination custom unmarshaler can add its own work; absence of a wrapper loop does not make decoding fixed-cost.
|
|
763
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Decoding updates the supplied destination, preserves its omitted defaults and can invoke destination-defined unmarshaling effects. Equal JSON alone does not make different destinations or calls interchangeable; this helper owns no cross-request result cache.
|
|
764
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Decoded values and their allocations belong to the caller-supplied destination; custom unmarshaler retention is owned by that implementation. This helper neither stores destination history nor acquires native handles or tasks, and its receiver owner controls the existing raw option bytes.
|
|
406
765
|
func (c *Context) DecodeOptions(out interface{}) error {
|
|
407
766
|
if c == nil || len(c.Options) == 0 {
|
|
408
767
|
return nil
|
|
@@ -411,8 +770,17 @@ func (c *Context) DecodeOptions(out interface{}) error {
|
|
|
411
770
|
}
|
|
412
771
|
|
|
413
772
|
// Report records a finding at the given node's source range. Silently
|
|
414
|
-
// ignored when severity is `off` (
|
|
773
|
+
// ignored when severity is `off` (the engine already filters
|
|
415
774
|
// by severity before invoking Check) or when no reporter is attached.
|
|
775
|
+
//
|
|
776
|
+
// @evidence contracts/common.md#principled-implementation Nil context, missing reporter, off severity and nil node are inert; valid active calls forward the actual node and message.
|
|
777
|
+
// @evidence contracts/common.md#clear-and-simple-design A single defensive boundary protects the host callback before delegation.
|
|
778
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Findings flow through the supported reporter without synthetic nodes or foreign mutation.
|
|
779
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose describes disabled and absent reporter behavior; tags follow documentation guidance.
|
|
780
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.Report performs no filesystem or process operation of its own.
|
|
781
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms This wrapper chooses no finding algorithm beyond guards and reporter delegation. A reporter may scan node trivia, normalize positions and collect a finding; its dominant cost remains the reporter owner's responsibility, not a fixed-total-cost guarantee.
|
|
782
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Reporting is an effectful invocation, not a completed-work or in-flight coordinator. Equal node and message inputs do not authorize suppressing another report; the reporter owns collection identity and deduplication policy.
|
|
783
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The wrapper stores no finding history or new handle/task. Reporter-owned collection may retain the message and resulting finding for its run; that owner controls population and release after this synchronous delegation.
|
|
416
784
|
func (c *Context) Report(node *shimast.Node, message string) {
|
|
417
785
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff || node == nil {
|
|
418
786
|
return
|
|
@@ -424,6 +792,15 @@ func (c *Context) Report(node *shimast.Node, message string) {
|
|
|
424
792
|
// autofix edits. Older hosts that do not implement fix reporting receive the
|
|
425
793
|
// diagnostic without edits.
|
|
426
794
|
// Treat edits as best-effort: design the rule so the diagnostic alone is useful.
|
|
795
|
+
//
|
|
796
|
+
// @evidence contracts/common.md#principled-implementation Active node calls preserve the diagnostic when edits are absent or fix capability is unavailable; capable reporters receive the complete candidate group.
|
|
797
|
+
// @evidence contracts/common.md#clear-and-simple-design Guards and one capability branch separate ordinary reporting from the optional edit channel.
|
|
798
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Legacy degradation addresses an actual supported reporter difference without patching foreign methods or suppressing the finding.
|
|
799
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains best-effort edits and legacy fallback; the tag boundary follows documentation guidance.
|
|
800
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportFix performs no filesystem or process operation of its own.
|
|
801
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Guards, edit presence and one capability assertion choose no edit-processing algorithm. The selected reporter owns range work, edit conversion/copy and collection cost; this wrapper passes the slice through without certifying fixed total work.
|
|
802
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work This is an effectful reporting call, not a request coordinator. The reporter owns finding identity and edit collection; matching node/message/edit values do not authorize suppressing a separate invocation.
|
|
803
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This wrapper stores no report history or new handle/task and forwards the caller edit slice synchronously. A reporter that retains edits owns copying and collection lifetime; the hosted adapter converts records and its collector owns resulting finding/edit storage.
|
|
427
804
|
func (c *Context) ReportFix(node *shimast.Node, message string, edits ...TextEdit) {
|
|
428
805
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff || node == nil {
|
|
429
806
|
return
|
|
@@ -442,6 +819,15 @@ func (c *Context) ReportFix(node *shimast.Node, message string, edits ...TextEdi
|
|
|
442
819
|
|
|
443
820
|
// ReportRange records a finding at an explicit byte range inside the
|
|
444
821
|
// current file.
|
|
822
|
+
//
|
|
823
|
+
// @evidence contracts/common.md#principled-implementation Active contexts forward the supplied current-file byte range; absent or off channels remain inert.
|
|
824
|
+
// @evidence contracts/common.md#clear-and-simple-design A guard and one callback keep range reporting separate from node construction.
|
|
825
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Explicit ranges use the supported API rather than synthetic AST nodes.
|
|
826
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states the range's byte units and file scope; tags follow documentation guidance.
|
|
827
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportRange performs no filesystem or process operation of its own.
|
|
828
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Guards and direct range delegation choose no collection algorithm. Reporter-side normalization and callback work remain that owner's cost; an arbitrary Reporter implementation is not certified fixed-cost by this wrapper.
|
|
829
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Each report is an observable collection effect rather than a reusable query. The reporter owns any finding identity or deduplication policy, so equal coordinates and message do not alone permit sharing or suppressing calls.
|
|
830
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This method adds no retained history, handle or task to the context. The delegated reporter owns retained message/finding storage and its run lifetime; the wrapper does not release or bound that collection.
|
|
445
831
|
func (c *Context) ReportRange(pos, end int, message string) {
|
|
446
832
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff {
|
|
447
833
|
return
|
|
@@ -453,6 +839,15 @@ func (c *Context) ReportRange(pos, end int, message string) {
|
|
|
453
839
|
// autofix edits. Older hosts that do not implement fix reporting receive the
|
|
454
840
|
// diagnostic without edits.
|
|
455
841
|
// Treat edits as best-effort: design the rule so the diagnostic alone is useful.
|
|
842
|
+
//
|
|
843
|
+
// @evidence contracts/common.md#principled-implementation Active range calls attach all edits when supported and retain the plain finding when edits or fix capability are absent.
|
|
844
|
+
// @evidence contracts/common.md#clear-and-simple-design One optional capability branch reuses range reporting without exposing host storage.
|
|
845
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The supported legacy fallback preserves diagnostics rather than hiding a failed fix or replacing reporter internals.
|
|
846
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains optional edits and fallback; separated tags follow documentation guidance.
|
|
847
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportRangeFix performs no filesystem or process operation of its own.
|
|
848
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Guards and one optional-capability branch select delegation, not an edit-processing algorithm. Reporter-side coordinate normalization, edit conversion/copy and collection remain that owner's cost; passing through a variadic slice is not a fixed-total-cost guarantee.
|
|
849
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Range-fix reporting performs an observable collection effect and coordinates no shared request result. The reporter owns identity/deduplication; equal range/message/edit inputs alone do not permit suppressing another call.
|
|
850
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The wrapper adds no stored finding history, handle or task and forwards the supplied edit slice synchronously. Retained edit/finding storage and copying belong to the reporter; the hosted adapter converts records before handing them to its run-owned collector.
|
|
456
851
|
func (c *Context) ReportRangeFix(pos, end int, message string, edits ...TextEdit) {
|
|
457
852
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff {
|
|
458
853
|
return
|
|
@@ -469,14 +864,20 @@ func (c *Context) ReportRangeFix(pos, end int, message string, edits ...TextEdit
|
|
|
469
864
|
fixer.ReportRangeFix(pos, end, message, edits...)
|
|
470
865
|
}
|
|
471
866
|
|
|
472
|
-
// ReportSuggestion records a finding
|
|
473
|
-
//
|
|
474
|
-
//
|
|
475
|
-
//
|
|
867
|
+
// ReportSuggestion records a finding with candidate fixes selected explicitly
|
|
868
|
+
// by the caller, rather than automatically applied. A host without
|
|
869
|
+
// SuggestionReporter receives the diagnostic alone. A single candidate can
|
|
870
|
+
// still require deliberate selection when automatic repair is inappropriate;
|
|
871
|
+
// several alternatives leave that selection to the caller.
|
|
476
872
|
//
|
|
477
|
-
//
|
|
478
|
-
//
|
|
479
|
-
//
|
|
873
|
+
// @evidence contracts/common.md#principled-implementation Valid active node calls attach candidate choices when supported; absent choices or optional capability preserve the diagnostic alone.
|
|
874
|
+
// @evidence contracts/common.md#clear-and-simple-design One capability branch separates author choice from mandatory reporting and automatic fixing.
|
|
875
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Actual reporter compatibility governs fallback; no arbitrary candidate is imposed to satisfy a known consumer.
|
|
876
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose distinguishes explicit selection from automatic repair and states legacy behavior; paragraphs and tags follow documentation guidance.
|
|
877
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportSuggestion performs no filesystem or process operation of its own.
|
|
878
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Guards and capability selection delegate without choosing candidate processing. The hosted adapter converts s suggestions and e nested edits before node-range and collection work; the reporter owns that variable cost, not a fixed total guaranteed here.
|
|
879
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Candidate reporting is an observable collection effect, not a shared request coordinator. Reporter identity and policy govern duplicate findings; equal node/message/candidates alone do not authorize omitting another invocation.
|
|
880
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This wrapper forwards candidate slices synchronously without storing report history or acquiring a handle/task. The retaining reporter owns candidate/edit copies and run-lifetime storage; the hosted adapter converts nested edits and the collector retains the resulting finding.
|
|
480
881
|
func (c *Context) ReportSuggestion(node *shimast.Node, message string, suggestions ...Suggestion) {
|
|
481
882
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff || node == nil {
|
|
482
883
|
return
|
|
@@ -495,6 +896,15 @@ func (c *Context) ReportSuggestion(node *shimast.Node, message string, suggestio
|
|
|
495
896
|
|
|
496
897
|
// ReportRangeSuggestion records a finding at an explicit byte range with a
|
|
497
898
|
// choice of candidate fixes. See `ReportSuggestion`.
|
|
899
|
+
//
|
|
900
|
+
// @evidence contracts/common.md#principled-implementation Active explicit ranges receive suggestions when the reporter supports them; otherwise the same finding is preserved without choices.
|
|
901
|
+
// @evidence contracts/common.md#clear-and-simple-design The range variant shares suggestion values without manufacturing an AST node.
|
|
902
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The compatibility branch uses a supported optional interface instead of patching reporter implementations.
|
|
903
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose names range-based choices and its shared reporting contract; tags follow documentation guidance.
|
|
904
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportRangeSuggestion performs no filesystem or process operation of its own.
|
|
905
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms The wrapper selects a capability but chooses no candidate algorithm. The hosted reporter converts s choices and e nested edits and normalizes the range before collection; its variable work is not certified fixed-cost by direct delegation.
|
|
906
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Range candidate reporting is an effectful call, not a completed/in-flight result coordinator. Reporter collection identity controls duplicate policy; equal coordinates/message/candidates alone cannot justify sharing or suppressing calls.
|
|
907
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This method adds no result history, handle or task and forwards caller candidate storage synchronously. The reporter owns any retained nested edit/candidate copies and collection lifetime; hosted storage is run-owned rather than bounded by this wrapper.
|
|
498
908
|
func (c *Context) ReportRangeSuggestion(pos, end int, message string, suggestions ...Suggestion) {
|
|
499
909
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff {
|
|
500
910
|
return
|
|
@@ -515,6 +925,15 @@ func (c *Context) ReportRangeSuggestion(pos, end int, message string, suggestion
|
|
|
515
925
|
// source locations. Older hosts that do not implement RelatedReporter receive
|
|
516
926
|
// the diagnostic without them, so design the rule to read well from the message
|
|
517
927
|
// alone. With no related locations it is exactly `Report`.
|
|
928
|
+
//
|
|
929
|
+
// @evidence contracts/common.md#principled-implementation Valid active node calls attach related ranges only through a capable reporter and always preserve the plain finding when that channel is unavailable.
|
|
930
|
+
// @evidence contracts/common.md#clear-and-simple-design Guards and one optional branch keep primary reporting independent from location enrichment.
|
|
931
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Legacy compatibility uses explicit capability detection rather than altering host reporter internals.
|
|
932
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explains same-finding fallback and empty-location equivalence; tags follow documentation guidance.
|
|
933
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportRelated performs no filesystem or process operation of its own.
|
|
934
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms Guards and capability selection choose no related-location algorithm. The hosted reporter performs node-trivia range work and copies/normalizes r related records before collection; reporter-owned variable work is not certified fixed-cost here.
|
|
935
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Related reporting is an observable collection effect rather than a shared query coordinator. Reporter identity and duplicate policy determine valid collection; matching inputs alone do not authorize suppressing another report.
|
|
936
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources This wrapper stores no finding history, handle or task and passes related records synchronously. The reporter owns any retained location/message copies and finding population; hosted storage lives with its run-owned collection.
|
|
518
937
|
func (c *Context) ReportRelated(node *shimast.Node, message string, related ...RelatedInformation) {
|
|
519
938
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff || node == nil {
|
|
520
939
|
return
|
|
@@ -534,6 +953,15 @@ func (c *Context) ReportRelated(node *shimast.Node, message string, related ...R
|
|
|
534
953
|
// ReportRangeRelated records a finding at an explicit byte range with related
|
|
535
954
|
// source locations. Falls back to a plain range finding on a host without
|
|
536
955
|
// RelatedReporter, and equals `ReportRange` when no related locations are given.
|
|
956
|
+
//
|
|
957
|
+
// @evidence contracts/common.md#principled-implementation Active range reporting preserves the primary finding and forwards related ranges only when provided and supported.
|
|
958
|
+
// @evidence contracts/common.md#clear-and-simple-design One range form reuses the enrichment capability without constructing synthetic nodes.
|
|
959
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The supported legacy path degrades optional locations while keeping the diagnostic intact.
|
|
960
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose explicitly states both fallback conditions; tags follow documentation guidance.
|
|
961
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Context.ReportRangeRelated performs no filesystem or process operation of its own.
|
|
962
|
+
// @evidenceExclude contracts/performance.md#efficient-algorithms This wrapper chooses only a reporting capability, not location processing. The hosted reporter normalizes coordinates and copies r related records before collection; that variable cost belongs to the reporter and is not fixed by delegation.
|
|
963
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Range-related reporting is effectful collection, not completed/in-flight result coordination. Reporter identity and duplicate policy control reuse permission; equal coordinates/message/locations alone cannot justify suppressing calls.
|
|
964
|
+
// @evidenceExclude contracts/performance.md#bound-retention-and-release-resources No finding history, new handle or task is stored in this wrapper. A retaining reporter owns related-record copies and diagnostic storage/lifetime; the hosted collector owns its run population rather than this delegated method.
|
|
537
965
|
func (c *Context) ReportRangeRelated(pos, end int, message string, related ...RelatedInformation) {
|
|
538
966
|
if c == nil || c.reporter == nil || c.Severity == SeverityOff {
|
|
539
967
|
return
|
|
@@ -552,10 +980,20 @@ func (c *Context) ReportRangeRelated(pos, end int, message string, related ...Re
|
|
|
552
980
|
|
|
553
981
|
var registry []Rule
|
|
554
982
|
|
|
555
|
-
// Register adds a contributor rule
|
|
556
|
-
//
|
|
557
|
-
//
|
|
558
|
-
//
|
|
983
|
+
// Register adds a contributor rule during its package's init, before host
|
|
984
|
+
// bootstrap reads the registry. Runtime or concurrent registration is
|
|
985
|
+
// unsupported: the slice is not synchronized and the host publishes adapters
|
|
986
|
+
// once. Duplicate names remain registered here; bootstrap drops collisions
|
|
987
|
+
// with a warning.
|
|
988
|
+
//
|
|
989
|
+
// @evidence contracts/common.md#principled-implementation A nonnil Rule is appended during package initialization, while the completed contributor set is validated for name collisions by the host.
|
|
990
|
+
// @evidence contracts/common.md#clear-and-simple-design Registration owns collection and leaves cross-rule validation to bootstrap.
|
|
991
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts The registry is the declared contributor extension point rather than a patched engine rule list.
|
|
992
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose specifies init-time use and deferred duplicate checks; tags follow documentation guidance.
|
|
993
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Register appends to an in-memory registry and touches no filesystem path or process.
|
|
994
|
+
// @evidence contracts/performance.md#efficient-algorithms Appending one rule is amortized O(1); a capacity growth copies the existing n rule references, O(n) for that call. The registry stores O(n) entries without an extra per-registration traversal.
|
|
995
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work Registration records an initialization effect, not a completed/in-flight query coordinator. The host owns one-time bootstrap and name collision policy; equal Rule values do not authorize suppressing a registration here.
|
|
996
|
+
// @evidence contracts/performance.md#bound-retention-and-release-resources The registry retains O(n) rule references and slice capacity for the process lifetime with no release. Supported registration ends at initialization, so n is the configured contributor population; the function enforces no numeric cap or runtime reclamation and the host later shares those rule objects.
|
|
559
997
|
func Register(r Rule) {
|
|
560
998
|
if r == nil {
|
|
561
999
|
panic("rule: Register called with nil rule")
|
|
@@ -566,6 +1004,16 @@ func Register(r Rule) {
|
|
|
566
1004
|
// Registered returns every contributor rule registered via `Register`.
|
|
567
1005
|
// Called once by the host during engine bootstrap. The returned slice is
|
|
568
1006
|
// a defensive copy so the host cannot mutate the registry.
|
|
1007
|
+
// Rule objects remain shared; callers must not mutate registered implementations.
|
|
1008
|
+
//
|
|
1009
|
+
// @evidence contracts/common.md#principled-implementation Allocating and copying the registry slice isolates membership from caller slice writes while sharing the registered rule values.
|
|
1010
|
+
// @evidence contracts/common.md#clear-and-simple-design One accessor exposes registration results without backing-slice ownership.
|
|
1011
|
+
// @evidence contracts/common.md#prohibited-implementation-shortcuts Callers read through the supported defensive accessor instead of replacing registry entries.
|
|
1012
|
+
// @evidence contracts/common.md#meaningful-documentation Native prose states bootstrap use and distinguishes slice copying from shared rule values; tags follow documentation guidance.
|
|
1013
|
+
// @evidenceExclude contracts/portability.md#os-neutral-implementation Registered copies an in-memory registry and touches no filesystem path or process.
|
|
1014
|
+
// @evidence contracts/performance.md#efficient-algorithms Allocating and copying n Rule references costs O(n) work and returned storage. It copies slice membership only, without traversing or cloning implementations.
|
|
1015
|
+
// @evidenceExclude contracts/performance.md#reuse-equivalent-work The accessor creates caller-owned mutable slice membership, not a request cache or coordinator. Rule objects remain shared, but reusing one writable slice for separate callers would expose their membership mutations to each other.
|
|
1016
|
+
// @evidence contracts/performance.md#bound-retention-and-release-resources Each call transfers O(n) owned slice storage to its caller while retaining references to shared rule objects. Caller release reclaims its slice; the registry and implementations remain process-owned. No historical copy cache, handle or running task is created.
|
|
569
1017
|
func Registered() []Rule {
|
|
570
1018
|
out := make([]Rule, len(registry))
|
|
571
1019
|
copy(out, registry)
|