From 98caa69a21550adbb6034923f11f50f1dc0636e6 Mon Sep 17 00:00:00 2001 From: Daiki Nishikawa Date: Sat, 9 Sep 2023 23:34:11 +0900 Subject: [PATCH] chore: rename some crates (#212) --- .cargo/config.toml | 4 +- .github/labeler.yml | 2 +- Cargo.lock | 132 +++++++++--------- Cargo.toml | 6 +- crates/biome_analyze/Cargo.toml | 2 +- crates/biome_analyze/src/diagnostics.rs | 6 +- crates/biome_analyze/src/lib.rs | 2 +- crates/biome_analyze/src/rule.rs | 4 +- crates/biome_analyze/src/signals.rs | 2 +- crates/biome_cli/Cargo.toml | 4 +- crates/biome_cli/src/commands/daemon.rs | 2 +- crates/biome_cli/src/commands/init.rs | 2 +- crates/biome_cli/src/commands/rage.rs | 4 +- crates/biome_cli/src/commands/version.rs | 4 +- crates/biome_cli/src/configuration.rs | 6 +- crates/biome_cli/src/diagnostics.rs | 4 +- crates/biome_cli/src/execute/migrate.rs | 2 +- crates/biome_cli/src/execute/std_in.rs | 2 +- crates/biome_cli/src/execute/traverse.rs | 2 +- crates/biome_cli/src/lib.rs | 2 +- crates/biome_cli/src/main.rs | 2 +- crates/biome_cli/src/vcs.rs | 4 +- .../tests/cases/biome_json_support.rs | 2 +- .../biome_cli/tests/cases/config_extends.rs | 2 +- crates/biome_cli/tests/commands/check.rs | 2 +- crates/biome_cli/tests/commands/ci.rs | 2 +- crates/biome_cli/tests/commands/format.rs | 2 +- crates/biome_cli/tests/commands/init.rs | 2 +- crates/biome_cli/tests/commands/lint.rs | 2 +- crates/biome_cli/tests/commands/lsp_proxy.rs | 2 +- crates/biome_cli/tests/commands/migrate.rs | 2 +- crates/biome_cli/tests/commands/rage.rs | 2 +- crates/biome_cli/tests/commands/version.rs | 2 +- crates/biome_cli/tests/main.rs | 4 +- crates/biome_cli/tests/snap_test.rs | 4 +- .../CODESPAN_LICENSE | 0 .../Cargo.toml | 4 +- .../{rome_console => biome_console}/LICENSE | 0 .../{rome_console => biome_console}/README.md | 4 +- .../src/fmt.rs | 8 +- .../src/lib.rs | 0 .../src/markup.rs | 0 .../src/write.rs | 0 .../src/write/html.rs | 0 .../src/write/termcolor.rs | 2 +- .../tests/macro.rs | 2 +- .../tests/markup/closing_element_mismatch.rs | 2 +- .../markup/closing_element_mismatch.stderr | 0 .../markup/closing_element_standalone.rs | 2 +- .../markup/closing_element_standalone.stderr | 0 .../tests/markup/element_non_ident_name.rs | 2 +- .../markup/element_non_ident_name.stderr | 0 .../tests/markup/invalid_group.rs | 2 +- .../tests/markup/invalid_group.stderr | 0 .../tests/markup/invalid_punct.rs | 2 +- .../tests/markup/invalid_punct.stderr | 0 .../markup/open_element_improper_close_1.rs | 2 +- .../open_element_improper_close_1.stderr | 0 .../markup/open_element_improper_close_2.rs | 2 +- .../open_element_improper_close_2.stderr | 0 .../open_element_improper_prop_value.rs | 2 +- .../open_element_improper_prop_value.stderr | 0 .../markup/open_element_missing_prop_value.rs | 2 +- .../open_element_missing_prop_value.stderr | 0 .../tests/markup/open_element_unfinished_1.rs | 2 +- .../markup/open_element_unfinished_1.stderr | 9 ++ .../tests/markup/open_element_unfinished_2.rs | 2 +- .../markup/open_element_unfinished_2.stderr | 9 ++ .../tests/markup/open_element_unfinished_3.rs | 2 +- .../markup/open_element_unfinished_3.stderr | 9 ++ .../tests/markup/open_element_unfinished_4.rs | 2 +- .../markup/open_element_unfinished_4.stderr | 9 ++ .../tests/markup/open_element_unfinished_5.rs | 2 +- .../markup/open_element_unfinished_5.stderr | 9 ++ .../tests/markup/open_element_unfinished_6.rs | 2 +- .../markup/open_element_unfinished_6.stderr | 9 ++ .../tests/markup/open_element_unfinished_7.rs | 2 +- .../markup/open_element_unfinished_7.stderr | 9 ++ .../tests/markup/unclosed_element.rs | 2 +- .../tests/markup/unclosed_element.stderr | 0 .../Cargo.toml | 2 +- .../src/builder.rs | 0 .../src/lib.rs | 0 crates/biome_css_parser/Cargo.toml | 2 +- crates/biome_css_parser/tests/spec_test.rs | 4 +- .../Cargo.toml | 4 +- .../src/diagnostics.rs | 4 +- .../src/json.rs | 12 +- .../src/lib.rs | 0 .../src/string_set.rs | 0 .../src/visitor.rs | 0 crates/biome_diagnostics/Cargo.toml | 2 +- crates/biome_diagnostics/examples/cli.rs | 2 +- crates/biome_diagnostics/examples/fs.rs | 2 +- crates/biome_diagnostics/examples/lint.rs | 2 +- crates/biome_diagnostics/examples/serde.rs | 2 +- crates/biome_diagnostics/src/adapters.rs | 2 +- crates/biome_diagnostics/src/advice.rs | 4 +- crates/biome_diagnostics/src/context.rs | 4 +- crates/biome_diagnostics/src/diagnostic.rs | 2 +- crates/biome_diagnostics/src/display.rs | 6 +- .../src/display/backtrace.rs | 2 +- crates/biome_diagnostics/src/display/diff.rs | 4 +- crates/biome_diagnostics/src/display/frame.rs | 2 +- .../biome_diagnostics/src/display/message.rs | 6 +- crates/biome_diagnostics/src/error.rs | 2 +- crates/biome_diagnostics/src/lib.rs | 6 +- crates/biome_diagnostics/src/serde.rs | 2 +- crates/biome_diagnostics/src/suggestion.rs | 2 +- .../biome_diagnostics_macros/src/generate.rs | 4 +- crates/biome_lsp/Cargo.toml | 2 +- crates/biome_lsp/src/server.rs | 2 +- crates/biome_lsp/src/session.rs | 2 +- crates/biome_lsp/src/utils.rs | 6 +- crates/biome_markup/README.md | 4 +- crates/biome_markup/src/lib.rs | 10 +- crates/biome_parser/Cargo.toml | 2 +- crates/biome_parser/src/diagnostic.rs | 8 +- crates/biome_parser/src/lib.rs | 2 +- crates/biome_suppression/Cargo.toml | 2 +- crates/biome_suppression/src/lib.rs | 4 +- crates/biome_test_utils/Cargo.toml | 4 +- crates/biome_test_utils/src/lib.rs | 12 +- crates/biome_wasm/Cargo.toml | 2 +- crates/biome_wasm/src/utils.rs | 4 +- .../markup/open_element_unfinished_1.stderr | 9 -- .../markup/open_element_unfinished_2.stderr | 9 -- .../markup/open_element_unfinished_3.stderr | 9 -- .../markup/open_element_unfinished_4.stderr | 9 -- .../markup/open_element_unfinished_5.stderr | 9 -- .../markup/open_element_unfinished_6.stderr | 9 -- .../markup/open_element_unfinished_7.stderr | 9 -- crates/rome_formatter/Cargo.toml | 2 +- crates/rome_formatter/src/diagnostics.rs | 4 +- crates/rome_formatter_test/Cargo.toml | 2 +- crates/rome_formatter_test/src/spec.rs | 2 +- crates/rome_fs/Cargo.toml | 2 +- crates/rome_js_analyze/Cargo.toml | 8 +- .../src/analyzers/a11y/no_access_key.rs | 2 +- .../src/analyzers/a11y/no_auto_focus.rs | 2 +- .../src/analyzers/a11y/no_blank_target.rs | 2 +- .../analyzers/a11y/no_distracting_elements.rs | 2 +- .../src/analyzers/a11y/no_header_scope.rs | 2 +- .../src/analyzers/a11y/no_redundant_alt.rs | 2 +- .../analyzers/a11y/no_svg_without_title.rs | 2 +- .../src/analyzers/a11y/use_alt_text.rs | 2 +- .../src/analyzers/a11y/use_anchor_content.rs | 2 +- .../src/analyzers/a11y/use_heading_content.rs | 2 +- .../src/analyzers/a11y/use_html_lang.rs | 2 +- .../src/analyzers/a11y/use_iframe_title.rs | 2 +- .../a11y/use_key_with_click_events.rs | 2 +- .../a11y/use_key_with_mouse_events.rs | 2 +- .../src/analyzers/a11y/use_media_caption.rs | 2 +- .../src/analyzers/a11y/use_valid_anchor.rs | 2 +- .../complexity/no_extra_boolean_cast.rs | 2 +- .../src/analyzers/complexity/no_for_each.rs | 2 +- ...e_spaces_in_regular_expression_literals.rs | 2 +- .../analyzers/complexity/no_useless_catch.rs | 2 +- .../complexity/no_useless_constructor.rs | 2 +- .../analyzers/complexity/no_useless_label.rs | 2 +- .../analyzers/complexity/no_useless_rename.rs | 2 +- .../complexity/no_useless_switch_case.rs | 2 +- .../complexity/no_useless_type_constraint.rs | 2 +- .../src/analyzers/complexity/no_with.rs | 2 +- .../src/analyzers/complexity/use_flat_map.rs | 2 +- .../analyzers/complexity/use_literal_keys.rs | 2 +- .../complexity/use_optional_chain.rs | 2 +- .../complexity/use_simple_number_keys.rs | 2 +- .../use_simplified_logic_expression.rs | 2 +- .../correctness/no_constructor_return.rs | 2 +- .../analyzers/correctness/no_empty_pattern.rs | 2 +- .../correctness/no_inner_declarations.rs | 2 +- .../no_invalid_constructor_super.rs | 2 +- .../correctness/no_precision_loss.rs | 2 +- .../analyzers/correctness/no_setter_return.rs | 2 +- .../correctness/no_string_case_mismatch.rs | 2 +- .../correctness/no_switch_declarations.rs | 2 +- .../correctness/no_unnecessary_continue.rs | 2 +- .../analyzers/correctness/no_unreachable.rs | 4 +- .../correctness/no_unreachable_super.rs | 4 +- .../correctness/no_unsafe_finally.rs | 2 +- .../no_unsafe_optional_chaining.rs | 2 +- .../analyzers/correctness/no_unused_labels.rs | 2 +- .../correctness/no_void_type_return.rs | 2 +- .../correctness/use_valid_for_direction.rs | 2 +- .../src/analyzers/correctness/use_yield.rs | 2 +- .../analyzers/nursery/no_confusing_arrow.rs | 2 +- .../nursery/no_confusing_void_type.rs | 2 +- .../nursery/no_control_characters_in_regex.rs | 2 +- .../nursery/no_excessive_complexity.rs | 6 +- .../nursery/no_fallthrough_switch_clause.rs | 8 +- .../nursery/no_nonoctal_decimal_escape.rs | 2 +- .../src/analyzers/nursery/no_self_assign.rs | 2 +- .../analyzers/nursery/no_static_only_class.rs | 2 +- .../nursery/no_useless_empty_export.rs | 2 +- .../src/analyzers/nursery/no_void.rs | 2 +- .../analyzers/nursery/use_arrow_function.rs | 2 +- .../nursery/use_collapsed_else_if.rs | 2 +- .../analyzers/nursery/use_getter_return.rs | 4 +- .../nursery/use_grouped_type_import.rs | 2 +- .../nursery/use_import_restrictions.rs | 2 +- .../nursery/use_literal_enum_members.rs | 2 +- .../src/analyzers/performance/no_delete.rs | 2 +- .../analyzers/style/no_implicit_boolean.rs | 2 +- .../analyzers/style/no_inferrable_types.rs | 2 +- .../src/analyzers/style/no_namespace.rs | 2 +- .../src/analyzers/style/no_negation_else.rs | 2 +- .../analyzers/style/no_non_null_assertion.rs | 2 +- .../style/no_parameter_properties.rs | 2 +- .../style/no_unused_template_literal.rs | 2 +- .../analyzers/style/use_block_statements.rs | 2 +- .../style/use_default_parameter_last.rs | 2 +- .../analyzers/style/use_enum_initializers.rs | 2 +- .../style/use_exponentiation_operator.rs | 2 +- .../analyzers/style/use_numeric_literals.rs | 2 +- .../style/use_self_closing_elements.rs | 2 +- .../style/use_shorthand_array_type.rs | 2 +- .../style/use_single_case_statement.rs | 2 +- .../style/use_single_var_declarator.rs | 2 +- .../src/analyzers/style/use_template.rs | 2 +- .../src/analyzers/style/use_while.rs | 2 +- .../suspicious/no_assign_in_expressions.rs | 2 +- .../suspicious/no_async_promise_executor.rs | 2 +- .../analyzers/suspicious/no_comment_text.rs | 2 +- .../suspicious/no_compare_neg_zero.rs | 2 +- .../suspicious/no_confusing_labels.rs | 2 +- .../src/analyzers/suspicious/no_const_enum.rs | 2 +- .../src/analyzers/suspicious/no_debugger.rs | 2 +- .../analyzers/suspicious/no_double_equals.rs | 2 +- .../suspicious/no_duplicate_jsx_props.rs | 2 +- .../suspicious/no_duplicate_object_keys.rs | 2 +- .../suspicious/no_empty_interface.rs | 2 +- .../analyzers/suspicious/no_explicit_any.rs | 2 +- .../suspicious/no_extra_non_null_assertion.rs | 2 +- .../suspicious/no_prototype_builtins.rs | 2 +- .../suspicious/no_redundant_use_strict.rs | 2 +- .../suspicious/no_shadow_restricted_names.rs | 2 +- .../analyzers/suspicious/no_sparse_array.rs | 2 +- .../suspicious/no_unsafe_negation.rs | 2 +- .../use_default_switch_clause_last.rs | 2 +- .../suspicious/use_namespace_keyword.rs | 2 +- .../analyzers/suspicious/use_valid_typeof.rs | 2 +- ...interactive_element_to_interactive_role.rs | 2 +- .../a11y/use_aria_props_for_role.rs | 2 +- .../a11y/use_valid_aria_props.rs | 2 +- .../src/aria_analyzers/a11y/use_valid_lang.rs | 2 +- .../nursery/no_aria_unsupported_elements.rs | 2 +- .../nursery/no_noninteractive_tabindex.rs | 2 +- .../nursery/no_redundant_roles.rs | 2 +- .../nursery/use_aria_prop_types.rs | 2 +- .../src/assists/correctness/flip_bin_exp.rs | 2 +- .../assists/correctness/inline_variable.rs | 2 +- .../assists/correctness/organize_imports.rs | 2 +- crates/rome_js_analyze/src/control_flow.rs | 4 +- .../src/control_flow/nodes/block.rs | 2 +- .../src/control_flow/nodes/do_while.rs | 2 +- .../src/control_flow/nodes/for_in.rs | 2 +- .../src/control_flow/nodes/for_of.rs | 2 +- .../src/control_flow/nodes/for_stmt.rs | 2 +- .../src/control_flow/nodes/if_stmt.rs | 2 +- .../src/control_flow/nodes/switch_stmt.rs | 2 +- .../src/control_flow/nodes/try_catch.rs | 2 +- .../src/control_flow/nodes/while_stmt.rs | 2 +- crates/rome_js_analyze/src/lib.rs | 8 +- crates/rome_js_analyze/src/options.rs | 4 +- .../a11y/no_positive_tabindex.rs | 2 +- .../a11y/use_button_type.rs | 2 +- .../complexity/no_useless_fragments.rs | 2 +- .../correctness/no_children_prop.rs | 2 +- .../correctness/no_const_assign.rs | 2 +- .../correctness/no_global_object_calls.rs | 2 +- .../correctness/no_new_symbol.rs | 2 +- .../correctness/no_render_return_value.rs | 2 +- .../correctness/no_undeclared_variables.rs | 2 +- .../correctness/no_unused_variables.rs | 2 +- .../no_void_elements_with_children.rs | 2 +- .../nursery/no_accumulating_spread.rs | 2 +- .../nursery/no_banned_types.rs | 2 +- .../nursery/no_constant_condition.rs | 2 +- .../nursery/no_global_is_finite.rs | 2 +- .../nursery/no_global_is_nan.rs | 2 +- .../nursery/no_unsafe_declaration_merging.rs | 2 +- .../nursery/no_useless_this_alias.rs | 2 +- .../nursery/use_exhaustive_dependencies.rs | 6 +- .../nursery/use_hook_at_top_level.rs | 2 +- .../nursery/use_is_array.rs | 2 +- .../nursery/use_naming_convention.rs | 10 +- .../security/no_dangerously_set_inner_html.rs | 2 +- ...angerously_set_inner_html_with_children.rs | 2 +- .../semantic_analyzers/style/no_arguments.rs | 2 +- .../style/no_parameter_assign.rs | 2 +- .../style/no_restricted_globals.rs | 6 +- .../style/no_shouty_constants.rs | 2 +- .../src/semantic_analyzers/style/no_var.rs | 2 +- .../src/semantic_analyzers/style/use_const.rs | 2 +- .../style/use_fragment_syntax.rs | 2 +- .../suspicious/no_array_index_key.rs | 2 +- .../suspicious/no_catch_assign.rs | 2 +- .../suspicious/no_class_assign.rs | 2 +- .../suspicious/no_console_log.rs | 2 +- .../suspicious/no_duplicate_parameters.rs | 2 +- .../suspicious/no_function_assign.rs | 2 +- .../suspicious/no_import_assign.rs | 2 +- .../suspicious/no_label_var.rs | 2 +- .../suspicious/no_redeclare.rs | 2 +- .../nursery/no_super_without_extends.rs | 2 +- crates/rome_js_analyze/src/utils/rename.rs | 4 +- crates/rome_js_formatter/Cargo.toml | 2 +- crates/rome_js_formatter/src/context.rs | 4 +- .../src/context/trailing_comma.rs | 4 +- crates/rome_js_parser/Cargo.toml | 2 +- .../src/parser/rewrite_parser.rs | 2 +- crates/rome_js_parser/src/test_utils.rs | 4 +- crates/rome_js_parser/src/tests.rs | 4 +- crates/rome_js_semantic/Cargo.toml | 2 +- .../rome_js_semantic/src/tests/assertions.rs | 2 +- crates/rome_js_syntax/Cargo.toml | 2 +- crates/rome_js_syntax/src/suppression.rs | 4 +- crates/rome_js_transform/Cargo.toml | 2 +- crates/rome_json_analyze/Cargo.toml | 2 +- .../nursery/no_duplicate_json_keys.rs | 2 +- crates/rome_json_analyze/src/lib.rs | 4 +- crates/rome_json_parser/Cargo.toml | 2 +- crates/rome_json_parser/tests/spec_test.rs | 4 +- crates/rome_service/Cargo.toml | 4 +- .../src/configuration/diagnostics.rs | 10 +- .../src/configuration/formatter.rs | 2 +- .../src/configuration/javascript.rs | 2 +- .../src/configuration/linter/mod.rs | 2 +- crates/rome_service/src/configuration/mod.rs | 4 +- .../src/configuration/organize_imports.rs | 2 +- .../configuration/parse/json/configuration.rs | 4 +- .../src/configuration/parse/json/files.rs | 4 +- .../src/configuration/parse/json/formatter.rs | 6 +- .../configuration/parse/json/javascript.rs | 4 +- .../parse/json/json_configuration.rs | 4 +- .../src/configuration/parse/json/linter.rs | 6 +- .../src/configuration/parse/json/mod.rs | 4 +- .../parse/json/organize_imports.rs | 4 +- .../src/configuration/parse/json/rules.rs | 4 +- .../src/configuration/parse/json/vcs.rs | 6 +- crates/rome_service/src/diagnostics.rs | 12 +- crates/rome_service/src/file_handlers/json.rs | 2 +- crates/rome_service/src/file_handlers/mod.rs | 8 +- crates/rome_service/src/lib.rs | 2 +- crates/rome_service/src/matcher/mod.rs | 4 +- crates/rome_service/src/workspace.rs | 2 +- crates/rome_service/tests/spec_tests.rs | 2 +- .../src/content/docs/internals/credits.mdx | 2 +- xtask/bench/Cargo.toml | 2 +- xtask/codegen/src/generate_configuration.rs | 4 +- xtask/codegen/src/generate_new_lintrule.rs | 2 +- xtask/coverage/Cargo.toml | 2 +- xtask/lintdoc/Cargo.toml | 2 +- xtask/lintdoc/src/main.rs | 18 +-- 355 files changed, 574 insertions(+), 574 deletions(-) rename crates/{rome_console => biome_console}/CODESPAN_LICENSE (100%) rename crates/{rome_console => biome_console}/Cargo.toml (88%) rename crates/{rome_console => biome_console}/LICENSE (100%) rename crates/{rome_console => biome_console}/README.md (93%) rename crates/{rome_console => biome_console}/src/fmt.rs (97%) rename crates/{rome_console => biome_console}/src/lib.rs (100%) rename crates/{rome_console => biome_console}/src/markup.rs (100%) rename crates/{rome_console => biome_console}/src/write.rs (100%) rename crates/{rome_console => biome_console}/src/write/html.rs (100%) rename crates/{rome_console => biome_console}/src/write/termcolor.rs (99%) rename crates/{rome_console => biome_console}/tests/macro.rs (95%) rename crates/{rome_console => biome_console}/tests/markup/closing_element_mismatch.rs (61%) rename crates/{rome_console => biome_console}/tests/markup/closing_element_mismatch.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/closing_element_standalone.rs (57%) rename crates/{rome_console => biome_console}/tests/markup/closing_element_standalone.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/element_non_ident_name.rs (59%) rename crates/{rome_console => biome_console}/tests/markup/element_non_ident_name.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/invalid_group.rs (51%) rename crates/{rome_console => biome_console}/tests/markup/invalid_group.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/invalid_punct.rs (50%) rename crates/{rome_console => biome_console}/tests/markup/invalid_punct.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/open_element_improper_close_1.rs (58%) rename crates/{rome_console => biome_console}/tests/markup/open_element_improper_close_1.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/open_element_improper_close_2.rs (62%) rename crates/{rome_console => biome_console}/tests/markup/open_element_improper_close_2.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/open_element_improper_prop_value.rs (65%) rename crates/{rome_console => biome_console}/tests/markup/open_element_improper_prop_value.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/open_element_missing_prop_value.rs (63%) rename crates/{rome_console => biome_console}/tests/markup/open_element_missing_prop_value.stderr (100%) rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_1.rs (50%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_1.stderr rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_2.rs (56%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_2.stderr rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_3.rs (57%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_3.stderr rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_4.rs (59%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_4.stderr rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_5.rs (60%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_5.stderr rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_6.rs (61%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_6.stderr rename crates/{rome_console => biome_console}/tests/markup/open_element_unfinished_7.rs (61%) create mode 100644 crates/biome_console/tests/markup/open_element_unfinished_7.stderr rename crates/{rome_console => biome_console}/tests/markup/unclosed_element.rs (57%) rename crates/{rome_console => biome_console}/tests/markup/unclosed_element.stderr (100%) rename crates/{rome_control_flow => biome_control_flow}/Cargo.toml (87%) rename crates/{rome_control_flow => biome_control_flow}/src/builder.rs (100%) rename crates/{rome_control_flow => biome_control_flow}/src/lib.rs (100%) rename crates/{rome_deserialize => biome_deserialize}/Cargo.toml (89%) rename crates/{rome_deserialize => biome_deserialize}/src/diagnostics.rs (98%) rename crates/{rome_deserialize => biome_deserialize}/src/json.rs (98%) rename crates/{rome_deserialize => biome_deserialize}/src/lib.rs (100%) rename crates/{rome_deserialize => biome_deserialize}/src/string_set.rs (100%) rename crates/{rome_deserialize => biome_deserialize}/src/visitor.rs (100%) delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_1.stderr delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_2.stderr delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_3.stderr delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_4.stderr delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_5.stderr delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_6.stderr delete mode 100644 crates/rome_console/tests/markup/open_element_unfinished_7.stderr diff --git a/.cargo/config.toml b/.cargo/config.toml index 751f122707c1..9cfd0de2e749 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -14,7 +14,7 @@ coverage = "run -p xtask_coverage --profile=release-with-debug --" documentation = """ doc \ -p rome_*formatter \ - -p rome_control_flow \ + -p biome_control_flow \ -p biome_analyze \ -p rome_*analyze \ -p rome_*_syntax \ @@ -22,7 +22,7 @@ documentation = """ -p biome_diagnostics \ -p rome_service \ -p biome_cli \ - -p rome_console \ + -p biome_console \ -p rome_*parser \ -p biome_text_edit \ -p biome_text_size \ diff --git a/.github/labeler.yml b/.github/labeler.yml index 1a8c99628d1d..de0c69891e57 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -3,7 +3,7 @@ A-Cli: - crates/biome_cli/** - crates/rome_fs/** - - crates/rome_console/** + - crates/biome_console/** A-Core: - crates/rome_deserializer/** diff --git a/Cargo.lock b/Cargo.lock index 350d57b89b5f..48c7ea4b403e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,9 +133,9 @@ dependencies = [ name = "biome_analyze" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", "bitflags 2.3.3", - "rome_console", "rome_rowan", "rustc-hash", "schemars", @@ -164,6 +164,8 @@ name = "biome_cli" version = "0.0.0" dependencies = [ "anyhow", + "biome_console", + "biome_deserialize", "biome_diagnostics", "biome_flags", "biome_lsp", @@ -180,8 +182,6 @@ dependencies = [ "libc", "mimalloc", "rayon", - "rome_console", - "rome_deserialize", "rome_formatter", "rome_fs", "rome_js_formatter", @@ -200,6 +200,27 @@ dependencies = [ "tracing-tree", ] +[[package]] +name = "biome_console" +version = "0.0.1" +dependencies = [ + "atty", + "biome_markup", + "biome_text_size", + "schemars", + "serde", + "termcolor", + "trybuild", + "unicode-width", +] + +[[package]] +name = "biome_control_flow" +version = "0.2.0" +dependencies = [ + "rome_rowan", +] + [[package]] name = "biome_css_factory" version = "0.2.0" @@ -212,6 +233,7 @@ dependencies = [ name = "biome_css_parser" version = "0.1.0" dependencies = [ + "biome_console", "biome_css_factory", "biome_css_syntax", "biome_diagnostics", @@ -220,7 +242,6 @@ dependencies = [ "insta", "quickcheck", "quickcheck_macros", - "rome_console", "rome_rowan", "tests_macros", "tracing", @@ -233,18 +254,34 @@ dependencies = [ "rome_rowan", ] +[[package]] +name = "biome_deserialize" +version = "0.2.0" +dependencies = [ + "biome_console", + "biome_diagnostics", + "indexmap", + "rome_json_parser", + "rome_json_syntax", + "rome_rowan", + "schemars", + "serde", + "serde_json", + "tracing", +] + [[package]] name = "biome_diagnostics" version = "0.2.0" dependencies = [ "backtrace", + "biome_console", "biome_diagnostics_categories", "biome_diagnostics_macros", "biome_text_edit", "biome_text_size", "bitflags 2.3.3", "bpaf", - "rome_console", "rome_rowan", "schemars", "serde", @@ -287,12 +324,12 @@ version = "0.0.0" dependencies = [ "anyhow", "biome_analyze", + "biome_console", "biome_diagnostics", "biome_text_edit", "futures", "indexmap", "proptest", - "rome_console", "rome_formatter", "rome_fs", "rome_js_formatter", @@ -331,9 +368,9 @@ dependencies = [ name = "biome_parser" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", "drop_bomb", - "rome_console", "rome_rowan", ] @@ -341,8 +378,8 @@ dependencies = [ name = "biome_suppression" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", - "rome_console", "rome_rowan", ] @@ -351,11 +388,11 @@ name = "biome_test_utils" version = "0.1.0" dependencies = [ "biome_analyze", + "biome_console", + "biome_deserialize", "biome_diagnostics", "countme", "json_comments", - "rome_console", - "rome_deserialize", "rome_js_parser", "rome_js_syntax", "rome_json_parser", @@ -391,11 +428,11 @@ dependencies = [ name = "biome_wasm" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", "console_error_panic_hook", "js-sys", "quote", - "rome_console", "rome_js_factory", "rome_js_formatter", "rome_rowan", @@ -2033,54 +2070,17 @@ dependencies = [ "retain_mut", ] -[[package]] -name = "rome_console" -version = "0.0.1" -dependencies = [ - "atty", - "biome_markup", - "biome_text_size", - "schemars", - "serde", - "termcolor", - "trybuild", - "unicode-width", -] - -[[package]] -name = "rome_control_flow" -version = "0.2.0" -dependencies = [ - "rome_rowan", -] - -[[package]] -name = "rome_deserialize" -version = "0.2.0" -dependencies = [ - "biome_diagnostics", - "indexmap", - "rome_console", - "rome_json_parser", - "rome_json_syntax", - "rome_rowan", - "schemars", - "serde", - "serde_json", - "tracing", -] - [[package]] name = "rome_formatter" version = "0.1.0" dependencies = [ + "biome_console", "biome_diagnostics", "cfg-if", "countme", "drop_bomb", "indexmap", "insta", - "rome_console", "rome_js_parser", "rome_js_syntax", "rome_rowan", @@ -2095,10 +2095,10 @@ dependencies = [ name = "rome_formatter_test" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", "biome_parser", "insta", - "rome_console", "rome_formatter", "rome_fs", "rome_rowan", @@ -2113,12 +2113,12 @@ dependencies = [ name = "rome_fs" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", "crossbeam", "indexmap", "parking_lot", "rayon", - "rome_console", "schemars", "serde", "tracing", @@ -2130,6 +2130,9 @@ version = "0.2.0" dependencies = [ "biome_analyze", "biome_aria", + "biome_console", + "biome_control_flow", + "biome_deserialize", "biome_diagnostics", "biome_js_unicode_table", "biome_test_utils", @@ -2140,9 +2143,6 @@ dependencies = [ "lazy_static", "natord", "roaring", - "rome_console", - "rome_control_flow", - "rome_deserialize", "rome_js_factory", "rome_js_parser", "rome_js_semantic", @@ -2170,6 +2170,7 @@ dependencies = [ name = "rome_js_formatter" version = "0.1.0" dependencies = [ + "biome_deserialize", "biome_diagnostics", "biome_diagnostics_categories", "biome_parser", @@ -2180,7 +2181,6 @@ dependencies = [ "insta", "quickcheck", "quickcheck_macros", - "rome_deserialize", "rome_formatter", "rome_formatter_test", "rome_fs", @@ -2201,6 +2201,7 @@ dependencies = [ name = "rome_js_parser" version = "0.1.0" dependencies = [ + "biome_console", "biome_diagnostics", "biome_js_unicode_table", "biome_parser", @@ -2211,7 +2212,6 @@ dependencies = [ "indexmap", "quickcheck", "quickcheck_macros", - "rome_console", "rome_js_factory", "rome_js_parser", "rome_js_syntax", @@ -2228,9 +2228,9 @@ dependencies = [ name = "rome_js_semantic" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", "biome_markup", - "rome_console", "rome_js_parser", "rome_js_syntax", "rome_rowan", @@ -2242,8 +2242,8 @@ dependencies = [ name = "rome_js_syntax" version = "0.2.0" dependencies = [ + "biome_console", "biome_diagnostics", - "rome_console", "rome_js_factory", "rome_rowan", "schemars", @@ -2255,11 +2255,11 @@ name = "rome_js_transform" version = "0.2.0" dependencies = [ "biome_analyze", + "biome_console", "biome_diagnostics", "biome_test_utils", "insta", "lazy_static", - "rome_console", "rome_js_factory", "rome_js_formatter", "rome_js_parser", @@ -2273,11 +2273,11 @@ name = "rome_json_analyze" version = "0.2.0" dependencies = [ "biome_analyze", + "biome_console", "biome_diagnostics", "biome_test_utils", "insta", "lazy_static", - "rome_console", "rome_json_factory", "rome_json_parser", "rome_json_syntax", @@ -2319,13 +2319,13 @@ dependencies = [ name = "rome_json_parser" version = "0.1.0" dependencies = [ + "biome_console", "biome_diagnostics", "biome_js_unicode_table", "biome_parser", "insta", "quickcheck", "quickcheck_macros", - "rome_console", "rome_json_factory", "rome_json_syntax", "rome_rowan", @@ -2364,6 +2364,8 @@ name = "rome_service" version = "0.0.0" dependencies = [ "biome_analyze", + "biome_console", + "biome_deserialize", "biome_diagnostics", "biome_flags", "biome_parser", @@ -2372,8 +2374,6 @@ dependencies = [ "dashmap", "indexmap", "insta", - "rome_console", - "rome_deserialize", "rome_formatter", "rome_fs", "rome_js_analyze", @@ -3524,6 +3524,7 @@ version = "0.0.0" dependencies = [ "ansi_rgb", "biome_analyze", + "biome_console", "biome_diagnostics", "biome_parser", "countme", @@ -3534,7 +3535,6 @@ dependencies = [ "mimalloc", "pico-args", "regex", - "rome_console", "rome_formatter", "rome_js_analyze", "rome_js_formatter", @@ -3607,6 +3607,7 @@ dependencies = [ "ascii_table", "atty", "backtrace", + "biome_console", "biome_diagnostics", "biome_parser", "colored", @@ -3614,7 +3615,6 @@ dependencies = [ "once_cell", "pico-args", "regex", - "rome_console", "rome_js_parser", "rome_js_semantic", "rome_js_syntax", @@ -3649,10 +3649,10 @@ name = "xtask_lintdoc" version = "0.0.0" dependencies = [ "biome_analyze", + "biome_console", "biome_diagnostics", "convert_case", "pulldown-cmark", - "rome_console", "rome_formatter", "rome_js_analyze", "rome_js_parser", diff --git a/Cargo.toml b/Cargo.toml index 01177956baff..11234724eba8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,9 +29,12 @@ biome_analyze = { path = "./crates/biome_analyze" } biome_aria = { path = "./crates/biome_aria" } biome_aria_metadata = { path = "./crates/biome_aria_metadata" } biome_cli = { path = "./crates/biome_cli" } +biome_console = { version = "0.0.1", path = "./crates/biome_console" } +biome_control_flow = { path = "./crates/biome_control_flow" } biome_css_factory = { path = "./crates/biome_css_factory" } biome_css_parser = { path = "./crates/biome_css_parser" } biome_css_syntax = { path = "./crates/biome_css_syntax" } +biome_deserialize = { version = "0.2.0", path = "./crates/biome_deserialize" } biome_diagnostics = { version = "0.2.0", path = "./crates/biome_diagnostics" } biome_diagnostics_categories = { version = "0.2.0", path = "./crates/biome_diagnostics_categories" } biome_diagnostics_macros = { version = "0.0.1", path = "./crates/biome_diagnostics_macros" } @@ -45,9 +48,6 @@ biome_suppression = { version = "0.2.0", path = "./crates/biome_suppr biome_test_utils = { path = "./crates/biome_test_utils" } biome_text_edit = { version = "0.0.1", path = "./crates/biome_text_edit" } biome_text_size = { version = "0.0.1", path = "./crates/biome_text_size" } -rome_console = { version = "0.0.1", path = "./crates/rome_console" } -rome_control_flow = { path = "./crates/rome_control_flow" } -rome_deserialize = { version = "0.2.0", path = "./crates/rome_deserialize" } rome_formatter = { version = "0.1.0", path = "./crates/rome_formatter" } rome_formatter_test = { path = "./crates/rome_formatter_test" } rome_fs = { path = "./crates/rome_fs" } diff --git a/crates/biome_analyze/Cargo.toml b/crates/biome_analyze/Cargo.toml index 322ab39689f0..c5238e7bab1d 100644 --- a/crates/biome_analyze/Cargo.toml +++ b/crates/biome_analyze/Cargo.toml @@ -9,9 +9,9 @@ version = "0.2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } bitflags = { workspace = true } -rome_console = { workspace = true } rome_rowan = { workspace = true } rustc-hash = { workspace = true } schemars = { workspace = true, optional = true } diff --git a/crates/biome_analyze/src/diagnostics.rs b/crates/biome_analyze/src/diagnostics.rs index 45e6b534ae28..93aa742ea655 100644 --- a/crates/biome_analyze/src/diagnostics.rs +++ b/crates/biome_analyze/src/diagnostics.rs @@ -1,8 +1,8 @@ +use biome_console::MarkupBuf; use biome_diagnostics::{ advice::CodeSuggestionAdvice, category, Advices, Category, Diagnostic, DiagnosticExt, DiagnosticTags, Error, Location, Severity, Visit, }; -use rome_console::MarkupBuf; use rome_rowan::TextRange; use std::fmt::{Debug, Display, Formatter}; @@ -53,10 +53,10 @@ impl Diagnostic for AnalyzerDiagnostic { } } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { match &self.kind { DiagnosticKind::Rule(rule_diagnostic) => { - rome_console::fmt::Display::fmt(&rule_diagnostic.message, fmt) + biome_console::fmt::Display::fmt(&rule_diagnostic.message, fmt) } DiagnosticKind::Raw(error) => error.message(fmt), } diff --git a/crates/biome_analyze/src/lib.rs b/crates/biome_analyze/src/lib.rs index 48d49f532f07..fadc6ee6e07a 100644 --- a/crates/biome_analyze/src/lib.rs +++ b/crates/biome_analyze/src/lib.rs @@ -45,10 +45,10 @@ pub use crate::signals::{ pub use crate::syntax::{Ast, SyntaxVisitor}; pub use crate::visitor::{NodeVisitor, Visitor, VisitorContext, VisitorFinishContext}; +use biome_console::markup; use biome_diagnostics::{ category, Applicability, Diagnostic, DiagnosticExt, DiagnosticTags, Severity, }; -use rome_console::markup; use rome_rowan::{ AstNode, BatchMutation, Direction, Language, SyntaxElement, SyntaxToken, TextLen, TextRange, TextSize, TokenAtOffset, TriviaPiece, TriviaPieceKind, WalkEvent, diff --git a/crates/biome_analyze/src/rule.rs b/crates/biome_analyze/src/rule.rs index 8ed835c7a964..4af869640ea0 100644 --- a/crates/biome_analyze/src/rule.rs +++ b/crates/biome_analyze/src/rule.rs @@ -4,6 +4,8 @@ use crate::registry::{RegistryVisitor, RuleLanguage, RuleSuppressions}; use crate::{ Phase, Phases, Queryable, SuppressionCommentEmitter, SuppressionCommentEmitterPayload, }; +use biome_console::fmt::Display; +use biome_console::{markup, MarkupBuf}; use biome_diagnostics::advice::CodeSuggestionAdvice; use biome_diagnostics::location::AsSpan; use biome_diagnostics::Applicability; @@ -11,8 +13,6 @@ use biome_diagnostics::{ Advices, Category, Diagnostic, DiagnosticTags, Location, LogCategory, MessageAndDescription, Visit, }; -use rome_console::fmt::Display; -use rome_console::{markup, MarkupBuf}; use rome_rowan::{AstNode, BatchMutation, BatchMutationExt, Language, TextRange}; use std::fmt::Debug; diff --git a/crates/biome_analyze/src/signals.rs b/crates/biome_analyze/src/signals.rs index cd4bda024cfd..8dce978ab1e7 100644 --- a/crates/biome_analyze/src/signals.rs +++ b/crates/biome_analyze/src/signals.rs @@ -7,8 +7,8 @@ use crate::{ AnalyzerDiagnostic, AnalyzerOptions, Queryable, RuleGroup, ServiceBag, SuppressionCommentEmitter, }; +use biome_console::MarkupBuf; use biome_diagnostics::{advice::CodeSuggestionAdvice, Applicability, CodeSuggestion, Error}; -use rome_console::MarkupBuf; use rome_rowan::{BatchMutation, Language}; use std::borrow::Cow; use std::iter::FusedIterator; diff --git a/crates/biome_cli/Cargo.toml b/crates/biome_cli/Cargo.toml index f8a00db371ed..7e7baebfc206 100644 --- a/crates/biome_cli/Cargo.toml +++ b/crates/biome_cli/Cargo.toml @@ -13,6 +13,8 @@ path = "src/main.rs" [dependencies] anyhow = "1.0.52" +biome_console = { workspace = true } +biome_deserialize = { workspace = true } biome_diagnostics = { workspace = true } biome_flags = { workspace = true } biome_lsp = { workspace = true } @@ -26,8 +28,6 @@ hdrhistogram = { version = "7.5.0", default-features = false } indexmap = { workspace = true } lazy_static = { workspace = true } rayon = "1.5.1" -rome_console = { workspace = true } -rome_deserialize = { workspace = true } rome_formatter = { workspace = true } rome_fs = { workspace = true } rome_json_formatter = { workspace = true } diff --git a/crates/biome_cli/src/commands/daemon.rs b/crates/biome_cli/src/commands/daemon.rs index 1b09b95568c0..67a1ef70ca7b 100644 --- a/crates/biome_cli/src/commands/daemon.rs +++ b/crates/biome_cli/src/commands/daemon.rs @@ -3,8 +3,8 @@ use crate::{ service::{self, ensure_daemon, open_socket, run_daemon}, CliDiagnostic, CliSession, }; +use biome_console::{markup, ConsoleExt}; use biome_lsp::ServerFactory; -use rome_console::{markup, ConsoleExt}; use rome_service::{workspace::WorkspaceClient, TransportError, WorkspaceError}; use std::{env, fs, path::PathBuf}; use tokio::io; diff --git a/crates/biome_cli/src/commands/init.rs b/crates/biome_cli/src/commands/init.rs index 4280e287b8e5..e77e858721af 100644 --- a/crates/biome_cli/src/commands/init.rs +++ b/crates/biome_cli/src/commands/init.rs @@ -1,5 +1,5 @@ use crate::{CliDiagnostic, CliSession}; -use rome_console::{markup, ConsoleExt, HorizontalLine}; +use biome_console::{markup, ConsoleExt, HorizontalLine}; use rome_service::configuration::Configuration; use rome_service::create_config; diff --git a/crates/biome_cli/src/commands/rage.rs b/crates/biome_cli/src/commands/rage.rs index b497167bd78e..7d6cf1ed9d66 100644 --- a/crates/biome_cli/src/commands/rage.rs +++ b/crates/biome_cli/src/commands/rage.rs @@ -1,7 +1,7 @@ +use biome_console::fmt::{Display, Formatter}; +use biome_console::{fmt, markup, ConsoleExt, HorizontalLine, Markup}; use biome_diagnostics::termcolor::{ColorChoice, WriteColor}; use biome_diagnostics::{termcolor, PrintDescription}; -use rome_console::fmt::{Display, Formatter}; -use rome_console::{fmt, markup, ConsoleExt, HorizontalLine, Markup}; use rome_fs::FileSystem; use rome_service::workspace::{client, RageEntry, RageParams}; use rome_service::{load_config, ConfigurationBasePath, DynRef, Workspace}; diff --git a/crates/biome_cli/src/commands/version.rs b/crates/biome_cli/src/commands/version.rs index 15482be97a9b..3397130b1358 100644 --- a/crates/biome_cli/src/commands/version.rs +++ b/crates/biome_cli/src/commands/version.rs @@ -1,5 +1,5 @@ -use rome_console::fmt::Formatter; -use rome_console::{fmt, markup, ConsoleExt}; +use biome_console::fmt::Formatter; +use biome_console::{fmt, markup, ConsoleExt}; use rome_service::workspace::ServerInfo; use crate::{CliDiagnostic, CliSession, VERSION}; diff --git a/crates/biome_cli/src/configuration.rs b/crates/biome_cli/src/configuration.rs index 3b8fb2fc3343..d0a7123848aa 100644 --- a/crates/biome_cli/src/configuration.rs +++ b/crates/biome_cli/src/configuration.rs @@ -1,10 +1,10 @@ use crate::cli_options::CliOptions; use crate::diagnostics::DeprecatedConfigurationFile; use crate::{CliDiagnostic, CliSession}; +use biome_console::{markup, Console, ConsoleExt}; +use biome_deserialize::json::deserialize_from_json_str; +use biome_deserialize::Deserialized; use biome_diagnostics::{DiagnosticExt, Error, PrintDiagnostic}; -use rome_console::{markup, Console, ConsoleExt}; -use rome_deserialize::json::deserialize_from_json_str; -use rome_deserialize::Deserialized; use rome_fs::{FileSystem, OpenOptions}; use rome_json_parser::JsonParserOptions; use rome_service::configuration::diagnostics::CantLoadExtendFile; diff --git a/crates/biome_cli/src/diagnostics.rs b/crates/biome_cli/src/diagnostics.rs index 230e81c69a81..740b7f8f35cc 100644 --- a/crates/biome_cli/src/diagnostics.rs +++ b/crates/biome_cli/src/diagnostics.rs @@ -1,10 +1,10 @@ +use biome_console::fmt::Formatter; +use biome_console::markup; use biome_diagnostics::adapters::{BpafError, IoError}; use biome_diagnostics::{ Advices, Category, Diagnostic, DiagnosticTags, Error, Location, LogCategory, MessageAndDescription, Severity, Visit, }; -use rome_console::fmt::Formatter; -use rome_console::markup; use rome_service::WorkspaceError; use std::process::{ExitCode, Termination}; use std::{env::current_exe, fmt::Debug}; diff --git a/crates/biome_cli/src/execute/migrate.rs b/crates/biome_cli/src/execute/migrate.rs index ca082b890a89..e79902b24b38 100644 --- a/crates/biome_cli/src/execute/migrate.rs +++ b/crates/biome_cli/src/execute/migrate.rs @@ -1,8 +1,8 @@ use crate::execute::diagnostics::{ContentDiffAdvice, MigrateDiffDiagnostic}; use crate::{CliDiagnostic, CliSession}; +use biome_console::{markup, ConsoleExt}; use biome_diagnostics::{category, PrintDiagnostic}; use biome_migrate::{migrate_configuration, ControlFlow}; -use rome_console::{markup, ConsoleExt}; use rome_fs::{FileSystemExt, OpenOptions}; use rome_json_parser::JsonParserOptions; use rome_json_syntax::JsonRoot; diff --git a/crates/biome_cli/src/execute/std_in.rs b/crates/biome_cli/src/execute/std_in.rs index 1e69bb165bef..7574b8ebd566 100644 --- a/crates/biome_cli/src/execute/std_in.rs +++ b/crates/biome_cli/src/execute/std_in.rs @@ -3,8 +3,8 @@ use crate::execute::diagnostics::{ContentDiffAdvice, FormatDiffDiagnostic}; use crate::execute::Execution; use crate::{CliDiagnostic, CliSession}; +use biome_console::{markup, ConsoleExt}; use biome_diagnostics::PrintDiagnostic; -use rome_console::{markup, ConsoleExt}; use rome_fs::RomePath; use rome_service::workspace::{ ChangeFileParams, FeatureName, FeaturesBuilder, FixFileParams, FormatFileParams, Language, diff --git a/crates/biome_cli/src/execute/traverse.rs b/crates/biome_cli/src/execute/traverse.rs index e26b7bdbabb6..846c830c2d2c 100644 --- a/crates/biome_cli/src/execute/traverse.rs +++ b/crates/biome_cli/src/execute/traverse.rs @@ -8,6 +8,7 @@ use crate::{ CliDiagnostic, CliSession, Execution, FormatterReportFileDetail, FormatterReportSummary, Report, ReportDiagnostic, ReportDiff, ReportErrorKind, ReportKind, TraversalMode, }; +use biome_console::{fmt, markup, Console, ConsoleExt}; use biome_diagnostics::{ adapters::StdError, category, DiagnosticExt, Error, PrintDescription, PrintDiagnostic, Resource, Severity, @@ -16,7 +17,6 @@ use crossbeam::{ channel::{unbounded, Receiver, Sender}, select, }; -use rome_console::{fmt, markup, Console, ConsoleExt}; use rome_fs::{FileSystem, PathInterner, RomePath}; use rome_fs::{TraversalContext, TraversalScope}; use rome_service::workspace::{FeaturesBuilder, IsPathIgnoredParams}; diff --git a/crates/biome_cli/src/lib.rs b/crates/biome_cli/src/lib.rs index 1a64829e1f1e..4ee3d65b8590 100644 --- a/crates/biome_cli/src/lib.rs +++ b/crates/biome_cli/src/lib.rs @@ -6,7 +6,7 @@ //! to parse commands and arguments, redirect the execution of the commands and //! execute the traversal of directory and files, based on the command that were passed. -use rome_console::{ColorMode, Console}; +use biome_console::{ColorMode, Console}; use rome_fs::OsFileSystem; use rome_service::{App, DynRef, Workspace, WorkspaceRef}; use std::env; diff --git a/crates/biome_cli/src/main.rs b/crates/biome_cli/src/main.rs index 61e679190e82..e42b949e1697 100644 --- a/crates/biome_cli/src/main.rs +++ b/crates/biome_cli/src/main.rs @@ -8,9 +8,9 @@ use biome_cli::{ biome_command, open_transport, setup_panic_handler, to_color_mode, BiomeCommand, CliDiagnostic, CliSession, }; +use biome_console::{markup, ConsoleExt, EnvConsole}; use biome_diagnostics::{set_bottom_frame, PrintDiagnostic}; use bpaf::{Args, ParseFailure}; -use rome_console::{markup, ConsoleExt, EnvConsole}; use rome_service::workspace; use std::process::{ExitCode, Termination}; use tokio::runtime::Runtime; diff --git a/crates/biome_cli/src/vcs.rs b/crates/biome_cli/src/vcs.rs index 2e9065352d7a..1c97c38a0a27 100644 --- a/crates/biome_cli/src/vcs.rs +++ b/crates/biome_cli/src/vcs.rs @@ -1,9 +1,9 @@ use crate::cli_options::CliOptions; use crate::diagnostics::{DisabledVcs, NoVcsFolderFound}; use crate::{CliDiagnostic, CliSession}; +use biome_console::{markup, ConsoleExt}; +use biome_deserialize::StringSet; use biome_diagnostics::PrintDiagnostic; -use rome_console::{markup, ConsoleExt}; -use rome_deserialize::StringSet; use rome_service::configuration::vcs::{VcsClientKind, VcsConfiguration}; use rome_service::configuration::FilesConfiguration; use rome_service::{Configuration, WorkspaceError}; diff --git a/crates/biome_cli/tests/cases/biome_json_support.rs b/crates/biome_cli/tests/cases/biome_json_support.rs index 728145191182..9b20c7bc0b9b 100644 --- a/crates/biome_cli/tests/cases/biome_json_support.rs +++ b/crates/biome_cli/tests/cases/biome_json_support.rs @@ -1,8 +1,8 @@ use crate::configs::CONFIG_FORMAT; use crate::run_cli; use crate::snap_test::{assert_cli_snapshot, SnapshotPayload}; +use biome_console::BufferConsole; use bpaf::Args; -use rome_console::BufferConsole; use rome_fs::{FileSystemExt, MemoryFileSystem}; use rome_service::DynRef; use std::path::{Path, PathBuf}; diff --git a/crates/biome_cli/tests/cases/config_extends.rs b/crates/biome_cli/tests/cases/config_extends.rs index 76d42113a468..a52f55c6f04f 100644 --- a/crates/biome_cli/tests/cases/config_extends.rs +++ b/crates/biome_cli/tests/cases/config_extends.rs @@ -1,7 +1,7 @@ use crate::run_cli; use crate::snap_test::{assert_cli_snapshot, SnapshotPayload}; +use biome_console::BufferConsole; use bpaf::Args; -use rome_console::BufferConsole; use rome_fs::MemoryFileSystem; use rome_service::DynRef; use std::path::Path; diff --git a/crates/biome_cli/tests/commands/check.rs b/crates/biome_cli/tests/commands/check.rs index b0b68d2660d6..db1448a40547 100644 --- a/crates/biome_cli/tests/commands/check.rs +++ b/crates/biome_cli/tests/commands/check.rs @@ -16,7 +16,7 @@ use crate::configs::{ }; use crate::snap_test::{markup_to_string, SnapshotPayload}; use crate::{assert_cli_snapshot, run_cli, FORMATTED, LINT_ERROR, PARSE_ERROR}; -use rome_console::{markup, BufferConsole, LogLevel, MarkupBuf}; +use biome_console::{markup, BufferConsole, LogLevel, MarkupBuf}; use rome_fs::{ErrorEntry, FileSystemExt, MemoryFileSystem, OsFileSystem}; use rome_service::DynRef; diff --git a/crates/biome_cli/tests/commands/ci.rs b/crates/biome_cli/tests/commands/ci.rs index 055e644384b9..03e71d288299 100644 --- a/crates/biome_cli/tests/commands/ci.rs +++ b/crates/biome_cli/tests/commands/ci.rs @@ -4,8 +4,8 @@ use crate::{ assert_cli_snapshot, run_cli, CUSTOM_FORMAT_BEFORE, FORMATTED, LINT_ERROR, PARSE_ERROR, UNFORMATTED, }; +use biome_console::{BufferConsole, MarkupBuf}; use bpaf::Args; -use rome_console::{BufferConsole, MarkupBuf}; use rome_fs::{FileSystemExt, MemoryFileSystem}; use rome_service::DynRef; use std::path::{Path, PathBuf}; diff --git a/crates/biome_cli/tests/commands/format.rs b/crates/biome_cli/tests/commands/format.rs index a16eb599de78..6aaa1fcc3192 100644 --- a/crates/biome_cli/tests/commands/format.rs +++ b/crates/biome_cli/tests/commands/format.rs @@ -7,8 +7,8 @@ use crate::snap_test::{markup_to_string, SnapshotPayload}; use crate::{ assert_cli_snapshot, run_cli, CUSTOM_FORMAT_BEFORE, FORMATTED, LINT_ERROR, UNFORMATTED, }; +use biome_console::{markup, BufferConsole, MarkupBuf}; use bpaf::Args; -use rome_console::{markup, BufferConsole, MarkupBuf}; use rome_fs::{FileSystemExt, MemoryFileSystem}; use rome_service::DynRef; use std::path::{Path, PathBuf}; diff --git a/crates/biome_cli/tests/commands/init.rs b/crates/biome_cli/tests/commands/init.rs index ace96d3e023f..a2b45892a6f3 100644 --- a/crates/biome_cli/tests/commands/init.rs +++ b/crates/biome_cli/tests/commands/init.rs @@ -1,8 +1,8 @@ use crate::configs::{CONFIG_INIT_DEFAULT, CONFIG_INIT_DEFAULT_WHEN_INSTALLED}; use crate::run_cli; use crate::snap_test::{assert_cli_snapshot, SnapshotPayload}; +use biome_console::BufferConsole; use bpaf::Args; -use rome_console::BufferConsole; use rome_fs::{FileSystemExt, MemoryFileSystem}; use rome_json_formatter::context::JsonFormatOptions; use rome_json_parser::{parse_json, JsonParserOptions}; diff --git a/crates/biome_cli/tests/commands/lint.rs b/crates/biome_cli/tests/commands/lint.rs index 554eab9c9bed..11216724f10a 100644 --- a/crates/biome_cli/tests/commands/lint.rs +++ b/crates/biome_cli/tests/commands/lint.rs @@ -16,7 +16,7 @@ use crate::configs::{ }; use crate::snap_test::{markup_to_string, SnapshotPayload}; use crate::{assert_cli_snapshot, run_cli, FORMATTED, LINT_ERROR, PARSE_ERROR}; -use rome_console::{markup, BufferConsole, LogLevel, MarkupBuf}; +use biome_console::{markup, BufferConsole, LogLevel, MarkupBuf}; use rome_fs::{ErrorEntry, FileSystemExt, MemoryFileSystem, OsFileSystem}; use rome_service::DynRef; diff --git a/crates/biome_cli/tests/commands/lsp_proxy.rs b/crates/biome_cli/tests/commands/lsp_proxy.rs index 2354ba55e225..76d9dfd75056 100644 --- a/crates/biome_cli/tests/commands/lsp_proxy.rs +++ b/crates/biome_cli/tests/commands/lsp_proxy.rs @@ -1,7 +1,7 @@ use crate::run_cli; use crate::snap_test::{assert_cli_snapshot, SnapshotPayload}; +use biome_console::BufferConsole; use bpaf::Args; -use rome_console::BufferConsole; use rome_fs::MemoryFileSystem; use rome_service::DynRef; diff --git a/crates/biome_cli/tests/commands/migrate.rs b/crates/biome_cli/tests/commands/migrate.rs index eb13ca63ea78..9a99312ba26e 100644 --- a/crates/biome_cli/tests/commands/migrate.rs +++ b/crates/biome_cli/tests/commands/migrate.rs @@ -1,7 +1,7 @@ use crate::run_cli; use crate::snap_test::{assert_cli_snapshot, SnapshotPayload}; +use biome_console::BufferConsole; use bpaf::Args; -use rome_console::BufferConsole; use rome_fs::{FileSystemExt, MemoryFileSystem}; use rome_service::DynRef; use std::path::Path; diff --git a/crates/biome_cli/tests/commands/rage.rs b/crates/biome_cli/tests/commands/rage.rs index d2cd9962a081..36a841b3c5ad 100644 --- a/crates/biome_cli/tests/commands/rage.rs +++ b/crates/biome_cli/tests/commands/rage.rs @@ -1,8 +1,8 @@ use crate::run_cli; use crate::snap_test::{CliSnapshot, SnapshotPayload}; use biome_cli::CliDiagnostic; +use biome_console::{BufferConsole, Console}; use bpaf::Args; -use rome_console::{BufferConsole, Console}; use rome_fs::{FileSystem, MemoryFileSystem}; use rome_service::DynRef; use std::path::{Path, PathBuf}; diff --git a/crates/biome_cli/tests/commands/version.rs b/crates/biome_cli/tests/commands/version.rs index 26f271255d72..654769b4ac3a 100644 --- a/crates/biome_cli/tests/commands/version.rs +++ b/crates/biome_cli/tests/commands/version.rs @@ -1,7 +1,7 @@ use crate::snap_test::SnapshotPayload; use crate::{assert_cli_snapshot, run_cli}; +use biome_console::BufferConsole; use bpaf::Args; -use rome_console::BufferConsole; use rome_fs::MemoryFileSystem; use rome_service::DynRef; diff --git a/crates/biome_cli/tests/main.rs b/crates/biome_cli/tests/main.rs index 9e71bea3e120..e8eee21feae6 100644 --- a/crates/biome_cli/tests/main.rs +++ b/crates/biome_cli/tests/main.rs @@ -11,7 +11,7 @@ use bpaf::ParseFailure; use std::path::Path; use biome_cli::{biome_command, CliDiagnostic, CliSession}; -use rome_console::{markup, BufferConsole, Console, ConsoleExt}; +use biome_console::{markup, BufferConsole, Console, ConsoleExt}; use rome_fs::{FileSystem, MemoryFileSystem}; use rome_service::{App, DynRef}; @@ -163,8 +163,8 @@ mod configuration { CONFIG_INCORRECT_GLOBALS_V2, CONFIG_LINTER_WRONG_RULE, }; use crate::snap_test::SnapshotPayload; + use biome_console::BufferConsole; use bpaf::Args; - use rome_console::BufferConsole; use rome_fs::MemoryFileSystem; use rome_service::DynRef; use std::path::Path; diff --git a/crates/biome_cli/tests/snap_test.rs b/crates/biome_cli/tests/snap_test.rs index 30869faef1d2..87ad299520f6 100644 --- a/crates/biome_cli/tests/snap_test.rs +++ b/crates/biome_cli/tests/snap_test.rs @@ -1,8 +1,8 @@ use biome_cli::CliDiagnostic; +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::{markup, BufferConsole, Markup}; use biome_diagnostics::termcolor::NoColor; use biome_diagnostics::{print_diagnostic_to_string, Error}; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::{markup, BufferConsole, Markup}; use rome_formatter::IndentStyle; use rome_fs::{FileSystemExt, MemoryFileSystem}; use rome_json_formatter::context::JsonFormatOptions; diff --git a/crates/rome_console/CODESPAN_LICENSE b/crates/biome_console/CODESPAN_LICENSE similarity index 100% rename from crates/rome_console/CODESPAN_LICENSE rename to crates/biome_console/CODESPAN_LICENSE diff --git a/crates/rome_console/Cargo.toml b/crates/biome_console/Cargo.toml similarity index 88% rename from crates/rome_console/Cargo.toml rename to crates/biome_console/Cargo.toml index 2dfa5c846d4c..9cad597600b5 100644 --- a/crates/rome_console/Cargo.toml +++ b/crates/biome_console/Cargo.toml @@ -1,10 +1,10 @@ [package] authors.workspace = true description = "Expose utilities to print HTML-syntax messages" -documentation = "https://docs.rs/rome_console" +documentation = "https://docs.rs/biome_console" edition.workspace = true license.workspace = true -name = "rome_console" +name = "biome_console" repository.workspace = true version = "0.0.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/rome_console/LICENSE b/crates/biome_console/LICENSE similarity index 100% rename from crates/rome_console/LICENSE rename to crates/biome_console/LICENSE diff --git a/crates/rome_console/README.md b/crates/biome_console/README.md similarity index 93% rename from crates/rome_console/README.md rename to crates/biome_console/README.md index d589e927fb3c..09970b13e2b6 100644 --- a/crates/rome_console/README.md +++ b/crates/biome_console/README.md @@ -1,11 +1,11 @@ -# `rome_console` +# `biome_console` The crate contains a general abstraction over printing messages (formatted with markup) and diagnostics to a console. ## Local installation ```toml -rome_console = { version = "0.0.0", path = "../rome_console" } +biome_console = { version = "0.0.0", path = "../biome_console" } ``` ## Usage example diff --git a/crates/rome_console/src/fmt.rs b/crates/biome_console/src/fmt.rs similarity index 97% rename from crates/rome_console/src/fmt.rs rename to crates/biome_console/src/fmt.rs index b4231ac5c629..86c4c91c2e8d 100644 --- a/crates/rome_console/src/fmt.rs +++ b/crates/biome_console/src/fmt.rs @@ -38,7 +38,7 @@ impl<'a> MarkupElements<'a> { } } -/// The [Formatter] is the `rome_console` equivalent to [std::fmt::Formatter]: +/// The [Formatter] is the `biome_console` equivalent to [std::fmt::Formatter]: /// it's never constructed directly by consumers, and can only be used through /// the mutable reference passed to implementations of the [Display] trait). /// It manages the state of the markup to print, and implementations of @@ -99,13 +99,13 @@ impl<'fmt> Formatter<'fmt> { } } -/// Formatting trait for types to be displayed as markup, the `rome_console` +/// Formatting trait for types to be displayed as markup, the `biome_console` /// equivalent to [std::fmt::Display] /// /// # Example /// Implementing `Display` on a custom struct /// ``` -/// use rome_console::{ +/// use biome_console::{ /// fmt::{Display, Formatter}, /// markup, /// }; @@ -204,7 +204,7 @@ impl_std_display!(usize); impl Display for Duration { fn fmt(&self, fmt: &mut Formatter) -> io::Result<()> { - use crate as rome_console; + use crate as biome_console; let secs = self.as_secs(); if secs > 1 { diff --git a/crates/rome_console/src/lib.rs b/crates/biome_console/src/lib.rs similarity index 100% rename from crates/rome_console/src/lib.rs rename to crates/biome_console/src/lib.rs diff --git a/crates/rome_console/src/markup.rs b/crates/biome_console/src/markup.rs similarity index 100% rename from crates/rome_console/src/markup.rs rename to crates/biome_console/src/markup.rs diff --git a/crates/rome_console/src/write.rs b/crates/biome_console/src/write.rs similarity index 100% rename from crates/rome_console/src/write.rs rename to crates/biome_console/src/write.rs diff --git a/crates/rome_console/src/write/html.rs b/crates/biome_console/src/write/html.rs similarity index 100% rename from crates/rome_console/src/write/html.rs rename to crates/biome_console/src/write/html.rs diff --git a/crates/rome_console/src/write/termcolor.rs b/crates/biome_console/src/write/termcolor.rs similarity index 99% rename from crates/rome_console/src/write/termcolor.rs rename to crates/biome_console/src/write/termcolor.rs index 5adad8be2452..a997c84f2ff7 100644 --- a/crates/rome_console/src/write/termcolor.rs +++ b/crates/biome_console/src/write/termcolor.rs @@ -189,7 +189,7 @@ mod tests { use biome_markup::markup; use termcolor::Ansi; - use crate as rome_console; + use crate as biome_console; use crate::fmt::Formatter; use super::{SanitizeAdapter, Termcolor}; diff --git a/crates/rome_console/tests/macro.rs b/crates/biome_console/tests/macro.rs similarity index 95% rename from crates/rome_console/tests/macro.rs rename to crates/biome_console/tests/macro.rs index 7860a77c4334..514663c6412b 100644 --- a/crates/rome_console/tests/macro.rs +++ b/crates/biome_console/tests/macro.rs @@ -1,4 +1,4 @@ -use rome_console::{Markup, MarkupElement}; +use biome_console::{Markup, MarkupElement}; #[test] fn test_macro() { diff --git a/crates/rome_console/tests/markup/closing_element_mismatch.rs b/crates/biome_console/tests/markup/closing_element_mismatch.rs similarity index 61% rename from crates/rome_console/tests/markup/closing_element_mismatch.rs rename to crates/biome_console/tests/markup/closing_element_mismatch.rs index 55e6aa413b2e..eab66237bba5 100644 --- a/crates/rome_console/tests/markup/closing_element_mismatch.rs +++ b/crates/biome_console/tests/markup/closing_element_mismatch.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { } } diff --git a/crates/rome_console/tests/markup/closing_element_mismatch.stderr b/crates/biome_console/tests/markup/closing_element_mismatch.stderr similarity index 100% rename from crates/rome_console/tests/markup/closing_element_mismatch.stderr rename to crates/biome_console/tests/markup/closing_element_mismatch.stderr diff --git a/crates/rome_console/tests/markup/closing_element_standalone.rs b/crates/biome_console/tests/markup/closing_element_standalone.rs similarity index 57% rename from crates/rome_console/tests/markup/closing_element_standalone.rs rename to crates/biome_console/tests/markup/closing_element_standalone.rs index 8d7f1ec69d51..661f3bcb174b 100644 --- a/crates/rome_console/tests/markup/closing_element_standalone.rs +++ b/crates/biome_console/tests/markup/closing_element_standalone.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { } } diff --git a/crates/rome_console/tests/markup/closing_element_standalone.stderr b/crates/biome_console/tests/markup/closing_element_standalone.stderr similarity index 100% rename from crates/rome_console/tests/markup/closing_element_standalone.stderr rename to crates/biome_console/tests/markup/closing_element_standalone.stderr diff --git a/crates/rome_console/tests/markup/element_non_ident_name.rs b/crates/biome_console/tests/markup/element_non_ident_name.rs similarity index 59% rename from crates/rome_console/tests/markup/element_non_ident_name.rs rename to crates/biome_console/tests/markup/element_non_ident_name.rs index 6883aff02f01..508e94162845 100644 --- a/crates/rome_console/tests/markup/element_non_ident_name.rs +++ b/crates/biome_console/tests/markup/element_non_ident_name.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { <"Literal" /> } } diff --git a/crates/rome_console/tests/markup/element_non_ident_name.stderr b/crates/biome_console/tests/markup/element_non_ident_name.stderr similarity index 100% rename from crates/rome_console/tests/markup/element_non_ident_name.stderr rename to crates/biome_console/tests/markup/element_non_ident_name.stderr diff --git a/crates/rome_console/tests/markup/invalid_group.rs b/crates/biome_console/tests/markup/invalid_group.rs similarity index 51% rename from crates/rome_console/tests/markup/invalid_group.rs rename to crates/biome_console/tests/markup/invalid_group.rs index 33398651394e..049ae4d08212 100644 --- a/crates/rome_console/tests/markup/invalid_group.rs +++ b/crates/biome_console/tests/markup/invalid_group.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { [] } } diff --git a/crates/rome_console/tests/markup/invalid_group.stderr b/crates/biome_console/tests/markup/invalid_group.stderr similarity index 100% rename from crates/rome_console/tests/markup/invalid_group.stderr rename to crates/biome_console/tests/markup/invalid_group.stderr diff --git a/crates/rome_console/tests/markup/invalid_punct.rs b/crates/biome_console/tests/markup/invalid_punct.rs similarity index 50% rename from crates/rome_console/tests/markup/invalid_punct.rs rename to crates/biome_console/tests/markup/invalid_punct.rs index 27fec8e27fe3..ab26cdf46998 100644 --- a/crates/rome_console/tests/markup/invalid_punct.rs +++ b/crates/biome_console/tests/markup/invalid_punct.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { ! } } diff --git a/crates/rome_console/tests/markup/invalid_punct.stderr b/crates/biome_console/tests/markup/invalid_punct.stderr similarity index 100% rename from crates/rome_console/tests/markup/invalid_punct.stderr rename to crates/biome_console/tests/markup/invalid_punct.stderr diff --git a/crates/rome_console/tests/markup/open_element_improper_close_1.rs b/crates/biome_console/tests/markup/open_element_improper_close_1.rs similarity index 58% rename from crates/rome_console/tests/markup/open_element_improper_close_1.rs rename to crates/biome_console/tests/markup/open_element_improper_close_1.rs index 21a74dd2965d..cf632b7e1251 100644 --- a/crates/rome_console/tests/markup/open_element_improper_close_1.rs +++ b/crates/biome_console/tests/markup/open_element_improper_close_1.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { } } diff --git a/crates/rome_console/tests/markup/open_element_improper_prop_value.stderr b/crates/biome_console/tests/markup/open_element_improper_prop_value.stderr similarity index 100% rename from crates/rome_console/tests/markup/open_element_improper_prop_value.stderr rename to crates/biome_console/tests/markup/open_element_improper_prop_value.stderr diff --git a/crates/rome_console/tests/markup/open_element_missing_prop_value.rs b/crates/biome_console/tests/markup/open_element_missing_prop_value.rs similarity index 63% rename from crates/rome_console/tests/markup/open_element_missing_prop_value.rs rename to crates/biome_console/tests/markup/open_element_missing_prop_value.rs index d64dab55feae..39fbd4655a38 100644 --- a/crates/rome_console/tests/markup/open_element_missing_prop_value.rs +++ b/crates/biome_console/tests/markup/open_element_missing_prop_value.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { } } diff --git a/crates/rome_console/tests/markup/open_element_missing_prop_value.stderr b/crates/biome_console/tests/markup/open_element_missing_prop_value.stderr similarity index 100% rename from crates/rome_console/tests/markup/open_element_missing_prop_value.stderr rename to crates/biome_console/tests/markup/open_element_missing_prop_value.stderr diff --git a/crates/rome_console/tests/markup/open_element_unfinished_1.rs b/crates/biome_console/tests/markup/open_element_unfinished_1.rs similarity index 50% rename from crates/rome_console/tests/markup/open_element_unfinished_1.rs rename to crates/biome_console/tests/markup/open_element_unfinished_1.rs index a230013ec755..c295a3122a9f 100644 --- a/crates/rome_console/tests/markup/open_element_unfinished_1.rs +++ b/crates/biome_console/tests/markup/open_element_unfinished_1.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { < } } diff --git a/crates/biome_console/tests/markup/open_element_unfinished_1.stderr b/crates/biome_console/tests/markup/open_element_unfinished_1.stderr new file mode 100644 index 000000000000..b6666d5f6db9 --- /dev/null +++ b/crates/biome_console/tests/markup/open_element_unfinished_1.stderr @@ -0,0 +1,9 @@ +error: unexpected end of input + --> tests/markup/open_element_unfinished_1.rs:2:5 + | +2 | / biome_console::markup! { +3 | | < +4 | | } + | |_____^ + | + = note: this error originates in the macro `biome_console::markup` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/rome_console/tests/markup/open_element_unfinished_2.rs b/crates/biome_console/tests/markup/open_element_unfinished_2.rs similarity index 56% rename from crates/rome_console/tests/markup/open_element_unfinished_2.rs rename to crates/biome_console/tests/markup/open_element_unfinished_2.rs index 7627ceee6fc3..9813ce7d1e82 100644 --- a/crates/rome_console/tests/markup/open_element_unfinished_2.rs +++ b/crates/biome_console/tests/markup/open_element_unfinished_2.rs @@ -1,5 +1,5 @@ fn main() { - rome_console::markup! { + biome_console::markup! { tests/markup/open_element_unfinished_2.rs:2:5 + | +2 | / biome_console::markup! { +3 | | tests/markup/open_element_unfinished_3.rs:2:5 + | +2 | / biome_console::markup! { +3 | | tests/markup/open_element_unfinished_4.rs:2:5 + | +2 | / biome_console::markup! { +3 | | tests/markup/open_element_unfinished_5.rs:2:5 + | +2 | / biome_console::markup! { +3 | | tests/markup/open_element_unfinished_6.rs:2:5 + | +2 | / biome_console::markup! { +3 | | tests/markup/open_element_unfinished_7.rs:2:5 + | +2 | / biome_console::markup! { +3 | | } } diff --git a/crates/rome_console/tests/markup/unclosed_element.stderr b/crates/biome_console/tests/markup/unclosed_element.stderr similarity index 100% rename from crates/rome_console/tests/markup/unclosed_element.stderr rename to crates/biome_console/tests/markup/unclosed_element.stderr diff --git a/crates/rome_control_flow/Cargo.toml b/crates/biome_control_flow/Cargo.toml similarity index 87% rename from crates/rome_control_flow/Cargo.toml rename to crates/biome_control_flow/Cargo.toml index ff78f60ff34d..44ab1330e063 100644 --- a/crates/rome_control_flow/Cargo.toml +++ b/crates/biome_control_flow/Cargo.toml @@ -2,7 +2,7 @@ authors.workspace = true edition.workspace = true license.workspace = true -name = "rome_control_flow" +name = "biome_control_flow" repository.workspace = true version = "0.2.0" diff --git a/crates/rome_control_flow/src/builder.rs b/crates/biome_control_flow/src/builder.rs similarity index 100% rename from crates/rome_control_flow/src/builder.rs rename to crates/biome_control_flow/src/builder.rs diff --git a/crates/rome_control_flow/src/lib.rs b/crates/biome_control_flow/src/lib.rs similarity index 100% rename from crates/rome_control_flow/src/lib.rs rename to crates/biome_control_flow/src/lib.rs diff --git a/crates/biome_css_parser/Cargo.toml b/crates/biome_css_parser/Cargo.toml index a3e1fd70e630..fc14f9d80974 100644 --- a/crates/biome_css_parser/Cargo.toml +++ b/crates/biome_css_parser/Cargo.toml @@ -11,12 +11,12 @@ repository.workspace = true version = "0.1.0" [dependencies] +biome_console = { workspace = true } biome_css_factory = { workspace = true } biome_css_syntax = { workspace = true } biome_diagnostics = { workspace = true } biome_js_unicode_table = { workspace = true } biome_parser = { workspace = true } -rome_console = { workspace = true } rome_rowan = { workspace = true } tracing = { workspace = true } diff --git a/crates/biome_css_parser/tests/spec_test.rs b/crates/biome_css_parser/tests/spec_test.rs index f2c911dd74a1..d3bfabc29fde 100644 --- a/crates/biome_css_parser/tests/spec_test.rs +++ b/crates/biome_css_parser/tests/spec_test.rs @@ -1,9 +1,9 @@ +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::markup; use biome_css_parser::{parse_css, CssParserOptions}; use biome_diagnostics::display::PrintDiagnostic; use biome_diagnostics::termcolor; use biome_diagnostics::DiagnosticExt; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::markup; use rome_rowan::SyntaxKind; use std::fmt::Write; use std::fs; diff --git a/crates/rome_deserialize/Cargo.toml b/crates/biome_deserialize/Cargo.toml similarity index 89% rename from crates/rome_deserialize/Cargo.toml rename to crates/biome_deserialize/Cargo.toml index 8f508b4d3202..0780e2ceaa16 100644 --- a/crates/rome_deserialize/Cargo.toml +++ b/crates/biome_deserialize/Cargo.toml @@ -2,16 +2,16 @@ authors.workspace = true edition.workspace = true license.workspace = true -name = "rome_deserialize" +name = "biome_deserialize" repository.workspace = true version = "0.2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } indexmap = { workspace = true, features = ["serde"] } -rome_console = { workspace = true } rome_json_parser = { workspace = true } rome_json_syntax = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/rome_deserialize/src/diagnostics.rs b/crates/biome_deserialize/src/diagnostics.rs similarity index 98% rename from crates/rome_deserialize/src/diagnostics.rs rename to crates/biome_deserialize/src/diagnostics.rs index 3a98ad24866a..73745b8a5127 100644 --- a/crates/rome_deserialize/src/diagnostics.rs +++ b/crates/biome_deserialize/src/diagnostics.rs @@ -1,7 +1,7 @@ +use biome_console::fmt::Display; +use biome_console::{markup, MarkupBuf}; use biome_diagnostics::location::AsSpan; use biome_diagnostics::{Advices, Diagnostic, LogCategory, MessageAndDescription, Severity, Visit}; -use rome_console::fmt::Display; -use rome_console::{markup, MarkupBuf}; use rome_rowan::{SyntaxError, TextRange}; use serde::{Deserialize, Serialize}; diff --git a/crates/rome_deserialize/src/json.rs b/crates/biome_deserialize/src/json.rs similarity index 98% rename from crates/rome_deserialize/src/json.rs rename to crates/biome_deserialize/src/json.rs index 38dd8988e5b6..df359a2605a9 100644 --- a/crates/rome_deserialize/src/json.rs +++ b/crates/biome_deserialize/src/json.rs @@ -1,7 +1,7 @@ use crate::{DeserializationDiagnostic, Deserialized, VisitNode}; +use biome_console::markup; use biome_diagnostics::{DiagnosticExt, Error}; use indexmap::IndexSet; -use rome_console::markup; use rome_json_parser::{parse_json, JsonParserOptions}; use rome_json_syntax::{ AnyJsonValue, JsonArrayValue, JsonBooleanValue, JsonLanguage, JsonMemberName, JsonNumberValue, @@ -460,7 +460,7 @@ fn emit_diagnostic_form_number( parse_error: ParseIntError, value_text: &str, value_range: TextRange, - maximum: impl rome_console::fmt::Display, + maximum: impl biome_console::fmt::Display, ) -> DeserializationDiagnostic { let diagnostic = DeserializationDiagnostic::new(parse_error.to_string()).with_range(value_range); @@ -531,9 +531,9 @@ pub fn with_only_known_variants( /// ## Examples /// /// ``` -/// use rome_deserialize::{DeserializationDiagnostic, VisitNode, Deserialized}; -/// use rome_deserialize::json::deserialize_from_json_str; -/// use rome_deserialize::json::{with_only_known_variants, has_only_known_keys, JsonDeserialize, VisitJsonNode}; +/// use biome_deserialize::{DeserializationDiagnostic, VisitNode, Deserialized}; +/// use biome_deserialize::json::deserialize_from_json_str; +/// use biome_deserialize::json::{with_only_known_variants, has_only_known_keys, JsonDeserialize, VisitJsonNode}; /// use rome_json_syntax::{JsonLanguage, JsonSyntaxNode}; /// use rome_json_syntax::JsonRoot; /// use rome_rowan::AstNode; @@ -565,7 +565,7 @@ pub fn with_only_known_variants( /// /// impl NewConfiguration { /// fn parse(root: JsonRoot) -> Deserialized { -/// use rome_deserialize::Deserialized; +/// use biome_deserialize::Deserialized; /// let mut output = Self::default(); /// let mut diagnostics = vec![]; /// NewConfiguration::deserialize_from_ast(&root, &mut output, &mut diagnostics); diff --git a/crates/rome_deserialize/src/lib.rs b/crates/biome_deserialize/src/lib.rs similarity index 100% rename from crates/rome_deserialize/src/lib.rs rename to crates/biome_deserialize/src/lib.rs diff --git a/crates/rome_deserialize/src/string_set.rs b/crates/biome_deserialize/src/string_set.rs similarity index 100% rename from crates/rome_deserialize/src/string_set.rs rename to crates/biome_deserialize/src/string_set.rs diff --git a/crates/rome_deserialize/src/visitor.rs b/crates/biome_deserialize/src/visitor.rs similarity index 100% rename from crates/rome_deserialize/src/visitor.rs rename to crates/biome_deserialize/src/visitor.rs diff --git a/crates/biome_diagnostics/Cargo.toml b/crates/biome_diagnostics/Cargo.toml index 82efa906b280..1f0f99a4985a 100644 --- a/crates/biome_diagnostics/Cargo.toml +++ b/crates/biome_diagnostics/Cargo.toml @@ -26,13 +26,13 @@ test = true [dependencies] backtrace = "0.3.66" +biome_console = { workspace = true, features = ["serde_markup"] } biome_diagnostics_categories = { workspace = true, features = ["serde"] } biome_diagnostics_macros = { workspace = true } biome_text_edit = { workspace = true } biome_text_size = { workspace = true } bitflags = { workspace = true } bpaf = { workspace = true } -rome_console = { workspace = true, features = ["serde_markup"] } rome_rowan = { workspace = true } schemars = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"] } diff --git a/crates/biome_diagnostics/examples/cli.rs b/crates/biome_diagnostics/examples/cli.rs index d39916768fb9..cf15190d10b5 100644 --- a/crates/biome_diagnostics/examples/cli.rs +++ b/crates/biome_diagnostics/examples/cli.rs @@ -1,7 +1,7 @@ use std::io; +use biome_console::{markup, ConsoleExt, EnvConsole}; use biome_diagnostics::{Advices, Diagnostic, LogCategory, PrintDiagnostic, Resource, Visit}; -use rome_console::{markup, ConsoleExt, EnvConsole}; use rome_rowan::{TextRange, TextSize}; #[derive(Debug, Diagnostic)] diff --git a/crates/biome_diagnostics/examples/fs.rs b/crates/biome_diagnostics/examples/fs.rs index 6b95aa7160aa..49622d3a3f01 100644 --- a/crates/biome_diagnostics/examples/fs.rs +++ b/crates/biome_diagnostics/examples/fs.rs @@ -1,9 +1,9 @@ use std::io; +use biome_console::{fmt, markup, ConsoleExt, EnvConsole}; use biome_diagnostics::{ Advices, Diagnostic, Location, LogCategory, PrintDiagnostic, Resource, SourceCode, Visit, }; -use rome_console::{fmt, markup, ConsoleExt, EnvConsole}; use rome_rowan::{TextRange, TextSize}; #[derive(Debug, Diagnostic)] diff --git a/crates/biome_diagnostics/examples/lint.rs b/crates/biome_diagnostics/examples/lint.rs index 5650570df268..3c33d8425f27 100644 --- a/crates/biome_diagnostics/examples/lint.rs +++ b/crates/biome_diagnostics/examples/lint.rs @@ -1,10 +1,10 @@ use std::io; +use biome_console::{markup, ConsoleExt, EnvConsole}; use biome_diagnostics::{ Advices, Diagnostic, Location, LogCategory, PrintDiagnostic, Resource, SourceCode, Visit, }; use biome_text_edit::TextEdit; -use rome_console::{markup, ConsoleExt, EnvConsole}; use rome_rowan::{TextRange, TextSize}; #[derive(Debug, Diagnostic)] diff --git a/crates/biome_diagnostics/examples/serde.rs b/crates/biome_diagnostics/examples/serde.rs index f435165feb18..c7691852e171 100644 --- a/crates/biome_diagnostics/examples/serde.rs +++ b/crates/biome_diagnostics/examples/serde.rs @@ -1,5 +1,5 @@ +use biome_console::{markup, ConsoleExt, EnvConsole}; use biome_diagnostics::{Diagnostic, LineIndexBuf, PrintDiagnostic, Resource, Result, SourceCode}; -use rome_console::{markup, ConsoleExt, EnvConsole}; use rome_rowan::{TextRange, TextSize}; use serde_json::Error; diff --git a/crates/biome_diagnostics/src/adapters.rs b/crates/biome_diagnostics/src/adapters.rs index 4621932bdc44..c832d7e332fb 100644 --- a/crates/biome_diagnostics/src/adapters.rs +++ b/crates/biome_diagnostics/src/adapters.rs @@ -4,7 +4,7 @@ use std::io; -use rome_console::{fmt, markup}; +use biome_console::{fmt, markup}; use crate::{category, Category, Diagnostic, DiagnosticTags}; diff --git a/crates/biome_diagnostics/src/advice.rs b/crates/biome_diagnostics/src/advice.rs index ff9f1d6841c2..b35366dc4be5 100644 --- a/crates/biome_diagnostics/src/advice.rs +++ b/crates/biome_diagnostics/src/advice.rs @@ -4,9 +4,9 @@ use crate::{ location::{AsResource, AsSourceCode, AsSpan}, Location, }; +use biome_console::fmt::{self, Display}; +use biome_console::markup; use biome_text_edit::TextEdit; -use rome_console::fmt::{self, Display}; -use rome_console::markup; use serde::{Deserialize, Serialize}; use std::io; diff --git a/crates/biome_diagnostics/src/context.rs b/crates/biome_diagnostics/src/context.rs index ab85d9becffa..c9b26bc50d1c 100644 --- a/crates/biome_diagnostics/src/context.rs +++ b/crates/biome_diagnostics/src/context.rs @@ -1,4 +1,4 @@ -use rome_console::fmt; +use biome_console::fmt; use crate::context::internal::{SeverityDiagnostic, TagsDiagnostic}; use crate::{ @@ -249,8 +249,8 @@ mod internal { use std::{fmt::Debug, io}; + use biome_console::{fmt, markup}; use biome_text_edit::TextEdit; - use rome_console::{fmt, markup}; use rome_rowan::TextRange; use crate::{ diff --git a/crates/biome_diagnostics/src/diagnostic.rs b/crates/biome_diagnostics/src/diagnostic.rs index 3d359d559438..5a2822af6cfe 100644 --- a/crates/biome_diagnostics/src/diagnostic.rs +++ b/crates/biome_diagnostics/src/diagnostic.rs @@ -3,7 +3,7 @@ use std::{convert::Infallible, fmt::Debug, io}; use bitflags::bitflags; use serde::{Deserialize, Serialize}; -use rome_console::fmt; +use biome_console::fmt; use crate::{Category, Location, Visit}; diff --git a/crates/biome_diagnostics/src/display.rs b/crates/biome_diagnostics/src/display.rs index 77c085adcbcd..21d55fe7f25c 100644 --- a/crates/biome_diagnostics/src/display.rs +++ b/crates/biome_diagnostics/src/display.rs @@ -1,7 +1,7 @@ use std::{io, iter}; +use biome_console::{fmt, markup, HorizontalLine, Markup, MarkupBuf, MarkupElement, MarkupNode}; use biome_text_edit::TextEdit; -use rome_console::{fmt, markup, HorizontalLine, Markup, MarkupBuf, MarkupElement, MarkupNode}; use unicode_width::UnicodeWidthStr; mod backtrace; @@ -32,7 +32,7 @@ impl<'fmt, D: AsDiagnostic + ?Sized> std::fmt::Display for PrintDescription<'fmt } /// Helper struct for printing a diagnostic as markup into any formatter -/// implementing [rome_console::fmt::Write]. +/// implementing [biome_console::fmt::Write]. pub struct PrintDiagnostic<'fmt, D: ?Sized> { diag: &'fmt D, verbose: bool, @@ -558,11 +558,11 @@ impl fmt::Write for IndentWriter<'_, W> { mod tests { use std::io; + use biome_console::{fmt, markup}; use biome_diagnostics::{DiagnosticTags, Severity}; use biome_diagnostics_categories::{category, Category}; use biome_text_edit::TextEdit; use biome_text_size::{TextRange, TextSize}; - use rome_console::{fmt, markup}; use serde_json::{from_value, json}; use crate::{self as biome_diagnostics}; diff --git a/crates/biome_diagnostics/src/display/backtrace.rs b/crates/biome_diagnostics/src/display/backtrace.rs index d56e4511333c..608df1d28b69 100644 --- a/crates/biome_diagnostics/src/display/backtrace.rs +++ b/crates/biome_diagnostics/src/display/backtrace.rs @@ -1,7 +1,7 @@ use std::{borrow::Cow, path::PathBuf}; use std::{cell::Cell, fmt::Write as _, io, os::raw::c_void, path::Path, slice}; -use rome_console::{fmt, markup}; +use biome_console::{fmt, markup}; use serde::{Deserialize, Serialize}; use super::IndentWriter; diff --git a/crates/biome_diagnostics/src/display/diff.rs b/crates/biome_diagnostics/src/display/diff.rs index 4ff8256b0cd0..ba3fb74515cc 100644 --- a/crates/biome_diagnostics/src/display/diff.rs +++ b/crates/biome_diagnostics/src/display/diff.rs @@ -3,8 +3,8 @@ use std::{ io, slice, }; +use biome_console::{fmt, markup, MarkupElement}; use biome_text_edit::{ChangeTag, CompressedOp, TextEdit}; -use rome_console::{fmt, markup, MarkupElement}; use super::frame::{ calculate_print_width, print_invisibles, text_width, IntoIter, OneIndexed, @@ -669,8 +669,8 @@ impl fmt::Write for ElementWrapper<'_, W> { #[cfg(test)] mod tests { use super::print_diff; + use biome_console::{fmt, markup, MarkupBuf}; use biome_text_edit::TextEdit; - use rome_console::{fmt, markup, MarkupBuf}; use termcolor::Buffer; fn assert_eq_markup(actual: &MarkupBuf, expected: &MarkupBuf) { diff --git a/crates/biome_diagnostics/src/display/frame.rs b/crates/biome_diagnostics/src/display/frame.rs index 12bf916a622e..cb3e2b279ba8 100644 --- a/crates/biome_diagnostics/src/display/frame.rs +++ b/crates/biome_diagnostics/src/display/frame.rs @@ -6,8 +6,8 @@ use std::{ ops::{Bound, RangeBounds}, }; +use biome_console::{fmt, markup}; use biome_text_size::{TextLen, TextRange, TextSize}; -use rome_console::{fmt, markup}; use unicode_width::UnicodeWidthChar; use crate::{ diff --git a/crates/biome_diagnostics/src/display/message.rs b/crates/biome_diagnostics/src/display/message.rs index 4c9309a17ea4..5a4d702c6fdc 100644 --- a/crates/biome_diagnostics/src/display/message.rs +++ b/crates/biome_diagnostics/src/display/message.rs @@ -1,5 +1,5 @@ -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::{markup, MarkupBuf}; +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::{markup, MarkupBuf}; use serde::{Deserialize, Serialize}; use termcolor::NoColor; @@ -69,7 +69,7 @@ impl std::fmt::Debug for MessageAndDescription { } } -impl rome_console::fmt::Display for MessageAndDescription { +impl biome_console::fmt::Display for MessageAndDescription { fn fmt(&self, fmt: &mut Formatter<'_>) -> std::io::Result<()> { fmt.write_markup(markup! {{self.message}}) } diff --git a/crates/biome_diagnostics/src/error.rs b/crates/biome_diagnostics/src/error.rs index 63c59fc6a33d..0228cbd05f59 100644 --- a/crates/biome_diagnostics/src/error.rs +++ b/crates/biome_diagnostics/src/error.rs @@ -14,7 +14,7 @@ use std::{ io, }; -use rome_console::fmt; +use biome_console::fmt; use crate::{ diagnostic::internal::AsDiagnostic, Category, Diagnostic, DiagnosticTags, Location, Severity, diff --git a/crates/biome_diagnostics/src/lib.rs b/crates/biome_diagnostics/src/lib.rs index 63fb6b1e37fd..4f56bcec28f8 100644 --- a/crates/biome_diagnostics/src/lib.rs +++ b/crates/biome_diagnostics/src/lib.rs @@ -19,7 +19,7 @@ pub use termcolor; #[doc(hidden)] // Convenience re-export for procedural macro -pub use rome_console as console; +pub use biome_console as console; // Re-export macros from utility crates pub use biome_diagnostics_categories::{category, category_concat, Category}; @@ -35,8 +35,8 @@ pub use crate::display::{ }; pub use crate::error::{Error, Result}; pub use crate::location::{LineIndex, LineIndexBuf, Location, Resource, SourceCode}; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::markup; +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::markup; use std::fmt::Write; pub mod prelude { diff --git a/crates/biome_diagnostics/src/serde.rs b/crates/biome_diagnostics/src/serde.rs index ba0896a91a9b..63ebfa7925ee 100644 --- a/crates/biome_diagnostics/src/serde.rs +++ b/crates/biome_diagnostics/src/serde.rs @@ -1,8 +1,8 @@ use std::io; +use biome_console::{fmt, markup, MarkupBuf}; use biome_text_edit::TextEdit; use biome_text_size::TextRange; -use rome_console::{fmt, markup, MarkupBuf}; use serde::{ de::{self, SeqAccess}, Deserialize, Deserializer, Serialize, Serializer, diff --git a/crates/biome_diagnostics/src/suggestion.rs b/crates/biome_diagnostics/src/suggestion.rs index 0d0fad18d6b9..eea2b3f65673 100644 --- a/crates/biome_diagnostics/src/suggestion.rs +++ b/crates/biome_diagnostics/src/suggestion.rs @@ -1,6 +1,6 @@ use ::serde::{Deserialize, Serialize}; +use biome_console::MarkupBuf; use biome_text_edit::TextEdit; -use rome_console::MarkupBuf; use rome_rowan::TextRange; /// Indicates how a tool should manage this suggestion. diff --git a/crates/biome_diagnostics_macros/src/generate.rs b/crates/biome_diagnostics_macros/src/generate.rs index 89181228915c..689546759864 100644 --- a/crates/biome_diagnostics_macros/src/generate.rs +++ b/crates/biome_diagnostics_macros/src/generate.rs @@ -132,7 +132,7 @@ fn generate_description(input: &DeriveInput) -> TokenStream { let mut write = biome_diagnostics::console::fmt::Termcolor(write); let mut write = biome_diagnostics::console::fmt::Formatter::new(&mut write); - use biome_diagnostics::console as rome_console; + use biome_diagnostics::console as biome_console; write.write_markup(&biome_diagnostics::console::markup!{ #markup }) .map_err(|_| ::std::fmt::Error)?; @@ -157,7 +157,7 @@ fn generate_message(input: &DeriveInput) -> TokenStream { fmt.write_str(#value) }, Some(StaticOrDynamic::Static(StringOrMarkup::Markup(markup))) => quote! { - use biome_diagnostics::console as rome_console; + use biome_diagnostics::console as biome_console; fmt.write_markup(biome_diagnostics::console::markup!{ #markup }) }, Some(StaticOrDynamic::Dynamic(value)) => quote! { diff --git a/crates/biome_lsp/Cargo.toml b/crates/biome_lsp/Cargo.toml index 08693fc0cdca..f6489f921f73 100644 --- a/crates/biome_lsp/Cargo.toml +++ b/crates/biome_lsp/Cargo.toml @@ -11,11 +11,11 @@ version = "0.0.0" [dependencies] anyhow = "1.0.52" biome_analyze = { workspace = true } +biome_console = { workspace = true } biome_diagnostics = { workspace = true } biome_text_edit = { workspace = true } futures = "0.3" indexmap = { workspace = true } -rome_console = { workspace = true } rome_formatter = { workspace = true } rome_fs = { workspace = true } rome_js_formatter = { workspace = true } diff --git a/crates/biome_lsp/src/server.rs b/crates/biome_lsp/src/server.rs index 703a8f774103..26f2b96c238d 100644 --- a/crates/biome_lsp/src/server.rs +++ b/crates/biome_lsp/src/server.rs @@ -6,10 +6,10 @@ use crate::session::{ }; use crate::utils::{into_lsp_error, panic_to_lsp_error}; use crate::{handlers, requests}; +use biome_console::markup; use biome_diagnostics::panic::PanicError; use futures::future::ready; use futures::FutureExt; -use rome_console::markup; use rome_fs::{BIOME_JSON, ROME_JSON}; use rome_service::workspace::{RageEntry, RageParams, RageResult}; use rome_service::{workspace, Workspace}; diff --git a/crates/biome_lsp/src/session.rs b/crates/biome_lsp/src/session.rs index de2fa26f3dc9..56ed17f14b7a 100644 --- a/crates/biome_lsp/src/session.rs +++ b/crates/biome_lsp/src/session.rs @@ -5,9 +5,9 @@ use crate::extension_settings::CONFIGURATION_SECTION; use crate::utils; use anyhow::Result; use biome_analyze::RuleCategories; +use biome_console::markup; use futures::stream::futures_unordered::FuturesUnordered; use futures::StreamExt; -use rome_console::markup; use rome_fs::{FileSystem, OsFileSystem, RomePath}; use rome_service::workspace::{ FeatureName, FeaturesBuilder, PullDiagnosticsParams, SupportsFeatureParams, diff --git a/crates/biome_lsp/src/utils.rs b/crates/biome_lsp/src/utils.rs index b58317f54e8c..c8f0f52e1ae0 100644 --- a/crates/biome_lsp/src/utils.rs +++ b/crates/biome_lsp/src/utils.rs @@ -2,14 +2,14 @@ use crate::converters::line_index::LineIndex; use crate::converters::{from_proto, to_proto, PositionEncoding}; use anyhow::{ensure, Context, Result}; use biome_analyze::ActionCategory; +use biome_console::fmt::Termcolor; +use biome_console::fmt::{self, Formatter}; +use biome_console::MarkupBuf; use biome_diagnostics::termcolor::NoColor; use biome_diagnostics::{ Applicability, {Diagnostic, DiagnosticTags, Location, PrintDescription, Severity, Visit}, }; use biome_text_edit::{CompressedOp, DiffOp, TextEdit}; -use rome_console::fmt::Termcolor; -use rome_console::fmt::{self, Formatter}; -use rome_console::MarkupBuf; use rome_rowan::TextSize; use rome_service::workspace::CodeAction; use std::any::Any; diff --git a/crates/biome_markup/README.md b/crates/biome_markup/README.md index a6ddcc29fdfd..b18e8b3b149d 100644 --- a/crates/biome_markup/README.md +++ b/crates/biome_markup/README.md @@ -1,9 +1,9 @@ # `biome_markup` -The crate contains procedural macros to build `rome_console` markup object with a JSX-like syntax +The crate contains procedural macros to build `biome_console` markup object with a JSX-like syntax The macro cannot be used alone as it generates code that requires supporting types declared in the -`rome_console` crate, so it's re-exported from there and should be used as `rome_console::markup` +`biome_console` crate, so it's re-exported from there and should be used as `biome_console::markup` ## Local installation diff --git a/crates/biome_markup/src/lib.rs b/crates/biome_markup/src/lib.rs index c2be23bc8c96..3377c40438ea 100644 --- a/crates/biome_markup/src/lib.rs +++ b/crates/biome_markup/src/lib.rs @@ -11,7 +11,7 @@ impl ToTokens for StackEntry { fn to_tokens(&self, tokens: &mut TokenStream) { let name = &self.name; tokens.extend(quote! { - rome_console::MarkupElement::#name + biome_console::MarkupElement::#name }); if !self.attributes.is_empty() { @@ -137,7 +137,7 @@ pub fn markup(input: proc_macro::TokenStream) -> proc_macro::TokenStream { .collect(); output.push(quote! { - rome_console::MarkupNode { + biome_console::MarkupNode { elements: &[ #( #elements ),* ], content: &(#literal), } @@ -149,9 +149,9 @@ pub fn markup(input: proc_macro::TokenStream) -> proc_macro::TokenStream { let body = group.stream(); output.push(quote! { - rome_console::MarkupNode { + biome_console::MarkupNode { elements: &[ #( #elements ),* ], - content: &(#body) as &dyn rome_console::fmt::Display, + content: &(#body) as &dyn biome_console::fmt::Display, } }); } @@ -165,5 +165,5 @@ pub fn markup(input: proc_macro::TokenStream) -> proc_macro::TokenStream { abort!(top.name.span(), "unclosed element"); } - quote! { rome_console::Markup(&[ #( #output ),* ]) }.into() + quote! { biome_console::Markup(&[ #( #output ),* ]) }.into() } diff --git a/crates/biome_parser/Cargo.toml b/crates/biome_parser/Cargo.toml index 3e2cca1545b0..1b7178ce7d62 100644 --- a/crates/biome_parser/Cargo.toml +++ b/crates/biome_parser/Cargo.toml @@ -10,7 +10,7 @@ version = "0.2.0" [dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } drop_bomb = "0.1.5" -rome_console = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/biome_parser/src/diagnostic.rs b/crates/biome_parser/src/diagnostic.rs index a8dceb075a84..15054eb393df 100644 --- a/crates/biome_parser/src/diagnostic.rs +++ b/crates/biome_parser/src/diagnostic.rs @@ -100,8 +100,8 @@ impl ParseDiagnostic { /// ## Examples /// /// ``` - /// # use rome_console::fmt::{Termcolor}; - /// # use rome_console::markup; + /// # use biome_console::fmt::{Termcolor}; + /// # use biome_console::markup; /// # use biome_diagnostics::{DiagnosticExt, PrintDiagnostic, console::fmt::Formatter}; /// # use biome_parser::diagnostic::ParseDiagnostic; /// # use rome_rowan::{TextSize, TextRange}; @@ -142,8 +142,8 @@ impl ParseDiagnostic { /// ## Examples /// /// ``` - /// # use rome_console::fmt::{Termcolor}; - /// # use rome_console::markup; + /// # use biome_console::fmt::{Termcolor}; + /// # use biome_console::markup; /// # use biome_diagnostics::{DiagnosticExt, PrintDiagnostic, console::fmt::Formatter}; /// # use biome_parser::diagnostic::ParseDiagnostic; /// # use rome_rowan::{TextSize, TextRange}; diff --git a/crates/biome_parser/src/lib.rs b/crates/biome_parser/src/lib.rs index 162d4be71421..b2748d7e7028 100644 --- a/crates/biome_parser/src/lib.rs +++ b/crates/biome_parser/src/lib.rs @@ -245,8 +245,8 @@ use crate::diagnostic::{expected_token, ParseDiagnostic, ToDiagnostic}; use crate::event::Event; use crate::event::Event::Token; use crate::token_source::{BumpWithContext, NthToken, TokenSource}; +use biome_console::fmt::Display; use biome_diagnostics::location::AsSpan; -use rome_console::fmt::Display; use rome_rowan::{ AnyFileSource, AstNode, FileSource, FileSourceError, Language, SendNode, SyntaxKind, SyntaxNode, TextRange, TextSize, diff --git a/crates/biome_suppression/Cargo.toml b/crates/biome_suppression/Cargo.toml index e506766a2365..b978dcb1bd65 100644 --- a/crates/biome_suppression/Cargo.toml +++ b/crates/biome_suppression/Cargo.toml @@ -9,6 +9,6 @@ version = "0.2.0" [dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } -rome_console = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/biome_suppression/src/lib.rs b/crates/biome_suppression/src/lib.rs index cf2723bf01a8..f86a8574ff6c 100644 --- a/crates/biome_suppression/src/lib.rs +++ b/crates/biome_suppression/src/lib.rs @@ -117,8 +117,8 @@ impl std::fmt::Display for SuppressionDiagnosticKind { } } -impl rome_console::fmt::Display for SuppressionDiagnosticKind { - fn fmt(&self, fmt: &mut rome_console::fmt::Formatter) -> std::io::Result<()> { +impl biome_console::fmt::Display for SuppressionDiagnosticKind { + fn fmt(&self, fmt: &mut biome_console::fmt::Formatter) -> std::io::Result<()> { match self { SuppressionDiagnosticKind::MissingColon => write!( fmt, diff --git a/crates/biome_test_utils/Cargo.toml b/crates/biome_test_utils/Cargo.toml index 399b7fd0b92e..9c70e0d3a8de 100644 --- a/crates/biome_test_utils/Cargo.toml +++ b/crates/biome_test_utils/Cargo.toml @@ -8,11 +8,11 @@ version = "0.1.0" [dependencies] biome_analyze = { workspace = true } +biome_console = { workspace = true } +biome_deserialize = { workspace = true } biome_diagnostics = { workspace = true } countme = { workspace = true, features = ["enable"] } json_comments = "0.2.1" -rome_console = { workspace = true } -rome_deserialize = { workspace = true } rome_js_parser = { workspace = true } rome_js_syntax = { workspace = true } rome_json_parser = { workspace = true } diff --git a/crates/biome_test_utils/src/lib.rs b/crates/biome_test_utils/src/lib.rs index 030e545716d2..cbdbc330375e 100644 --- a/crates/biome_test_utils/src/lib.rs +++ b/crates/biome_test_utils/src/lib.rs @@ -1,9 +1,9 @@ use biome_analyze::{AnalyzerAction, AnalyzerOptions}; +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::markup; use biome_diagnostics::termcolor::Buffer; use biome_diagnostics::{DiagnosticExt, Error, PrintDiagnostic}; use json_comments::StripComments; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::markup; use rome_json_parser::{JsonParserOptions, ParseDiagnostic}; use rome_rowan::{SyntaxKind, SyntaxNode, SyntaxSlot}; use rome_service::configuration::to_analyzer_configuration; @@ -35,7 +35,7 @@ pub fn create_analyzer_options( // that configures that specific rule. let options_file = input_file.with_extension("options.json"); if let Ok(json) = std::fs::read_to_string(options_file.clone()) { - let deserialized = rome_deserialize::json::deserialize_from_json_str::( + let deserialized = biome_deserialize::json::deserialize_from_json_str::( json.as_str(), JsonParserOptions::default(), ); @@ -76,17 +76,17 @@ pub fn create_analyzer_options( pub fn diagnostic_to_string(name: &str, source: &str, diag: Error) -> String { let error = diag.with_file_path(name).with_file_source_code(source); - let text = markup_to_string(rome_console::markup! { + let text = markup_to_string(biome_console::markup! { {PrintDiagnostic::verbose(&error)} }); text } -fn markup_to_string(markup: rome_console::Markup) -> String { +fn markup_to_string(markup: biome_console::Markup) -> String { let mut buffer = Vec::new(); let mut write = - rome_console::fmt::Termcolor(biome_diagnostics::termcolor::NoColor::new(&mut buffer)); + biome_console::fmt::Termcolor(biome_diagnostics::termcolor::NoColor::new(&mut buffer)); let mut fmt = Formatter::new(&mut write); fmt.write_markup(markup).unwrap(); diff --git a/crates/biome_wasm/Cargo.toml b/crates/biome_wasm/Cargo.toml index 5428af39b99f..7e22a2a979d9 100644 --- a/crates/biome_wasm/Cargo.toml +++ b/crates/biome_wasm/Cargo.toml @@ -15,9 +15,9 @@ crate-type = ["cdylib", "rlib"] default = ["console_error_panic_hook"] [dependencies] +biome_console = { workspace = true } biome_diagnostics = { path = "../../crates/biome_diagnostics" } js-sys = "0.3.59" -rome_console = { workspace = true } rome_service = { path = "../../crates/rome_service" } serde = { workspace = true } serde-wasm-bindgen = "0.4.5" diff --git a/crates/biome_wasm/src/utils.rs b/crates/biome_wasm/src/utils.rs index 56beaaebeaa1..4bd2ceff9d02 100644 --- a/crates/biome_wasm/src/utils.rs +++ b/crates/biome_wasm/src/utils.rs @@ -3,10 +3,10 @@ use std::fmt::Display; use js_sys::Error; use wasm_bindgen::prelude::*; +use biome_console::fmt::HTML; +use biome_console::{fmt::Formatter, markup}; use biome_diagnostics::serde::Diagnostic; use biome_diagnostics::{DiagnosticExt, LineIndexBuf, PrintDiagnostic, SourceCode}; -use rome_console::fmt::HTML; -use rome_console::{fmt::Formatter, markup}; use super::IDiagnostic; diff --git a/crates/rome_console/tests/markup/open_element_unfinished_1.stderr b/crates/rome_console/tests/markup/open_element_unfinished_1.stderr deleted file mode 100644 index 79c5ec69da30..000000000000 --- a/crates/rome_console/tests/markup/open_element_unfinished_1.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: unexpected end of input - --> tests/markup/open_element_unfinished_1.rs:2:5 - | -2 | / rome_console::markup! { -3 | | < -4 | | } - | |_____^ - | - = note: this error originates in the macro `rome_console::markup` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/crates/rome_console/tests/markup/open_element_unfinished_2.stderr b/crates/rome_console/tests/markup/open_element_unfinished_2.stderr deleted file mode 100644 index 0c8afa75a03c..000000000000 --- a/crates/rome_console/tests/markup/open_element_unfinished_2.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error: unexpected end of input - --> tests/markup/open_element_unfinished_2.rs:2:5 - | -2 | / rome_console::markup! { -3 | | tests/markup/open_element_unfinished_3.rs:2:5 - | -2 | / rome_console::markup! { -3 | | tests/markup/open_element_unfinished_4.rs:2:5 - | -2 | / rome_console::markup! { -3 | | tests/markup/open_element_unfinished_5.rs:2:5 - | -2 | / rome_console::markup! { -3 | | tests/markup/open_element_unfinished_6.rs:2:5 - | -2 | / rome_console::markup! { -3 | | tests/markup/open_element_unfinished_7.rs:2:5 - | -2 | / rome_console::markup! { -3 | | bool { fn register_fallthrough_switch_clauses( block_to_switch_clause_range: &FxHashMap>, visited_blocks: &RoaringBitmap, - cfg: &rome_control_flow::ControlFlowGraph, + cfg: &biome_control_flow::ControlFlowGraph, fallthrough: &mut Vec, ) { let mut current_switch_clause = None; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_nonoctal_decimal_escape.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_nonoctal_decimal_escape.rs index 0fbd4a203a03..ea7f1a0e8581 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_nonoctal_decimal_escape.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_nonoctal_decimal_escape.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::JsStringLiteralExpression; use rome_rowan::{AstNode, BatchMutationExt, TextRange}; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_self_assign.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_self_assign.rs index b131d51bfe16..0eb43aec9489 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_self_assign.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_self_assign.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ inner_string_text, AnyJsArrayAssignmentPatternElement, AnyJsArrayElement, AnyJsAssignment, AnyJsAssignmentPattern, AnyJsExpression, AnyJsLiteralExpression, AnyJsName, diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_static_only_class.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_static_only_class.rs index 84fc7d4dd35c..f4129fac4b36 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_static_only_class.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_static_only_class.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsClass, AnyJsClassMember, JsGetterClassMember, JsMethodClassMember, JsPropertyClassMember, JsSetterClassMember, TsGetterSignatureClassMember, TsIndexSignatureClassMember, diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_useless_empty_export.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_useless_empty_export.rs index b15a7a8973dd..3c54b13640fc 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_useless_empty_export.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_useless_empty_export.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{AnyJsModuleItem, JsExport, JsModuleItemList, JsSyntaxToken}; use rome_rowan::{AstNode, AstSeparatedList, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/no_void.rs b/crates/rome_js_analyze/src/analyzers/nursery/no_void.rs index 20ae5b044017..b0b34535e4c0 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/no_void.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/no_void.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::JsUnaryExpression; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_arrow_function.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_arrow_function.rs index 9917ae55144d..524ca0bb6066 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_arrow_function.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_arrow_function.rs @@ -3,8 +3,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, AddVisitor, Phases, QueryMatch, Queryable, Rule, RuleDiagnostic, ServiceBag, Visitor, VisitorContext, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsExpression, AnyJsFunctionBody, AnyJsStatement, JsConstructorClassMember, JsFunctionBody, diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_collapsed_else_if.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_collapsed_else_if.rs index b50e0be7cc07..95815e111869 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_collapsed_else_if.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_collapsed_else_if.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{AnyJsStatement, JsBlockStatement, JsElseClause, JsIfStatement}; use rome_rowan::{AstNode, AstNodeList, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_getter_return.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_getter_return.rs index 330d40f4afe9..85255a2ec407 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_getter_return.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_getter_return.rs @@ -1,8 +1,8 @@ use crate::ControlFlowGraph; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; +use biome_console::markup; +use biome_control_flow::{builder::ROOT_BLOCK_ID, ExceptionHandlerKind, InstructionKind}; use roaring::RoaringBitmap; -use rome_console::markup; -use rome_control_flow::{builder::ROOT_BLOCK_ID, ExceptionHandlerKind, InstructionKind}; use rome_js_syntax::{JsGetterClassMember, JsGetterObjectMember, JsReturnStatement}; use rome_rowan::{AstNode, NodeOrToken, TextRange}; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs index d3e38dfb9bad..4df99fe30ba7 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_grouped_type_import.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsNamedImport, AnyJsNamedImportSpecifier, JsImportNamedClause, TriviaPieceKind, T, diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_import_restrictions.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_import_restrictions.rs index 101963b0eef6..6f9b97a92865 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_import_restrictions.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_import_restrictions.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::JsModuleSource; use rome_rowan::{AstNode, TokenText}; diff --git a/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs b/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs index 65a602659b44..8099c04e8f56 100644 --- a/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs +++ b/crates/rome_js_analyze/src/analyzers/nursery/use_literal_enum_members.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsExpression, AnyJsLiteralExpression, AnyJsMemberExpression, JsUnaryOperator, TsEnumDeclaration, diff --git a/crates/rome_js_analyze/src/analyzers/performance/no_delete.rs b/crates/rome_js_analyze/src/analyzers/performance/no_delete.rs index 794c1d659bef..963abd1dc2a2 100644 --- a/crates/rome_js_analyze/src/analyzers/performance/no_delete.rs +++ b/crates/rome_js_analyze/src/analyzers/performance/no_delete.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsAssignment, AnyJsAssignmentPattern, AnyJsExpression, JsComputedMemberExpressionFields, diff --git a/crates/rome_js_analyze/src/analyzers/style/no_implicit_boolean.rs b/crates/rome_js_analyze/src/analyzers/style/no_implicit_boolean.rs index fc72c6f1e881..90b097f3c4cf 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_implicit_boolean.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_implicit_boolean.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsLiteralExpression, AnyJsxAttributeValue, JsSyntaxKind, JsxAttribute, JsxAttributeFields, T, diff --git a/crates/rome_js_analyze/src/analyzers/style/no_inferrable_types.rs b/crates/rome_js_analyze/src/analyzers/style/no_inferrable_types.rs index f81e61f6c0d3..b71ffe66d4c1 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_inferrable_types.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_inferrable_types.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{ AnyJsExpression, AnyTsPropertyAnnotation, AnyTsVariableAnnotation, JsFormalParameter, JsInitializerClause, JsPropertyClassMember, JsSyntaxKind, JsVariableDeclaration, diff --git a/crates/rome_js_analyze/src/analyzers/style/no_namespace.rs b/crates/rome_js_analyze/src/analyzers/style/no_namespace.rs index 557256de3d3b..956cc58402f7 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_namespace.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_namespace.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::TsModuleDeclaration; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/style/no_negation_else.rs b/crates/rome_js_analyze/src/analyzers/style/no_negation_else.rs index a7a4e00199a6..4f396fae2107 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_negation_else.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_negation_else.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsExpression, AnyJsStatement, JsConditionalExpression, JsIfStatement, JsUnaryExpression, diff --git a/crates/rome_js_analyze/src/analyzers/style/no_non_null_assertion.rs b/crates/rome_js_analyze/src/analyzers/style/no_non_null_assertion.rs index 8b0db64508a0..4ab093369259 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_non_null_assertion.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_non_null_assertion.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsExpression, TsNonNullAssertionAssignment, TsNonNullAssertionExpression, T, diff --git a/crates/rome_js_analyze/src/analyzers/style/no_parameter_properties.rs b/crates/rome_js_analyze/src/analyzers/style/no_parameter_properties.rs index ec52f9e1f6ef..2259b85d234d 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_parameter_properties.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_parameter_properties.rs @@ -1,6 +1,6 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::TsPropertyParameter; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/style/no_unused_template_literal.rs b/crates/rome_js_analyze/src/analyzers/style/no_unused_template_literal.rs index 079f00df1f70..a2df79ead9c9 100644 --- a/crates/rome_js_analyze/src/analyzers/style/no_unused_template_literal.rs +++ b/crates/rome_js_analyze/src/analyzers/style/no_unused_template_literal.rs @@ -1,8 +1,8 @@ use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsExpression, AnyJsLiteralExpression, AnyJsTemplateElement, JsTemplateExpression, diff --git a/crates/rome_js_analyze/src/analyzers/style/use_block_statements.rs b/crates/rome_js_analyze/src/analyzers/style/use_block_statements.rs index 48a3c1fe4920..757910088ce8 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_block_statements.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_block_statements.rs @@ -1,7 +1,7 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleAction, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsStatement, JsDoWhileStatement, JsElseClause, JsForInStatement, JsForOfStatement, diff --git a/crates/rome_js_analyze/src/analyzers/style/use_default_parameter_last.rs b/crates/rome_js_analyze/src/analyzers/style/use_default_parameter_last.rs index ad560c69c301..f712f9165c43 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_default_parameter_last.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_default_parameter_last.rs @@ -1,7 +1,7 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{JsFormalParameter, JsInitializerClause, JsSyntaxToken, TsPropertyParameter}; use rome_rowan::{declare_node_union, AstNode, BatchMutationExt, Direction}; diff --git a/crates/rome_js_analyze/src/analyzers/style/use_enum_initializers.rs b/crates/rome_js_analyze/src/analyzers/style/use_enum_initializers.rs index cc9ca90e4914..788d5e153649 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_enum_initializers.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_enum_initializers.rs @@ -1,8 +1,8 @@ use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsExpression, AnyJsLiteralExpression, JsSyntaxKind, TsEnumDeclaration}; use rome_rowan::{AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/style/use_exponentiation_operator.rs b/crates/rome_js_analyze/src/analyzers/style/use_exponentiation_operator.rs index 5f41eae2d59d..0d58cca1c5c3 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_exponentiation_operator.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_exponentiation_operator.rs @@ -2,8 +2,8 @@ use crate::semantic_services::Semantic; use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::{make, syntax::T}; use rome_js_syntax::{ global_identifier, AnyJsCallArgument, AnyJsExpression, AnyJsMemberExpression, JsBinaryOperator, diff --git a/crates/rome_js_analyze/src/analyzers/style/use_numeric_literals.rs b/crates/rome_js_analyze/src/analyzers/style/use_numeric_literals.rs index 01624973364f..e466c0ee0912 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_numeric_literals.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_numeric_literals.rs @@ -2,8 +2,8 @@ use crate::semantic_services::Semantic; use crate::{ast_utils, JsRuleAction}; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_semantic::SemanticModel; use rome_js_syntax::{ diff --git a/crates/rome_js_analyze/src/analyzers/style/use_self_closing_elements.rs b/crates/rome_js_analyze/src/analyzers/style/use_self_closing_elements.rs index 881d47b2e78f..73660689b7ea 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_self_closing_elements.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_self_closing_elements.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsxTag, JsSyntaxToken, JsxElement, JsxOpeningElementFields, T}; use rome_rowan::{AstNode, AstNodeList, BatchMutationExt, TriviaPiece}; diff --git a/crates/rome_js_analyze/src/analyzers/style/use_shorthand_array_type.rs b/crates/rome_js_analyze/src/analyzers/style/use_shorthand_array_type.rs index 2e324d418272..d6540ec76eb6 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_shorthand_array_type.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_shorthand_array_type.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyTsType, JsSyntaxKind, JsSyntaxToken, TriviaPieceKind, TsReferenceType, TsTypeArguments, T, diff --git a/crates/rome_js_analyze/src/analyzers/style/use_single_case_statement.rs b/crates/rome_js_analyze/src/analyzers/style/use_single_case_statement.rs index b7c1e195bfb0..c3111b4fc28f 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_single_case_statement.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_single_case_statement.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsStatement, AnyJsSwitchClause, TriviaPieceKind, T}; use rome_rowan::{AstNode, AstNodeList, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/style/use_single_var_declarator.rs b/crates/rome_js_analyze/src/analyzers/style/use_single_var_declarator.rs index 3c1dfdf1dab6..dfdf7940306d 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_single_var_declarator.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_single_var_declarator.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ JsModuleItemList, JsStatementList, JsSyntaxToken, JsVariableDeclarationFields, diff --git a/crates/rome_js_analyze/src/analyzers/style/use_template.rs b/crates/rome_js_analyze/src/analyzers/style/use_template.rs index cc2d4dc78eba..54a24cdcb392 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_template.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_template.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::AnyJsTemplateElement::{self, JsTemplateElement}; use rome_js_syntax::{ diff --git a/crates/rome_js_analyze/src/analyzers/style/use_while.rs b/crates/rome_js_analyze/src/analyzers/style/use_while.rs index 14da75157e59..5d4e7c9443a6 100644 --- a/crates/rome_js_analyze/src/analyzers/style/use_while.rs +++ b/crates/rome_js_analyze/src/analyzers/style/use_while.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsStatement, JsForStatement, JsForStatementFields, T}; use rome_rowan::BatchMutationExt; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_assign_in_expressions.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_assign_in_expressions.rs index 8972348303d3..705157c7c2c3 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_assign_in_expressions.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_assign_in_expressions.rs @@ -1,7 +1,7 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsArrayAssignmentPatternElement, AnyJsArrayElement, AnyJsAssignment, AnyJsAssignmentPattern, diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_async_promise_executor.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_async_promise_executor.rs index 0ad494f57989..e0f57a969439 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_async_promise_executor.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_async_promise_executor.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsCallArgument, AnyJsExpression, AnyJsFunction, JsNewExpression, JsNewExpressionFields, }; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_comment_text.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_comment_text.rs index 33da159e2044..20569fc65ade 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_comment_text.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_comment_text.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsxChild, JsxText, TriviaPieceKind, T}; use rome_rowan::{AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_compare_neg_zero.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_compare_neg_zero.rs index ab219d7e4221..8357af680e37 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_compare_neg_zero.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_compare_neg_zero.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsExpression, AnyJsLiteralExpression, JsBinaryExpression, JsSyntaxKind, JsUnaryOperator, diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_confusing_labels.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_confusing_labels.rs index 4d5c3b00803b..3f2460f8d55f 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_confusing_labels.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_confusing_labels.rs @@ -1,6 +1,6 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{AnyJsStatement, JsLabeledStatement}; declare_rule! { diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_const_enum.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_const_enum.rs index 9c41022f216a..9691df80e302 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_const_enum.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_const_enum.rs @@ -1,7 +1,7 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::TsEnumDeclaration; use rome_rowan::{chain_trivia_pieces, trim_leading_trivia_pieces, AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_debugger.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_debugger.rs index cc9bff7079e2..b361365b6282 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_debugger.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_debugger.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::JsDebuggerStatement; use rome_rowan::{AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_double_equals.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_double_equals.rs index ab1dde742f9d..40d9fd71c309 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_double_equals.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_double_equals.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsExpression, AnyJsLiteralExpression, JsBinaryExpression, T}; use rome_js_syntax::{JsSyntaxKind::*, JsSyntaxToken}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_jsx_props.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_jsx_props.rs index 0003f47081e8..7918dd8ec097 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_jsx_props.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_jsx_props.rs @@ -1,6 +1,6 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_js_syntax::{AnyJsxAttribute, JsxAttribute}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_object_keys.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_object_keys.rs index 7033d967f6de..0ed7ba658182 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_object_keys.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_duplicate_object_keys.rs @@ -1,7 +1,7 @@ use crate::utils::batch::JsBatchMutation; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsObjectMember, JsGetterObjectMember, JsObjectExpression, JsSetterObjectMember, }; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_empty_interface.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_empty_interface.rs index f6993dc2a06a..23b3fc97aa62 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_empty_interface.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_empty_interface.rs @@ -1,8 +1,8 @@ use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::{ make, syntax::{AnyTsType, T}, diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_explicit_any.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_explicit_any.rs index 430690f65fda..6973a500f119 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_explicit_any.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_explicit_any.rs @@ -1,6 +1,6 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::TsAnyType; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_extra_non_null_assertion.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_extra_non_null_assertion.rs index bc8b3591615e..2502336f028a 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_extra_non_null_assertion.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_extra_non_null_assertion.rs @@ -1,7 +1,7 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{ AnyJsAssignment, AnyJsExpression, TsNonNullAssertionAssignment, TsNonNullAssertionExpression, }; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs index 397bc725f0ef..59a209299bce 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_prototype_builtins.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{AnyJsMemberExpression, JsCallExpression, TextRange}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_redundant_use_strict.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_redundant_use_strict.rs index 9b1b0a3f3cee..e9f902224e17 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_redundant_use_strict.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_redundant_use_strict.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{ AnyJsClass, JsDirective, JsDirectiveList, JsFunctionBody, JsModule, JsScript, }; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_shadow_restricted_names.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_shadow_restricted_names.rs index 90983452df9c..838cf249a259 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_shadow_restricted_names.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_shadow_restricted_names.rs @@ -1,6 +1,6 @@ use crate::globals::runtime::BUILTIN; use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::JsIdentifierBinding; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_sparse_array.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_sparse_array.rs index dea357ab9fb1..161a80dc6038 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_sparse_array.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_sparse_array.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsArrayElement, AnyJsExpression, JsArrayExpression, TriviaPieceKind}; use rome_rowan::{AstNode, AstNodeExt, AstSeparatedList, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/no_unsafe_negation.rs b/crates/rome_js_analyze/src/analyzers/suspicious/no_unsafe_negation.rs index 2570f4eec50a..cf4b0958b002 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/no_unsafe_negation.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/no_unsafe_negation.rs @@ -2,8 +2,8 @@ use crate::JsRuleAction; use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{AnyJsExpression, JsInExpression, JsInstanceofExpression}; use rome_rowan::{declare_node_union, AstNode, AstNodeExt, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/use_default_switch_clause_last.rs b/crates/rome_js_analyze/src/analyzers/suspicious/use_default_switch_clause_last.rs index d4481514fc19..4d306a2c514e 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/use_default_switch_clause_last.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/use_default_switch_clause_last.rs @@ -1,6 +1,6 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{JsCaseClause, JsDefaultClause}; use rome_rowan::{AstNode, Direction}; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs b/crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs index a551c6f1ce35..bda87bfc4e65 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/use_namespace_keyword.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{JsSyntaxToken, TsModuleDeclaration, T}; use rome_rowan::BatchMutationExt; diff --git a/crates/rome_js_analyze/src/analyzers/suspicious/use_valid_typeof.rs b/crates/rome_js_analyze/src/analyzers/suspicious/use_valid_typeof.rs index 83f545bbf5a8..1d9ac874b05b 100644 --- a/crates/rome_js_analyze/src/analyzers/suspicious/use_valid_typeof.rs +++ b/crates/rome_js_analyze/src/analyzers/suspicious/use_valid_typeof.rs @@ -1,8 +1,8 @@ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsExpression, AnyJsLiteralExpression, JsBinaryExpression, JsBinaryExpressionFields, diff --git a/crates/rome_js_analyze/src/aria_analyzers/a11y/no_noninteractive_element_to_interactive_role.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/no_noninteractive_element_to_interactive_role.rs index 161e5bdc619d..b29e09c4fc92 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/a11y/no_noninteractive_element_to_interactive_role.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/a11y/no_noninteractive_element_to_interactive_role.rs @@ -1,7 +1,7 @@ use crate::aria_services::Aria; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_rowan::{AstNode, TextRange}; diff --git a/crates/rome_js_analyze/src/aria_analyzers/a11y/use_aria_props_for_role.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_aria_props_for_role.rs index 09c1cbda34a6..41068d294331 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/a11y/use_aria_props_for_role.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_aria_props_for_role.rs @@ -1,7 +1,7 @@ use crate::aria_services::Aria; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_js_syntax::JsxAttribute; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs index 981fd0e8aea1..d4b68b507d9e 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_aria_props.rs @@ -1,7 +1,7 @@ use crate::aria_services::Aria; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_rowan::{AstNode, AstNodeList, TextRange}; diff --git a/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_lang.rs b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_lang.rs index 29441a405859..f697c70e67c8 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_lang.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/a11y/use_valid_lang.rs @@ -1,7 +1,7 @@ use crate::aria_services::Aria; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_rowan::{AstNode, TextRange}; declare_rule! { diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs index 35eebb38f080..1b4a811a9aee 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_aria_unsupported_elements.rs @@ -1,6 +1,6 @@ use crate::aria_services::Aria; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_rowan::{AstNode, AstNodeList}; diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs index 50bb33c01caa..0ba852df4a71 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_noninteractive_tabindex.rs @@ -1,7 +1,7 @@ use crate::aria_services::Aria; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; use biome_aria::AriaRoles; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ jsx_ext::AnyJsxElement, AnyJsxAttributeValue, JsNumberLiteralExpression, JsStringLiteralExpression, JsUnaryExpression, TextRange, diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs index 12654773300c..6beb30e9319c 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/no_redundant_roles.rs @@ -1,8 +1,8 @@ use crate::{aria_services::Aria, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; use biome_aria::{roles::AriaRoleDefinition, AriaRoles}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_syntax::{ jsx_ext::AnyJsxElement, AnyJsxAttributeValue, JsxAttribute, JsxAttributeList, }; diff --git a/crates/rome_js_analyze/src/aria_analyzers/nursery/use_aria_prop_types.rs b/crates/rome_js_analyze/src/aria_analyzers/nursery/use_aria_prop_types.rs index 7851ca5abca2..1c1bed536091 100644 --- a/crates/rome_js_analyze/src/aria_analyzers/nursery/use_aria_prop_types.rs +++ b/crates/rome_js_analyze/src/aria_analyzers/nursery/use_aria_prop_types.rs @@ -2,7 +2,7 @@ use crate::aria_services::Aria; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; use biome_aria::AriaPropertyTypeEnum; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{JsSyntaxToken, JsxAttribute, TextRange}; use rome_rowan::AstNode; use std::slice::Iter; diff --git a/crates/rome_js_analyze/src/assists/correctness/flip_bin_exp.rs b/crates/rome_js_analyze/src/assists/correctness/flip_bin_exp.rs index 823df63a8017..e388b1f6d258 100644 --- a/crates/rome_js_analyze/src/assists/correctness/flip_bin_exp.rs +++ b/crates/rome_js_analyze/src/assists/correctness/flip_bin_exp.rs @@ -1,6 +1,6 @@ use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, RefactorKind, Rule}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ JsBinaryExpression, JsBinaryExpressionFields, JsBinaryOperator, JsSyntaxKind, T, diff --git a/crates/rome_js_analyze/src/assists/correctness/inline_variable.rs b/crates/rome_js_analyze/src/assists/correctness/inline_variable.rs index 6924bcb7bac9..f3de3c4f3b80 100644 --- a/crates/rome_js_analyze/src/assists/correctness/inline_variable.rs +++ b/crates/rome_js_analyze/src/assists/correctness/inline_variable.rs @@ -1,6 +1,6 @@ use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, RefactorKind, Rule}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_semantic::{Reference, ReferencesExtensions}; use rome_js_syntax::{ AnyJsBinding, AnyJsBindingPattern, AnyJsExpression, JsIdentifierExpression, diff --git a/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs b/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs index cf8db5377e63..1599553f339d 100644 --- a/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs +++ b/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs @@ -9,8 +9,8 @@ use std::{ use biome_analyze::{ context::RuleContext, declare_rule, ActionCategory, Ast, Rule, SourceActionKind, }; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ AnyJsImportClause, AnyJsModuleItem, AnyJsNamedImport, AnyJsNamedImportSpecifier, JsImport, diff --git a/crates/rome_js_analyze/src/control_flow.rs b/crates/rome_js_analyze/src/control_flow.rs index 417fa3d4b6e2..7b6d8e8562ce 100644 --- a/crates/rome_js_analyze/src/control_flow.rs +++ b/crates/rome_js_analyze/src/control_flow.rs @@ -4,8 +4,8 @@ use rome_js_syntax::AnyJsRoot; use rome_js_syntax::JsLanguage; use rome_js_syntax::TextRange; -pub type JsControlFlowGraph = rome_control_flow::ControlFlowGraph; -pub(crate) type FunctionBuilder = rome_control_flow::builder::FunctionBuilder; +pub type JsControlFlowGraph = biome_control_flow::ControlFlowGraph; +pub(crate) type FunctionBuilder = biome_control_flow::builder::FunctionBuilder; mod nodes; mod visitor; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/block.rs b/crates/rome_js_analyze/src/control_flow/nodes/block.rs index c2e8a60d36c2..aea9c46d7346 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/block.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/block.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsBlockStatement, JsLabeledStatement, JsSyntaxToken}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/do_while.rs b/crates/rome_js_analyze/src/control_flow/nodes/do_while.rs index 4262a553485c..44ca777e520a 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/do_while.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/do_while.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsDoWhileStatement, JsLabeledStatement, JsSyntaxToken}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/for_in.rs b/crates/rome_js_analyze/src/control_flow/nodes/for_in.rs index 116d04519714..46419fea5403 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/for_in.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/for_in.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsForInStatement, JsLabeledStatement, JsSyntaxToken}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/for_of.rs b/crates/rome_js_analyze/src/control_flow/nodes/for_of.rs index ef36e31794dd..121adbf24731 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/for_of.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/for_of.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsForOfStatement, JsLabeledStatement, JsSyntaxToken}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/for_stmt.rs b/crates/rome_js_analyze/src/control_flow/nodes/for_stmt.rs index f940696bc9cc..b4c19f04708d 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/for_stmt.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/for_stmt.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsForStatement, JsLabeledStatement, JsSyntaxToken}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/if_stmt.rs b/crates/rome_js_analyze/src/control_flow/nodes/if_stmt.rs index acb0e64f5094..b7af33923850 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/if_stmt.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/if_stmt.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsElseClause, JsIfStatement}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/switch_stmt.rs b/crates/rome_js_analyze/src/control_flow/nodes/switch_stmt.rs index d797ce3569b5..f5c5dccded4e 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/switch_stmt.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/switch_stmt.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{AnyJsSwitchClause, JsLabeledStatement, JsSwitchStatement, JsSyntaxToken}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/try_catch.rs b/crates/rome_js_analyze/src/control_flow/nodes/try_catch.rs index 6a3474d4a5e0..1df2d260aedd 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/try_catch.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/try_catch.rs @@ -1,4 +1,4 @@ -use rome_control_flow::{builder::BlockId, ExceptionHandlerKind}; +use biome_control_flow::{builder::BlockId, ExceptionHandlerKind}; use rome_js_syntax::{JsCatchClause, JsFinallyClause, JsTryFinallyStatement, JsTryStatement}; use rome_rowan::{declare_node_union, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/control_flow/nodes/while_stmt.rs b/crates/rome_js_analyze/src/control_flow/nodes/while_stmt.rs index 3b2134127ff6..ad089e078f6b 100644 --- a/crates/rome_js_analyze/src/control_flow/nodes/while_stmt.rs +++ b/crates/rome_js_analyze/src/control_flow/nodes/while_stmt.rs @@ -1,4 +1,4 @@ -use rome_control_flow::builder::BlockId; +use biome_control_flow::builder::BlockId; use rome_js_syntax::{JsLabeledStatement, JsSyntaxToken, JsWhileStatement}; use rome_rowan::{AstNode, SyntaxResult}; diff --git a/crates/rome_js_analyze/src/lib.rs b/crates/rome_js_analyze/src/lib.rs index f68d8d6087cb..e0a64d23a02e 100644 --- a/crates/rome_js_analyze/src/lib.rs +++ b/crates/rome_js_analyze/src/lib.rs @@ -188,8 +188,8 @@ impl std::fmt::Display for RuleError { } } -impl rome_console::fmt::Display for RuleError { - fn fmt(&self, fmt: &mut rome_console::fmt::Formatter) -> std::io::Result<()> { +impl biome_console::fmt::Display for RuleError { + fn fmt(&self, fmt: &mut biome_console::fmt::Formatter) -> std::io::Result<()> { match self { RuleError::ReplacedRootWithNonRootError { rule_name: Some((group, rule)), @@ -215,11 +215,11 @@ impl Error for RuleError {} mod tests { use biome_analyze::options::RuleOptions; use biome_analyze::{AnalyzerOptions, Never, RuleCategories, RuleFilter, RuleKey}; + use biome_console::fmt::{Formatter, Termcolor}; + use biome_console::{markup, Markup}; use biome_diagnostics::category; use biome_diagnostics::termcolor::NoColor; use biome_diagnostics::{Diagnostic, DiagnosticExt, PrintDiagnostic, Severity}; - use rome_console::fmt::{Formatter, Termcolor}; - use rome_console::{markup, Markup}; use rome_js_parser::{parse, JsParserOptions}; use rome_js_syntax::{JsFileSource, TextRange, TextSize}; use std::slice; diff --git a/crates/rome_js_analyze/src/options.rs b/crates/rome_js_analyze/src/options.rs index 6a81c916c3d5..8c41efbc3bbd 100644 --- a/crates/rome_js_analyze/src/options.rs +++ b/crates/rome_js_analyze/src/options.rs @@ -12,9 +12,9 @@ use crate::semantic_analyzers::style::no_restricted_globals::{ }; use biome_analyze::options::RuleOptions; use biome_analyze::RuleKey; +use biome_deserialize::json::VisitJsonNode; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use bpaf::Bpaf; -use rome_deserialize::json::VisitJsonNode; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_json_syntax::{AnyJsonValue, JsonLanguage, JsonMemberName, JsonObjectValue}; use rome_rowan::AstNode; #[cfg(feature = "schemars")] diff --git a/crates/rome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs b/crates/rome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs index 952176b52f2a..84c5d3bdefd7 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/a11y/no_positive_tabindex.rs @@ -2,7 +2,7 @@ use crate::react::{ReactApiCall, ReactCreateElementCall}; use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::SemanticModel; use rome_js_syntax::jsx_ext::AnyJsxElement; use rome_js_syntax::{ diff --git a/crates/rome_js_analyze/src/semantic_analyzers/a11y/use_button_type.rs b/crates/rome_js_analyze/src/semantic_analyzers/a11y/use_button_type.rs index cf58531792f9..29d15956220d 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/a11y/use_button_type.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/a11y/use_button_type.rs @@ -1,7 +1,7 @@ use crate::react::{ReactApiCall, ReactCreateElementCall}; use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsxElementName, JsCallExpression, JsxAttribute, JsxOpeningElement, JsxSelfClosingElement, TextRange, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/complexity/no_useless_fragments.rs b/crates/rome_js_analyze/src/semantic_analyzers/complexity/no_useless_fragments.rs index d03e1f1c0366..71d9a502777e 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/complexity/no_useless_fragments.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/complexity/no_useless_fragments.rs @@ -3,8 +3,8 @@ use crate::semantic_services::Semantic; use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make::{ident, js_expression_statement, jsx_string, jsx_tag_expression}; use rome_js_syntax::{ AnyJsxChild, AnyJsxElementName, AnyJsxTag, JsLanguage, JsParenthesizedExpression, JsSyntaxKind, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_children_prop.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_children_prop.rs index 90778f891709..e0704b9962c6 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_children_prop.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_children_prop.rs @@ -2,7 +2,7 @@ use crate::react::{ReactApiCall, ReactCreateElementCall}; use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{JsCallExpression, JsxAttribute}; use rome_rowan::{declare_node_union, AstNode, TextRange}; declare_rule! { diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_const_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_const_assign.rs index 195cb04d3f47..62180fbbd254 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_const_assign.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_const_assign.rs @@ -1,7 +1,7 @@ use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsArrayBindingPatternElement, AnyJsObjectBindingPatternMember, JsArrayBindingPatternElementList, JsForVariableDeclaration, JsIdentifierAssignment, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_global_object_calls.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_global_object_calls.rs index fc1bf16a05f5..8495ea54bc46 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_global_object_calls.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_global_object_calls.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{global_identifier, AnyJsExpression, JsCallExpression, JsNewExpression}; use rome_rowan::{declare_node_union, SyntaxResult, TextRange}; use std::{fmt::Display, str::FromStr}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_new_symbol.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_new_symbol.rs index 9ccb8c514ef2..4a7066f15985 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_new_symbol.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_new_symbol.rs @@ -1,7 +1,7 @@ use crate::{semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{global_identifier, AnyJsExpression, JsCallExpression, JsNewExpression}; use rome_rowan::{chain_trivia_pieces, AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_render_return_value.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_render_return_value.rs index 0b7f664bf93e..0e08b2f9145f 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_render_return_value.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_render_return_value.rs @@ -2,7 +2,7 @@ use crate::react::{is_react_call_api, ReactLibrary}; use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{JsCallExpression, JsExpressionStatement}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_undeclared_variables.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_undeclared_variables.rs index ce474529204e..22ec25fec324 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_undeclared_variables.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_undeclared_variables.rs @@ -5,7 +5,7 @@ use crate::globals::typescript::TYPESCRIPT_BUILTIN; use crate::semantic_services::SemanticServices; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{JsFileSource, Language, TextRange, TsAsExpression, TsReferenceType}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_unused_variables.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_unused_variables.rs index f8fb593ebdfc..e2ee3ca983ca 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_unused_variables.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_unused_variables.rs @@ -1,8 +1,8 @@ use crate::JsRuleAction; use crate::{semantic_services::Semantic, utils::rename::RenameSymbolExtensions}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_semantic::{ReferencesExtensions, SemanticScopeExtensions}; use rome_js_syntax::{ binding_ext::{AnyJsBindingDeclaration, AnyJsIdentifierBinding, JsAnyParameterParentFunction}, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_void_elements_with_children.rs b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_void_elements_with_children.rs index 70f090aa072a..33d7b0e6d207 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_void_elements_with_children.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/correctness/no_void_elements_with_children.rs @@ -3,8 +3,8 @@ use crate::semantic_services::Semantic; use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::{markup, MarkupBuf}; use biome_diagnostics::Applicability; -use rome_console::{markup, MarkupBuf}; use rome_js_factory::make::{jsx_attribute_list, jsx_self_closing_element}; use rome_js_syntax::{ AnyJsxAttribute, JsCallExpression, JsPropertyObjectMember, JsxAttribute, JsxElement, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs index bfdd4d8ee04c..c3e627fee758 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_accumulating_spread.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::SemanticModel; use rome_js_syntax::{ AnyJsFunction, AnyJsMemberExpression, JsCallArgumentList, JsCallArguments, JsCallExpression, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_banned_types.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_banned_types.rs index cece037d4ec7..55560ebc7030 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_banned_types.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_banned_types.rs @@ -2,8 +2,8 @@ use std::fmt::Display; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ JsReferenceIdentifier, JsSyntaxKind, TextRange, TsIntersectionTypeElementList, TsObjectType, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs index 978395747f14..961ff7c8af38 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_constant_condition.rs @@ -1,6 +1,6 @@ use crate::{semantic_services::Semantic, utils::rename::RenamableNode}; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::SemanticModel; use rome_js_syntax::{ AnyJsArrayElement, AnyJsExpression, AnyJsLiteralExpression, AnyJsStatement, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_finite.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_finite.rs index b17671573369..ce7fa530d3d2 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_finite.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_finite.rs @@ -1,7 +1,7 @@ use crate::{semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{global_identifier, AnyJsExpression, T}; use rome_rowan::{AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_nan.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_nan.rs index 3ce374fbd563..236f24ff6419 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_nan.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_global_is_nan.rs @@ -1,7 +1,7 @@ use crate::{semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{global_identifier, AnyJsExpression, T}; use rome_rowan::{AstNode, BatchMutationExt}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_unsafe_declaration_merging.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_unsafe_declaration_merging.rs index 64d654ecd9bb..bb67abed03d9 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_unsafe_declaration_merging.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_unsafe_declaration_merging.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{binding_ext::AnyJsBindingDeclaration, TsInterfaceDeclaration}; use rome_rowan::{AstNode, TextRange}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_useless_this_alias.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_useless_this_alias.rs index 1f9dc8e3126c..2f6645b121b4 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_useless_this_alias.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/no_useless_this_alias.rs @@ -1,7 +1,7 @@ use crate::{control_flow::AnyJsControlFlowRoot, semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_semantic::ReferencesExtensions; use rome_js_syntax::{ diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_exhaustive_dependencies.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_exhaustive_dependencies.rs index ce11351df0bc..f7f6ecd75cbf 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_exhaustive_dependencies.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_exhaustive_dependencies.rs @@ -1,10 +1,10 @@ use crate::react::hooks::*; use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; +use biome_console::markup; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use bpaf::Bpaf; -use rome_console::markup; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_js_semantic::{Capture, SemanticModel}; use rome_js_syntax::{ binding_ext::AnyJsBindingDeclaration, JsCallExpression, JsStaticMemberExpression, JsSyntaxKind, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs index 7f7b283e9186..6f037c7b8ca8 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_hook_at_top_level.rs @@ -2,7 +2,7 @@ use super::use_exhaustive_dependencies::ReactExtensiveDependenciesOptions; use crate::semantic_analyzers::nursery::use_exhaustive_dependencies::HooksOptions; use crate::{react::hooks::react_hook_configuration, semantic_services::Semantic}; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::CallsExtensions; use rome_js_syntax::{AnyJsFunction, JsCallExpression, JsFunctionBody, JsSyntaxKind, TextRange}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_is_array.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_is_array.rs index 7427a041c2ae..29fab395c41d 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_is_array.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_is_array.rs @@ -1,7 +1,7 @@ use crate::{semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{ global_identifier, AnyJsCallArgument, AnyJsExpression, JsInstanceofExpression, T, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_naming_convention.rs b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_naming_convention.rs index 212f139cd35d..a5a084cf847f 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_naming_convention.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/nursery/use_naming_convention.rs @@ -8,14 +8,14 @@ use crate::{ JsRuleAction, }; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; -use biome_diagnostics::Applicability; -use biome_js_unicode_table::is_js_ident; -use bpaf::Bpaf; -use rome_console::markup; -use rome_deserialize::{ +use biome_console::markup; +use biome_deserialize::{ json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}, DeserializationDiagnostic, VisitNode, }; +use biome_diagnostics::Applicability; +use biome_js_unicode_table::is_js_ident; +use bpaf::Bpaf; use rome_js_semantic::CanBeImportedExported; use rome_js_syntax::{ binding_ext::AnyJsBindingDeclaration, inner_string_text, AnyJsClassMember, AnyJsObjectMember, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html.rs b/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html.rs index c37c3c85eac2..5a03fb293e15 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html.rs @@ -2,7 +2,7 @@ use crate::react::ReactCreateElementCall; use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{AnyJsxAttributeName, JsCallExpression, JsxAttribute}; use rome_rowan::{declare_node_union, AstNode, TextRange}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html_with_children.rs b/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html_with_children.rs index 760f434e9aa2..ec796fa905cd 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html_with_children.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/security/no_dangerously_set_inner_html_with_children.rs @@ -2,7 +2,7 @@ use crate::react::{ReactApiCall, ReactCreateElementCall}; use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::SemanticModel; use rome_js_syntax::{ JsCallExpression, JsPropertyObjectMember, JsSyntaxNode, JsxAttribute, JsxElement, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/no_arguments.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_arguments.rs index feb0c89f1d55..3463ba17f310 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/no_arguments.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/no_arguments.rs @@ -1,6 +1,6 @@ use crate::semantic_services::SemanticServices; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::TextRange; declare_rule! { diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/no_parameter_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_parameter_assign.rs index 4e4107eb7ac5..5554748994eb 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/no_parameter_assign.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/no_parameter_assign.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::{AllBindingWriteReferencesIter, Reference, ReferencesExtensions}; use rome_js_syntax::{AnyJsBinding, AnyJsBindingPattern, AnyJsFormalParameter, AnyJsParameter}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/no_restricted_globals.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_restricted_globals.rs index 44c35173b12b..f285ee6f590f 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/no_restricted_globals.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/no_restricted_globals.rs @@ -1,10 +1,10 @@ use crate::semantic_services::SemanticServices; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; +use biome_console::markup; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use bpaf::Bpaf; -use rome_console::markup; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_js_semantic::{Binding, BindingExtensions}; use rome_js_syntax::{ JsIdentifierAssignment, JsReferenceIdentifier, JsxReferenceIdentifier, TextRange, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/no_shouty_constants.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_shouty_constants.rs index aeaf3c096ffd..52b1c7f71afd 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/no_shouty_constants.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/no_shouty_constants.rs @@ -1,7 +1,7 @@ use crate::{semantic_services::Semantic, utils::batch::JsBatchMutation, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make::{js_literal_member_name, js_property_object_member}; use rome_js_semantic::{Reference, ReferencesExtensions}; use rome_js_syntax::{ diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/no_var.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/no_var.rs index 6482ba048a8c..2bc81dc91b8d 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/no_var.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/no_var.rs @@ -1,7 +1,7 @@ use crate::{control_flow::AnyJsControlFlowRoot, semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make; use rome_js_syntax::{JsModule, JsScript, JsSyntaxKind}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/use_const.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/use_const.rs index 3f4997798a59..0ff863a446c2 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/use_const.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/use_const.rs @@ -1,6 +1,6 @@ use crate::{semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use biome_diagnostics::Applicability; use rome_js_factory::make; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/style/use_fragment_syntax.rs b/crates/rome_js_analyze/src/semantic_analyzers/style/use_fragment_syntax.rs index 73838d5f7fef..3e0902a22e92 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/style/use_fragment_syntax.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/style/use_fragment_syntax.rs @@ -3,8 +3,8 @@ use crate::semantic_services::Semantic; use crate::JsRuleAction; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, ActionCategory, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::Applicability; -use rome_console::markup; use rome_js_factory::make::{ jsx_child_list, jsx_closing_fragment, jsx_fragment, jsx_opening_fragment, }; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_array_index_key.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_array_index_key.rs index ae6b6238e161..7e5d07e73c89 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_array_index_key.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_array_index_key.rs @@ -2,7 +2,7 @@ use crate::react::{is_react_call_api, ReactLibrary}; use crate::semantic_services::Semantic; use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{ AnyJsFunction, AnyJsMemberExpression, JsCallArgumentList, JsCallArguments, JsCallExpression, JsFormalParameter, JsObjectExpression, JsObjectMemberList, JsParameterList, JsParameters, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_catch_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_catch_assign.rs index 9d2d92e769fa..d215ad252659 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_catch_assign.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_catch_assign.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::ReferencesExtensions; use rome_js_syntax::JsCatchClause; use rome_rowan::{AstNode, TextRange}; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_class_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_class_assign.rs index aa0c8ff09c3f..030965d6b282 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_class_assign.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_class_assign.rs @@ -1,6 +1,6 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::{Reference, ReferencesExtensions}; use rome_js_syntax::AnyJsClass; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_console_log.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_console_log.rs index b9d74263bfc7..dc50f468d9df 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_console_log.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_console_log.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{global_identifier, AnyJsMemberExpression, JsCallExpression}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_duplicate_parameters.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_duplicate_parameters.rs index bdb5120fa555..a5d76ee5808f 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_duplicate_parameters.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_duplicate_parameters.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::parameter_ext::{AnyJsParameterList, AnyJsParameters, AnyParameter}; use rome_js_syntax::{ AnyJsArrayBindingPatternElement, AnyJsBinding, AnyJsBindingPattern, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_function_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_function_assign.rs index a434d36ea01c..059002cd409d 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_function_assign.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_function_assign.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::{Reference, ReferencesExtensions}; use rome_js_syntax::{JsFunctionDeclaration, JsIdentifierBinding}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_import_assign.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_import_assign.rs index 948f689d0e78..884307a6379e 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_import_assign.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_import_assign.rs @@ -1,6 +1,6 @@ use crate::semantic_services::Semantic; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::ReferencesExtensions; use rome_js_syntax::{ JsDefaultImportSpecifier, JsIdentifierAssignment, JsIdentifierBinding, JsImportDefaultClause, diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_label_var.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_label_var.rs index ac1e79652941..ac7d58e47c05 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_label_var.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_label_var.rs @@ -1,6 +1,6 @@ use crate::{semantic_services::Semantic, JsRuleAction}; use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_syntax::{JsLabeledStatement, JsSyntaxNode, JsSyntaxToken}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_redeclare.rs b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_redeclare.rs index 681c93af7667..c3dc0e9cd2c7 100644 --- a/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_redeclare.rs +++ b/crates/rome_js_analyze/src/semantic_analyzers/suspicious/no_redeclare.rs @@ -1,7 +1,7 @@ use crate::semantic_services::SemanticServices; use biome_analyze::declare_rule; use biome_analyze::{context::RuleContext, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::Scope; use rome_js_syntax::binding_ext::AnyJsBindingDeclaration; use rome_js_syntax::{ diff --git a/crates/rome_js_analyze/src/syntax/nursery/no_super_without_extends.rs b/crates/rome_js_analyze/src/syntax/nursery/no_super_without_extends.rs index 556682a71d2d..4e8caefe41a7 100644 --- a/crates/rome_js_analyze/src/syntax/nursery/no_super_without_extends.rs +++ b/crates/rome_js_analyze/src/syntax/nursery/no_super_without_extends.rs @@ -1,7 +1,7 @@ use biome_analyze::context::RuleContext; use biome_analyze::{declare_rule, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; use biome_diagnostics::category; -use rome_console::markup; use rome_js_syntax::{JsClassDeclaration, JsSuperExpression}; use rome_rowan::AstNode; diff --git a/crates/rome_js_analyze/src/utils/rename.rs b/crates/rome_js_analyze/src/utils/rename.rs index 694bacf07ac2..4233dd7616e2 100644 --- a/crates/rome_js_analyze/src/utils/rename.rs +++ b/crates/rome_js_analyze/src/utils/rename.rs @@ -1,6 +1,6 @@ +use biome_console::fmt::Formatter; +use biome_console::markup; use biome_diagnostics::{Diagnostic, Location, Severity}; -use rome_console::fmt::Formatter; -use rome_console::markup; use rome_js_semantic::{ReferencesExtensions, SemanticModel}; use rome_js_syntax::{ binding_ext::AnyJsIdentifierBinding, JsIdentifierAssignment, JsIdentifierBinding, JsLanguage, diff --git a/crates/rome_js_formatter/Cargo.toml b/crates/rome_js_formatter/Cargo.toml index 8c76ca8ea805..352e4212fdd0 100644 --- a/crates/rome_js_formatter/Cargo.toml +++ b/crates/rome_js_formatter/Cargo.toml @@ -12,10 +12,10 @@ version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +biome_deserialize = { workspace = true } biome_diagnostics_categories = { workspace = true } biome_text_size = { workspace = true } cfg-if = "1.0.0" -rome_deserialize = { workspace = true } rome_formatter = { workspace = true } rome_js_factory = { workspace = true } rome_js_syntax = { workspace = true } diff --git a/crates/rome_js_formatter/src/context.rs b/crates/rome_js_formatter/src/context.rs index 40bd5db46973..37ea16396d2e 100644 --- a/crates/rome_js_formatter/src/context.rs +++ b/crates/rome_js_formatter/src/context.rs @@ -1,7 +1,7 @@ use crate::comments::{FormatJsLeadingComment, JsCommentStyle, JsComments}; use crate::context::trailing_comma::TrailingComma; -use rome_deserialize::json::with_only_known_variants; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; +use biome_deserialize::json::with_only_known_variants; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_formatter::printer::PrinterOptions; use rome_formatter::token::string::Quote; use rome_formatter::{ diff --git a/crates/rome_js_formatter/src/context/trailing_comma.rs b/crates/rome_js_formatter/src/context/trailing_comma.rs index a649c1e0471f..2f42254bda56 100644 --- a/crates/rome_js_formatter/src/context/trailing_comma.rs +++ b/crates/rome_js_formatter/src/context/trailing_comma.rs @@ -1,7 +1,7 @@ use crate::prelude::*; use crate::{JsFormatContext, JsFormatOptions}; -use rome_deserialize::json::with_only_known_variants; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; +use biome_deserialize::json::with_only_known_variants; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_formatter::formatter::Formatter; use rome_formatter::prelude::{if_group_breaks, text}; use rome_formatter::write; diff --git a/crates/rome_js_parser/Cargo.toml b/crates/rome_js_parser/Cargo.toml index ccf5a0570690..73eab79d528e 100644 --- a/crates/rome_js_parser/Cargo.toml +++ b/crates/rome_js_parser/Cargo.toml @@ -11,6 +11,7 @@ repository.workspace = true version = "0.1.0" [dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } biome_js_unicode_table = { workspace = true } biome_parser = { workspace = true } @@ -18,7 +19,6 @@ bitflags = { workspace = true } cfg-if = "1.0.0" drop_bomb = "0.1.5" indexmap = { workspace = true } -rome_console = { workspace = true } rome_js_factory = { workspace = true } rome_js_syntax = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/rome_js_parser/src/parser/rewrite_parser.rs b/crates/rome_js_parser/src/parser/rewrite_parser.rs index f111049049f0..359740583baa 100644 --- a/crates/rome_js_parser/src/parser/rewrite_parser.rs +++ b/crates/rome_js_parser/src/parser/rewrite_parser.rs @@ -2,13 +2,13 @@ use crate::parser::JsParser; use crate::token_source::TokenSourceCheckpoint; use crate::prelude::*; +use biome_console::fmt::Display; use biome_diagnostics::location::AsSpan; use biome_parser::{ diagnostic::{ParseDiagnostic, ToDiagnostic}, event::Event, CompletedMarker, Marker, }; -use rome_console::fmt::Display; use rome_js_syntax::{JsSyntaxKind, TextRange}; use rome_rowan::TextSize; diff --git a/crates/rome_js_parser/src/test_utils.rs b/crates/rome_js_parser/src/test_utils.rs index 1efb37d3a649..3b29fb05e356 100644 --- a/crates/rome_js_parser/src/test_utils.rs +++ b/crates/rome_js_parser/src/test_utils.rs @@ -1,8 +1,8 @@ use crate::Parse; +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::markup; use biome_diagnostics::DiagnosticExt; use biome_diagnostics::{termcolor::Buffer, PrintDiagnostic}; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::markup; use rome_js_syntax::{JsLanguage, JsSyntaxNode}; use rome_rowan::{AstNode, SyntaxKind, SyntaxSlot}; use std::{fmt::Debug, path::Path}; diff --git a/crates/rome_js_parser/src/tests.rs b/crates/rome_js_parser/src/tests.rs index f6d22b466c0e..29a03483a08e 100644 --- a/crates/rome_js_parser/src/tests.rs +++ b/crates/rome_js_parser/src/tests.rs @@ -1,10 +1,10 @@ use crate::test_utils::has_bogus_nodes_or_empty_slots; use crate::{parse, parse_module, test_utils::assert_errors_are_absent, JsParserOptions, Parse}; +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::markup; use biome_diagnostics::DiagnosticExt; use biome_diagnostics::PrintDiagnostic; use expect_test::expect_file; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::markup; use rome_js_syntax::{AnyJsRoot, JsFileSource, JsSyntaxKind}; use rome_js_syntax::{JsCallArguments, JsLogicalExpression, JsSyntaxToken}; use rome_rowan::{AstNode, Direction, TextSize}; diff --git a/crates/rome_js_semantic/Cargo.toml b/crates/rome_js_semantic/Cargo.toml index 289e08d46355..c579114a1cef 100644 --- a/crates/rome_js_semantic/Cargo.toml +++ b/crates/rome_js_semantic/Cargo.toml @@ -15,7 +15,7 @@ rust-lapper = "1.0.1" rustc-hash = { workspace = true } [dev-dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } biome_markup = { workspace = true } -rome_console = { workspace = true } rome_js_parser = { workspace = true } diff --git a/crates/rome_js_semantic/src/tests/assertions.rs b/crates/rome_js_semantic/src/tests/assertions.rs index 9e694c5f558c..60b474aabbca 100644 --- a/crates/rome_js_semantic/src/tests/assertions.rs +++ b/crates/rome_js_semantic/src/tests/assertions.rs @@ -1,9 +1,9 @@ use crate::{semantic_events, SemanticEvent}; +use biome_console::{markup, ConsoleExt, EnvConsole}; use biome_diagnostics::location::AsSpan; use biome_diagnostics::{ Advices, Diagnostic, DiagnosticExt, Location, LogCategory, PrintDiagnostic, Visit, }; -use rome_console::{markup, ConsoleExt, EnvConsole}; use rome_js_parser::JsParserOptions; use rome_js_syntax::{AnyJsRoot, JsFileSource, JsSyntaxToken, TextRange, TextSize, WalkEvent}; use rome_rowan::{AstNode, NodeOrToken}; diff --git a/crates/rome_js_syntax/Cargo.toml b/crates/rome_js_syntax/Cargo.toml index dbdc6636bae9..87a894b894c9 100644 --- a/crates/rome_js_syntax/Cargo.toml +++ b/crates/rome_js_syntax/Cargo.toml @@ -9,8 +9,8 @@ repository.workspace = true version = "0.2.0" [dependencies] +biome_console = { version = "0.0.1", path = "../biome_console" } biome_diagnostics = { version = "0.2.0", path = "../biome_diagnostics" } -rome_console = { version = "0.0.1", path = "../rome_console" } rome_rowan = { version = "0.2.0", path = "../rome_rowan" } schemars = { version = "0.8.10", optional = true } serde = { version = "1.0.136", features = ["derive"], optional = true } diff --git a/crates/rome_js_syntax/src/suppression.rs b/crates/rome_js_syntax/src/suppression.rs index bc43f542642a..a01697a66bd7 100644 --- a/crates/rome_js_syntax/src/suppression.rs +++ b/crates/rome_js_syntax/src/suppression.rs @@ -148,8 +148,8 @@ impl std::fmt::Display for SuppressionDiagnosticKind { } } -impl rome_console::fmt::Display for SuppressionDiagnosticKind { - fn fmt(&self, fmt: &mut rome_console::fmt::Formatter) -> std::io::Result<()> { +impl biome_console::fmt::Display for SuppressionDiagnosticKind { + fn fmt(&self, fmt: &mut biome_console::fmt::Formatter) -> std::io::Result<()> { match self { SuppressionDiagnosticKind::MissingColon => write!( fmt, diff --git a/crates/rome_js_transform/Cargo.toml b/crates/rome_js_transform/Cargo.toml index 65a482dba245..a08cea281f89 100644 --- a/crates/rome_js_transform/Cargo.toml +++ b/crates/rome_js_transform/Cargo.toml @@ -10,9 +10,9 @@ version = "0.2.0" [dependencies] biome_analyze = { workspace = true } +biome_console = { workspace = true } biome_diagnostics = { workspace = true } lazy_static = { workspace = true } -rome_console = { workspace = true } rome_js_factory = { workspace = true } rome_js_syntax = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/rome_json_analyze/Cargo.toml b/crates/rome_json_analyze/Cargo.toml index 60df6680d5f0..865bf991b3c6 100644 --- a/crates/rome_json_analyze/Cargo.toml +++ b/crates/rome_json_analyze/Cargo.toml @@ -10,9 +10,9 @@ version = "0.2.0" [dependencies] biome_analyze = { workspace = true } +biome_console = { workspace = true } biome_diagnostics = { workspace = true } lazy_static = { workspace = true } -rome_console = { workspace = true } rome_json_syntax = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/rome_json_analyze/src/analyzers/nursery/no_duplicate_json_keys.rs b/crates/rome_json_analyze/src/analyzers/nursery/no_duplicate_json_keys.rs index 17f8f95b0241..064bb7b2ee8c 100644 --- a/crates/rome_json_analyze/src/analyzers/nursery/no_duplicate_json_keys.rs +++ b/crates/rome_json_analyze/src/analyzers/nursery/no_duplicate_json_keys.rs @@ -1,5 +1,5 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; -use rome_console::markup; +use biome_console::markup; use rome_json_syntax::{JsonMemberName, JsonObjectValue, TextRange}; use rome_rowan::{AstNode, AstSeparatedList}; use std::collections::HashMap; diff --git a/crates/rome_json_analyze/src/lib.rs b/crates/rome_json_analyze/src/lib.rs index 24247ec7b1d5..1f4bc565d113 100644 --- a/crates/rome_json_analyze/src/lib.rs +++ b/crates/rome_json_analyze/src/lib.rs @@ -99,10 +99,10 @@ where #[cfg(test)] mod tests { use biome_analyze::{AnalyzerOptions, Never, RuleFilter}; + use biome_console::fmt::{Formatter, Termcolor}; + use biome_console::{markup, Markup}; use biome_diagnostics::termcolor::NoColor; use biome_diagnostics::{Diagnostic, DiagnosticExt, PrintDiagnostic, Severity}; - use rome_console::fmt::{Formatter, Termcolor}; - use rome_console::{markup, Markup}; use rome_json_parser::{parse_json, JsonParserOptions}; use rome_json_syntax::TextRange; use std::slice; diff --git a/crates/rome_json_parser/Cargo.toml b/crates/rome_json_parser/Cargo.toml index fecff9b7e04e..8a2252aa73f7 100644 --- a/crates/rome_json_parser/Cargo.toml +++ b/crates/rome_json_parser/Cargo.toml @@ -11,10 +11,10 @@ repository.workspace = true version = "0.1.0" [dependencies] +biome_console = { workspace = true } biome_diagnostics = { workspace = true } biome_js_unicode_table = { workspace = true } biome_parser = { workspace = true } -rome_console = { workspace = true } rome_json_factory = { workspace = true } rome_json_syntax = { workspace = true } rome_rowan = { workspace = true } diff --git a/crates/rome_json_parser/tests/spec_test.rs b/crates/rome_json_parser/tests/spec_test.rs index a8b70bc58add..2e8b599cc0f6 100644 --- a/crates/rome_json_parser/tests/spec_test.rs +++ b/crates/rome_json_parser/tests/spec_test.rs @@ -1,8 +1,8 @@ +use biome_console::fmt::{Formatter, Termcolor}; +use biome_console::markup; use biome_diagnostics::display::PrintDiagnostic; use biome_diagnostics::termcolor; use biome_diagnostics::DiagnosticExt; -use rome_console::fmt::{Formatter, Termcolor}; -use rome_console::markup; use rome_json_parser::{parse_json, JsonParserOptions}; use rome_rowan::SyntaxKind; use std::fmt::Write; diff --git a/crates/rome_service/Cargo.toml b/crates/rome_service/Cargo.toml index b120d65ecf1c..ce291ef9d820 100644 --- a/crates/rome_service/Cargo.toml +++ b/crates/rome_service/Cargo.toml @@ -10,6 +10,8 @@ version = "0.0.0" [dependencies] biome_analyze = { workspace = true, features = ["serde"] } +biome_console = { workspace = true } +biome_deserialize = { workspace = true } biome_diagnostics = { workspace = true } biome_flags = { workspace = true } biome_parser = { workspace = true } @@ -17,8 +19,6 @@ biome_text_edit = { workspace = true } bpaf = { workspace = true } dashmap = { workspace = true } indexmap = { workspace = true, features = ["serde"] } -rome_console = { workspace = true } -rome_deserialize = { workspace = true } rome_formatter = { workspace = true, features = ["serde"] } rome_fs = { workspace = true, features = ["serde"] } rome_js_analyze = { workspace = true } diff --git a/crates/rome_service/src/configuration/diagnostics.rs b/crates/rome_service/src/configuration/diagnostics.rs index bc65dec2540c..aceba4511aec 100644 --- a/crates/rome_service/src/configuration/diagnostics.rs +++ b/crates/rome_service/src/configuration/diagnostics.rs @@ -1,11 +1,11 @@ use crate::WorkspaceError; +use biome_console::fmt::Display; +use biome_console::{markup, MarkupBuf}; +use biome_deserialize::DeserializationDiagnostic; use biome_diagnostics::{ Advices, Category, Diagnostic, DiagnosticTags, Location, LogCategory, MessageAndDescription, Severity, Visit, }; -use rome_console::fmt::Display; -use rome_console::{markup, MarkupBuf}; -use rome_deserialize::DeserializationDiagnostic; use rome_rowan::SyntaxError; use serde::{Deserialize, Serialize}; use std::fmt::{Debug, Formatter}; @@ -146,7 +146,7 @@ impl Diagnostic for ConfigurationDiagnostic { } } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { match self { ConfigurationDiagnostic::SerializationError(error) => error.message(fmt), ConfigurationDiagnostic::ConfigAlreadyExists(error) => error.message(fmt), @@ -287,8 +287,8 @@ pub struct InvalidConfiguration { mod test { use crate::configuration::diagnostics::ConfigurationDiagnostic; use crate::{Configuration, MatchOptions, Matcher}; + use biome_deserialize::json::deserialize_from_json_str; use biome_diagnostics::{print_diagnostic_to_string, DiagnosticExt, Error}; - use rome_deserialize::json::deserialize_from_json_str; use rome_json_parser::JsonParserOptions; fn snap_diagnostic(test_name: &str, diagnostic: Error) { diff --git a/crates/rome_service/src/configuration/formatter.rs b/crates/rome_service/src/configuration/formatter.rs index 09318f8258d2..c1ea5f04f963 100644 --- a/crates/rome_service/src/configuration/formatter.rs +++ b/crates/rome_service/src/configuration/formatter.rs @@ -1,8 +1,8 @@ use crate::configuration::merge::MergeWith; use crate::settings::FormatSettings; use crate::{ConfigurationDiagnostic, MatchOptions, Matcher, WorkspaceError}; +use biome_deserialize::StringSet; use bpaf::Bpaf; -use rome_deserialize::StringSet; use rome_formatter::{IndentStyle, LineWidth}; use serde::{Deserialize, Serialize}; use std::str::FromStr; diff --git a/crates/rome_service/src/configuration/javascript.rs b/crates/rome_service/src/configuration/javascript.rs index a812a162e6a4..df24c074ae4e 100644 --- a/crates/rome_service/src/configuration/javascript.rs +++ b/crates/rome_service/src/configuration/javascript.rs @@ -1,6 +1,6 @@ use crate::configuration::merge::MergeWith; +use biome_deserialize::StringSet; use bpaf::Bpaf; -use rome_deserialize::StringSet; use rome_js_formatter::context::{ trailing_comma::TrailingComma, ArrowParentheses, QuoteProperties, QuoteStyle, Semicolons, }; diff --git a/crates/rome_service/src/configuration/linter/mod.rs b/crates/rome_service/src/configuration/linter/mod.rs index ad70ee8146f2..f9303f6c6b8e 100644 --- a/crates/rome_service/src/configuration/linter/mod.rs +++ b/crates/rome_service/src/configuration/linter/mod.rs @@ -5,9 +5,9 @@ pub use crate::configuration::linter::rules::{rules, Rules}; use crate::configuration::merge::MergeWith; use crate::settings::LinterSettings; use crate::{ConfigurationDiagnostic, MatchOptions, Matcher, WorkspaceError}; +use biome_deserialize::StringSet; use biome_diagnostics::Severity; use bpaf::Bpaf; -use rome_deserialize::StringSet; use rome_js_analyze::options::{possible_options, PossibleOptions}; pub use rules::*; #[cfg(feature = "schema")] diff --git a/crates/rome_service/src/configuration/mod.rs b/crates/rome_service/src/configuration/mod.rs index 7b2c1dad5bf9..d0de4db55c1d 100644 --- a/crates/rome_service/src/configuration/mod.rs +++ b/crates/rome_service/src/configuration/mod.rs @@ -21,13 +21,13 @@ use crate::configuration::vcs::{vcs_configuration, VcsConfiguration}; use crate::settings::{LanguagesSettings, LinterSettings}; use crate::{DynRef, WorkspaceError, VERSION}; use biome_analyze::{AnalyzerConfiguration, AnalyzerRules}; +use biome_deserialize::json::deserialize_from_json_str; +use biome_deserialize::{Deserialized, StringSet}; use bpaf::Bpaf; pub use formatter::{formatter_configuration, FormatterConfiguration, PlainIndentStyle}; pub use javascript::{javascript_configuration, JavascriptConfiguration, JavascriptFormatter}; pub use json::{json_configuration, JsonConfiguration}; pub use linter::{linter_configuration, LinterConfiguration, RuleConfiguration, Rules}; -use rome_deserialize::json::deserialize_from_json_str; -use rome_deserialize::{Deserialized, StringSet}; use rome_fs::{AutoSearchResult, FileSystem, OpenOptions}; use rome_js_analyze::metadata; use rome_json_formatter::context::JsonFormatOptions; diff --git a/crates/rome_service/src/configuration/organize_imports.rs b/crates/rome_service/src/configuration/organize_imports.rs index b7080f817d6b..79f719e65e3c 100644 --- a/crates/rome_service/src/configuration/organize_imports.rs +++ b/crates/rome_service/src/configuration/organize_imports.rs @@ -1,8 +1,8 @@ use crate::configuration::merge::MergeWith; use crate::settings::OrganizeImportsSettings; use crate::{ConfigurationDiagnostic, MatchOptions, Matcher, WorkspaceError}; +use biome_deserialize::StringSet; use bpaf::Bpaf; -use rome_deserialize::StringSet; use serde::{Deserialize, Serialize}; #[derive(Debug, Serialize, Deserialize, Eq, PartialEq, Clone, Bpaf)] diff --git a/crates/rome_service/src/configuration/parse/json/configuration.rs b/crates/rome_service/src/configuration/parse/json/configuration.rs index 9348dcbb060f..76fabf5d94bd 100644 --- a/crates/rome_service/src/configuration/parse/json/configuration.rs +++ b/crates/rome_service/src/configuration/parse/json/configuration.rs @@ -6,8 +6,8 @@ use crate::configuration::{ FilesConfiguration, FormatterConfiguration, JavascriptConfiguration, LinterConfiguration, }; use crate::Configuration; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; use rome_json_syntax::{JsonLanguage, JsonSyntaxNode}; use rome_rowan::SyntaxNode; diff --git a/crates/rome_service/src/configuration/parse/json/files.rs b/crates/rome_service/src/configuration/parse/json/files.rs index f75cd7df0c56..c0e683666b6b 100644 --- a/crates/rome_service/src/configuration/parse/json/files.rs +++ b/crates/rome_service/src/configuration/parse/json/files.rs @@ -1,6 +1,6 @@ use crate::configuration::FilesConfiguration; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; use rome_json_syntax::JsonLanguage; use rome_rowan::SyntaxNode; use std::num::NonZeroU64; diff --git a/crates/rome_service/src/configuration/parse/json/formatter.rs b/crates/rome_service/src/configuration/parse/json/formatter.rs index d420bacd0331..dbcb1f0d0e58 100644 --- a/crates/rome_service/src/configuration/parse/json/formatter.rs +++ b/crates/rome_service/src/configuration/parse/json/formatter.rs @@ -1,7 +1,7 @@ use crate::configuration::{FormatterConfiguration, PlainIndentStyle}; -use rome_console::markup; -use rome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; +use biome_console::markup; +use biome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; use rome_formatter::LineWidth; use rome_json_syntax::{JsonLanguage, JsonSyntaxNode}; use rome_rowan::{AstNode, SyntaxNode}; diff --git a/crates/rome_service/src/configuration/parse/json/javascript.rs b/crates/rome_service/src/configuration/parse/json/javascript.rs index 3ee6a1b60cda..d618da2b0f53 100644 --- a/crates/rome_service/src/configuration/parse/json/javascript.rs +++ b/crates/rome_service/src/configuration/parse/json/javascript.rs @@ -1,7 +1,7 @@ use crate::configuration::javascript::{JavascriptOrganizeImports, JavascriptParser}; use crate::configuration::{JavascriptConfiguration, JavascriptFormatter}; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; use rome_js_formatter::context::trailing_comma::TrailingComma; use rome_js_formatter::context::{ArrowParentheses, QuoteProperties, QuoteStyle, Semicolons}; use rome_json_syntax::{JsonLanguage, JsonSyntaxNode}; diff --git a/crates/rome_service/src/configuration/parse/json/json_configuration.rs b/crates/rome_service/src/configuration/parse/json/json_configuration.rs index 4b1901a46667..e0cd8039892a 100644 --- a/crates/rome_service/src/configuration/parse/json/json_configuration.rs +++ b/crates/rome_service/src/configuration/parse/json/json_configuration.rs @@ -1,7 +1,7 @@ use crate::configuration::json::{JsonConfiguration, JsonParser}; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_json_syntax::{JsonLanguage, JsonSyntaxNode}; use rome_rowan::SyntaxNode; diff --git a/crates/rome_service/src/configuration/parse/json/linter.rs b/crates/rome_service/src/configuration/parse/json/linter.rs index 38c106002e9b..d6409f26885a 100644 --- a/crates/rome_service/src/configuration/parse/json/linter.rs +++ b/crates/rome_service/src/configuration/parse/json/linter.rs @@ -1,9 +1,9 @@ use crate::configuration::linter::{RulePlainConfiguration, RuleWithOptions}; use crate::configuration::LinterConfiguration; use crate::{RuleConfiguration, Rules}; -use rome_console::markup; -use rome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; +use biome_console::markup; +use biome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; use rome_js_analyze::options::PossibleOptions; use rome_json_syntax::{AnyJsonValue, JsonLanguage, JsonObjectValue, JsonSyntaxNode}; use rome_rowan::{AstNode, AstSeparatedList, SyntaxNode}; diff --git a/crates/rome_service/src/configuration/parse/json/mod.rs b/crates/rome_service/src/configuration/parse/json/mod.rs index 74e37e25eff3..0f2461f56d55 100644 --- a/crates/rome_service/src/configuration/parse/json/mod.rs +++ b/crates/rome_service/src/configuration/parse/json/mod.rs @@ -12,8 +12,8 @@ mod rules; mod vcs; use crate::Configuration; -use rome_deserialize::json::{JsonDeserialize, VisitJsonNode}; -use rome_deserialize::DeserializationDiagnostic; +use biome_deserialize::json::{JsonDeserialize, VisitJsonNode}; +use biome_deserialize::DeserializationDiagnostic; use rome_json_syntax::{AnyJsonValue, JsonRoot}; use rome_rowan::AstNode; diff --git a/crates/rome_service/src/configuration/parse/json/organize_imports.rs b/crates/rome_service/src/configuration/parse/json/organize_imports.rs index 029c87168750..92c859b5cfec 100644 --- a/crates/rome_service/src/configuration/parse/json/organize_imports.rs +++ b/crates/rome_service/src/configuration/parse/json/organize_imports.rs @@ -1,6 +1,6 @@ use crate::configuration::organize_imports::OrganizeImports; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, StringSet, VisitNode}; use rome_json_syntax::{JsonLanguage, JsonSyntaxNode}; use rome_rowan::SyntaxNode; diff --git a/crates/rome_service/src/configuration/parse/json/rules.rs b/crates/rome_service/src/configuration/parse/json/rules.rs index 6bbb5552ffc0..d6182889347e 100644 --- a/crates/rome_service/src/configuration/parse/json/rules.rs +++ b/crates/rome_service/src/configuration/parse/json/rules.rs @@ -3,8 +3,8 @@ use crate::configuration::linter::*; use crate::configuration::parse::json::linter::are_recommended_and_all_correct; use crate::Rules; -use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; +use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_json_syntax::{AnyJsonValue, JsonLanguage}; use rome_rowan::{AstNode, SyntaxNode}; impl VisitJsonNode for Rules {} diff --git a/crates/rome_service/src/configuration/parse/json/vcs.rs b/crates/rome_service/src/configuration/parse/json/vcs.rs index 223d7acba7e4..8c45d7c69353 100644 --- a/crates/rome_service/src/configuration/parse/json/vcs.rs +++ b/crates/rome_service/src/configuration/parse/json/vcs.rs @@ -1,7 +1,7 @@ use crate::configuration::vcs::{VcsClientKind, VcsConfiguration}; -use rome_console::markup; -use rome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}; -use rome_deserialize::{DeserializationDiagnostic, VisitNode}; +use biome_console::markup; +use biome_deserialize::json::{has_only_known_keys, with_only_known_variants, VisitJsonNode}; +use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_json_syntax::{AnyJsonValue, JsonLanguage}; use rome_rowan::{AstNode, SyntaxNode}; diff --git a/crates/rome_service/src/diagnostics.rs b/crates/rome_service/src/diagnostics.rs index e4e84d011f83..986218091c36 100644 --- a/crates/rome_service/src/diagnostics.rs +++ b/crates/rome_service/src/diagnostics.rs @@ -1,10 +1,10 @@ use crate::file_handlers::Language; use crate::ConfigurationDiagnostic; +use biome_console::fmt::Bytes; +use biome_console::markup; use biome_diagnostics::{ category, Category, Diagnostic, DiagnosticTags, Location, Severity, Visit, }; -use rome_console::fmt::Bytes; -use rome_console::markup; use rome_formatter::{FormatError, PrintError}; use rome_fs::FileSystemDiagnostic; use rome_js_analyze::utils::rename::RenameError; @@ -156,7 +156,7 @@ impl Diagnostic for WorkspaceError { } } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { match self { WorkspaceError::FormatWithErrorsDisabled(error) => error.message(fmt), WorkspaceError::FormatError(err) => err.message(fmt), @@ -410,7 +410,7 @@ impl Diagnostic for FileTooLarge { Some(category!("internalError/fs")) } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { fmt.write_markup( markup!{ "Size of "{self.path}" is "{Bytes(self.size)}" which exceeds configured maximum of "{Bytes(self.limit)}" for this project. The file size limit exists to prevent us inadvertently slowing down and loading large files that we shouldn't." @@ -447,7 +447,7 @@ impl Diagnostic for SourceFileNotSupported { Location::builder().resource(&self.path).build() } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { if self.language != Language::Unknown { fmt.write_markup(markup! { "Biome doesn't support this feature for the language "{{&self.language}} @@ -507,7 +507,7 @@ impl Diagnostic for TransportError { } } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { match self { TransportError::SerdeError(err) => write!(fmt, "serialization error: {err}"), TransportError::ChannelClosed => fmt.write_str( diff --git a/crates/rome_service/src/file_handlers/json.rs b/crates/rome_service/src/file_handlers/json.rs index 68aa84384ae6..552a975c4382 100644 --- a/crates/rome_service/src/file_handlers/json.rs +++ b/crates/rome_service/src/file_handlers/json.rs @@ -14,9 +14,9 @@ use crate::workspace::{ }; use crate::{Configuration, Rules, WorkspaceError}; use biome_analyze::{AnalyzerOptions, ControlFlow, Never, RuleCategories}; +use biome_deserialize::json::deserialize_from_json_ast; use biome_diagnostics::{category, Diagnostic, DiagnosticExt, Severity}; use biome_parser::AnyParse; -use rome_deserialize::json::deserialize_from_json_ast; use rome_formatter::{FormatError, Printed}; use rome_fs::{RomePath, BIOME_JSON, ROME_JSON}; use rome_json_analyze::analyze; diff --git a/crates/rome_service/src/file_handlers/mod.rs b/crates/rome_service/src/file_handlers/mod.rs index ae27c0902811..41f3c0d53b3f 100644 --- a/crates/rome_service/src/file_handlers/mod.rs +++ b/crates/rome_service/src/file_handlers/mod.rs @@ -6,11 +6,11 @@ use crate::{ Rules, WorkspaceError, }; use biome_analyze::{AnalysisFilter, AnalyzerDiagnostic}; +use biome_console::fmt::Formatter; +use biome_console::markup; use biome_diagnostics::{Diagnostic, Severity}; use biome_parser::AnyParse; pub use javascript::JsFormatterSettings; -use rome_console::fmt::Formatter; -use rome_console::markup; use rome_formatter::Printed; use rome_fs::RomePath; use rome_js_syntax::{TextRange, TextSize}; @@ -141,7 +141,7 @@ impl Language { } } -impl rome_console::fmt::Display for Language { +impl biome_console::fmt::Display for Language { fn fmt(&self, fmt: &mut Formatter) -> std::io::Result<()> { match self { Language::JavaScript => fmt.write_markup(markup! { "JavaScript" }), @@ -175,7 +175,7 @@ impl std::fmt::Display for Mime { } } -impl rome_console::fmt::Display for Mime { +impl biome_console::fmt::Display for Mime { fn fmt(&self, f: &mut Formatter<'_>) -> std::io::Result<()> { write!(f, "{self}") } diff --git a/crates/rome_service/src/lib.rs b/crates/rome_service/src/lib.rs index a77ccf7dba2d..15b44027c27b 100644 --- a/crates/rome_service/src/lib.rs +++ b/crates/rome_service/src/lib.rs @@ -1,4 +1,4 @@ -use rome_console::Console; +use biome_console::Console; use rome_fs::{FileSystem, OsFileSystem}; use serde::{Deserialize, Serialize}; use std::ops::{Deref, DerefMut}; diff --git a/crates/rome_service/src/matcher/mod.rs b/crates/rome_service/src/matcher/mod.rs index 20c45be26d10..b13a83b02d8d 100644 --- a/crates/rome_service/src/matcher/mod.rs +++ b/crates/rome_service/src/matcher/mod.rs @@ -1,8 +1,8 @@ pub mod pattern; +use biome_console::markup; use biome_diagnostics::Diagnostic; pub use pattern::{MatchOptions, Pattern, PatternError}; -use rome_console::markup; use std::collections::HashMap; use std::path::Path; use std::sync::RwLock; @@ -96,7 +96,7 @@ impl Diagnostic for PatternError { write!(fmt, "{}", self.msg) } - fn message(&self, fmt: &mut rome_console::fmt::Formatter<'_>) -> std::io::Result<()> { + fn message(&self, fmt: &mut biome_console::fmt::Formatter<'_>) -> std::io::Result<()> { fmt.write_markup(markup!({ self.msg })) } } diff --git a/crates/rome_service/src/workspace.rs b/crates/rome_service/src/workspace.rs index 019f1b6448d2..d21c2ba7c07c 100644 --- a/crates/rome_service/src/workspace.rs +++ b/crates/rome_service/src/workspace.rs @@ -55,9 +55,9 @@ use crate::file_handlers::Capabilities; use crate::{Configuration, Deserialize, Serialize, WorkspaceError}; use biome_analyze::ActionCategory; pub use biome_analyze::RuleCategories; +use biome_console::{markup, Markup, MarkupBuf}; use biome_diagnostics::CodeSuggestion; use biome_text_edit::TextEdit; -use rome_console::{markup, Markup, MarkupBuf}; use rome_formatter::Printed; use rome_fs::RomePath; use rome_js_syntax::{TextRange, TextSize}; diff --git a/crates/rome_service/tests/spec_tests.rs b/crates/rome_service/tests/spec_tests.rs index f6d5729f4305..270be4e8b171 100644 --- a/crates/rome_service/tests/spec_tests.rs +++ b/crates/rome_service/tests/spec_tests.rs @@ -1,5 +1,5 @@ +use biome_deserialize::json::deserialize_from_json_str; use biome_diagnostics::{print_diagnostic_to_string, DiagnosticExt}; -use rome_deserialize::json::deserialize_from_json_str; use rome_json_parser::JsonParserOptions; use rome_service::Configuration; use std::ffi::OsStr; diff --git a/website/src/content/docs/internals/credits.mdx b/website/src/content/docs/internals/credits.mdx index 29294dff18e0..dcf8f1119d58 100644 --- a/website/src/content/docs/internals/credits.mdx +++ b/website/src/content/docs/internals/credits.mdx @@ -27,7 +27,7 @@ They have been transformed in some way, sometimes substantially rewritten. - **Original**: [`rslint/rslint_errors`](https://github.com/rslint/rslint/tree/master/crates/rslint_errors) - **License**: MIT -- [`crates/rome_console/src/codespan`](https://github.com/biomejs/biome/tree/main/crates/rome_console/src/codespan) +- [`crates/biome_console/src/codespan`](https://github.com/biomejs/biome/tree/main/crates/biome_console/src/codespan) - **Original**: [`brendanzab/codespan`](https://github.com/brendanzab/codespan) - **License**: Apache License, Version 2.0 diff --git a/xtask/bench/Cargo.toml b/xtask/bench/Cargo.toml index 94a92e6573ea..3e7cd1977bd1 100644 --- a/xtask/bench/Cargo.toml +++ b/xtask/bench/Cargo.toml @@ -6,9 +6,9 @@ version = "0.0.0" [dependencies] biome_analyze = { path = "../../crates/biome_analyze" } +biome_console = { path = "../../crates/biome_console" } biome_diagnostics = { path = "../../crates/biome_diagnostics" } biome_parser = { path = "../../crates/biome_parser" } -rome_console = { path = "../../crates/rome_console" } rome_formatter = { path = "../../crates/rome_formatter" } rome_js_analyze = { path = "../../crates/rome_js_analyze" } rome_js_formatter = { path = "../../crates/rome_js_formatter" } diff --git a/xtask/codegen/src/generate_configuration.rs b/xtask/codegen/src/generate_configuration.rs index 5824b02cd5ab..7950206a08d0 100644 --- a/xtask/codegen/src/generate_configuration.rs +++ b/xtask/codegen/src/generate_configuration.rs @@ -265,8 +265,8 @@ pub(crate) fn generate_rules_configuration(mode: Mode) -> Result<()> { let visitors = quote! { use crate::configuration::linter::*; use crate::Rules; - use rome_deserialize::json::{has_only_known_keys, VisitJsonNode}; - use rome_deserialize::{DeserializationDiagnostic, VisitNode}; + use biome_deserialize::json::{has_only_known_keys, VisitJsonNode}; + use biome_deserialize::{DeserializationDiagnostic, VisitNode}; use rome_json_syntax::{AnyJsonValue, JsonLanguage}; use rome_rowan::{AstNode, SyntaxNode}; use crate::configuration::parse::json::linter::are_recommended_and_all_correct; diff --git a/xtask/codegen/src/generate_new_lintrule.rs b/xtask/codegen/src/generate_new_lintrule.rs index c87026e2444b..06bbf2f48833 100644 --- a/xtask/codegen/src/generate_new_lintrule.rs +++ b/xtask/codegen/src/generate_new_lintrule.rs @@ -22,7 +22,7 @@ pub fn generate_new_lintrule(path: &str, rule_name: &str) { use biome_analyze::{{ context::RuleContext, declare_rule, Rule, RuleDiagnostic, }}; -use rome_console::markup; +use biome_console::markup; use rome_js_semantic::{{Reference, ReferencesExtensions}}; use rome_js_syntax::JsIdentifierBinding; diff --git a/xtask/coverage/Cargo.toml b/xtask/coverage/Cargo.toml index 5a3bfa56f487..475c9d149422 100644 --- a/xtask/coverage/Cargo.toml +++ b/xtask/coverage/Cargo.toml @@ -8,6 +8,7 @@ version = "0.0.0" ascii_table = "4.0.2" atty = { workspace = true } backtrace = "0.3.65" +biome_console = { path = "../../crates/biome_console" } biome_diagnostics = { path = "../../crates/biome_diagnostics" } biome_parser = { path = "../../crates/biome_parser" } colored = "2.0.0" @@ -15,7 +16,6 @@ indicatif = { version = "0.17.0", features = ["improved_unicode"] } once_cell = "1.9.0" pico-args = { version = "0.5.0", features = ["eq-separator"] } regex = "1.5.5" -rome_console = { path = "../../crates/rome_console" } rome_js_parser = { path = "../../crates/rome_js_parser" } rome_js_semantic = { path = "../../crates/rome_js_semantic" } rome_js_syntax = { path = "../../crates/rome_js_syntax" } diff --git a/xtask/lintdoc/Cargo.toml b/xtask/lintdoc/Cargo.toml index 55db0457524c..531df17b23bc 100644 --- a/xtask/lintdoc/Cargo.toml +++ b/xtask/lintdoc/Cargo.toml @@ -6,10 +6,10 @@ version = "0.0.0" [dependencies] biome_analyze = { path = "../../crates/biome_analyze" } +biome_console = { path = "../../crates/biome_console" } biome_diagnostics = { path = "../../crates/biome_diagnostics" } convert_case = "0.6.0" pulldown-cmark = { version = "0.9", default-features = false } -rome_console = { path = "../../crates/rome_console" } rome_formatter = { path = "../../crates/rome_formatter" } rome_js_analyze = { path = "../../crates/rome_js_analyze" } rome_js_parser = { path = "../../crates/rome_js_parser" } diff --git a/xtask/lintdoc/src/main.rs b/xtask/lintdoc/src/main.rs index eb96f15337e7..7bc292bd9965 100644 --- a/xtask/lintdoc/src/main.rs +++ b/xtask/lintdoc/src/main.rs @@ -2,15 +2,15 @@ use biome_analyze::{ AnalysisFilter, AnalyzerOptions, ControlFlow, GroupCategory, Queryable, RegistryVisitor, Rule, RuleCategory, RuleFilter, RuleGroup, RuleMetadata, }; +use biome_console::fmt::Termcolor; +use biome_console::{ + fmt::{Formatter, HTML}, + markup, Console, Markup, MarkupBuf, +}; use biome_diagnostics::termcolor::NoColor; use biome_diagnostics::{Diagnostic, DiagnosticExt, PrintDiagnostic}; use convert_case::{Case, Casing}; use pulldown_cmark::{html::write_html, CodeBlockKind, Event, LinkType, Parser, Tag}; -use rome_console::fmt::Termcolor; -use rome_console::{ - fmt::{Formatter, HTML}, - markup, Console, Markup, MarkupBuf, -}; use rome_js_parser::JsParserOptions; use rome_js_syntax::{JsFileSource, JsLanguage, Language, LanguageVariant, ModuleKind}; use rome_json_parser::JsonParserOptions; @@ -522,10 +522,10 @@ fn assert_lint( if test.expect_diagnostic { // Print all diagnostics to help the user if all_diagnostics.len() > 1 { - let mut console = rome_console::EnvConsole::default(); + let mut console = biome_console::EnvConsole::default(); for diag in all_diagnostics.iter() { console.println( - rome_console::LogLevel::Error, + biome_console::LogLevel::Error, markup! { {PrintDiagnostic::verbose(diag)} }, @@ -540,10 +540,10 @@ fn assert_lint( ); } else { // Print all diagnostics to help the user - let mut console = rome_console::EnvConsole::default(); + let mut console = biome_console::EnvConsole::default(); for diag in all_diagnostics.iter() { console.println( - rome_console::LogLevel::Error, + biome_console::LogLevel::Error, markup! { {PrintDiagnostic::verbose(diag)} },