Skip to content

feat(core): full experimental support htmlish languages#7702

Merged
ematipico merged 13 commits intonextfrom
feat/experimental-full-html
Oct 13, 2025
Merged

feat(core): full experimental support htmlish languages#7702
ematipico merged 13 commits intonextfrom
feat/experimental-full-html

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Oct 6, 2025

Summary

Closes #6657

This PR removes the current partial support, and workaround for Vue, Svelte and Astro files, and instead uses the HTML parser to deliver experimental full support.

Full support means:

  • consistent 1 formatting of CSS, JavaScript (JSX, TSX and TS) and HTML
  • consistent 1 linting and code actions of CSS, JavaScript (JSX, TSX and TS) and HTML
  • seamless LSP support out of the box

Test Plan

Updated the current snapshot tests

Docs

I added all the missing changesets that we skipped so far:

  • html.interpolation
  • support for HTML-ish languages
  • HTML linting

biomejs/website#3204

Footnotes

  1. The application of formatting and code fixes is consistent as per the configuration. This is a double-edged sword, because if you configure, for example, different quotes per language, the file will contain different quotes. We will create a discussion to address this 2

@changeset-bot
Copy link

changeset-bot bot commented Oct 6, 2025

🦋 Changeset detected

Latest commit: f1ae998

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages L-HTML Language: HTML and super languages labels Oct 6, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 6, 2025

CodSpeed Performance Report

Merging #7702 will not alter performance

Comparing feat/experimental-full-html (f1ae998) with next (d3aac63)1

Summary

✅ 53 untouched
⏩ 85 skipped2

Footnotes

  1. No successful run was found on next (6bd1e3b) during the generation of this report, so d3aac63 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 85 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions github-actions bot added the A-Linter Area: linter label Oct 7, 2025
@ematipico ematipico marked this pull request as ready for review October 7, 2025 07:14
@ematipico
Copy link
Member Author

@dyc3 and @mdevils

It seems there's a regression around some vue rule. Any idea what the reason would be?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds experimental “full HTML” support across CLI, LSP and service layers behind a new workspace feature. Parser/formatter/syntax gain AstroEmbeddedContent and related nodes/rules; DocumentFileSource/from_path and related APIs gain an extra flag to opt into full HTML behaviour. Per-extension output/offset handling is gated by the new FeaturesSupported HtmlFullSupport flag and settings.experimental_full_html_support. Code actions and diagnostics propagate an action/offset field. HTML configuration gains interpolation and experimental_full_support flags. Tests moved to snapshot-based assertions and new full-support CLI tests added. Language-id mappings now accept vuejs and vue.

Possibly related PRs

Suggested labels

L-CSS, A-Diagnostic

Suggested reviewers

  • dyc3
  • arendjr

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The PR delivers on parser expansions for .astro, .vue, and .svelte files, adds templating node support via interpolation and syntax unions, and unifies formatting and linting as per the core of issue #6657, but it does not yet implement semantic model generation for binding extraction necessary for template validation. Implement the semantic model components for extracting and exposing embedded JavaScript bindings so template validation can be completed as outlined in issue #6657.
Out of Scope Changes Check ⚠️ Warning The PR includes widespread propagation of action_offset fields and CLI/LSP adjustments across CSS, GraphQL, JSON, and JavaScript handlers that are unrelated to HTML-ish language parsing and formatting objectives. Consider extracting the offset propagation and unrelated service changes into a separate PR, keeping this one focused on HTML-ish language support.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the main change by announcing experimental full support for HTML-ish languages and references the core component, matching the PR’s primary focus.
Description Check ✅ Passed The description clearly outlines the removal of partial support in favour of experimental full HTML-ish language support, lists test updates, documentation links, and the feature flag, making it directly relevant to the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/experimental-full-html

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_service/src/file_handlers/json.rs (1)

562-618: Please use the destructured bindings.

Once we destructure params, any later params.* access touches a moved value and the file won’t compile. Let’s rely on the already bound settings, path, and language instead.

-    let CodeActionsParams {
-        parse,
-        range,
-        settings: workspace,
+    let CodeActionsParams {
+        parse,
+        range,
+        settings,
         path,
         module_graph: _,
         project_layout,
@@
-    let analyzer_options = workspace.analyzer_options::<JsonLanguage>(
-        params.path,
-        &params.language,
+    let analyzer_options = settings.analyzer_options::<JsonLanguage>(
+        path,
+        &language,
         suppression_reason.as_deref(),
     );
@@
-        AnalyzerVisitorBuilder::new(params.settings, analyzer_options)
+        AnalyzerVisitorBuilder::new(settings, analyzer_options)
🧹 Nitpick comments (1)
crates/biome_configuration/src/html.rs (1)

39-41: Update the stale comment on defaults.

The formatter now defaults to true, yet the note still says “Keep it disabled…”. Let’s refresh the comment so future readers aren’t misled. Cheers!

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6bd1e3b and bf387cb.

⛔ Files ignored due to path filters (70)
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/check_stdin_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/check_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/check_stdin_write_unsafe_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_astro_carriage_return_line_feed_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_astro_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_astro_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_empty_astro_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_stdin_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_and_fix_astro_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_astro_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_stdin_write_unsafe_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/sorts_imports_check.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/sorts_imports_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/check_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/check_stdin_write_unsafe_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_stdin_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_svelte_carriage_return_line_feed_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_svelte_ts_context_module_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_svelte_ts_context_module_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/sorts_imports_check.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/check_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/check_stdin_write_unsafe_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_empty_vue_js_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_empty_vue_ts_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_stdin_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_stdin_write_successfully.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_carriage_return_line_feed_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_explicit_js_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_explicit_js_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_generic_component_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_implicit_js_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_implicit_js_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_ts_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_ts_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/lint_vue_js_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/lint_vue_ts_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/sorts_imports_check.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/vue_compiler_macros_as_globals.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_svelte_by_cli.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_svelte_by_config.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_svelte_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_vue_by_cli.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_vue_by_config.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/unindent_vue_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_empty_svelte_js_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_empty_svelte_ts_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_explicit_js_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_explicit_js_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_implicit_js_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_implicit_js_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_ts_files.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_ts_files_write.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/html_disabled_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/html_enabled_by_default.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_factory/src/generated/node_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_factory/src/generated/syntax_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_parser/tests/html_specs/error/astro/attribute_expression.astro.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/frontmatter.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/frontmatter_bogus.html.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/error/missing_fence.astro.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/astro/attribute_expression.astro.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_parser/tests/html_specs/ok/with_fence.astro.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_syntax/src/generated/kind.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_syntax/src/generated/macros.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_syntax/src/generated/nodes.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_html_syntax/src/generated/nodes_mut.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
📒 Files selected for processing (39)
  • .changeset/upset-impalas-grab.md (1 hunks)
  • .changeset/wise-forks-hide.md (1 hunks)
  • crates/biome_cli/src/execute/process_file/format.rs (1 hunks)
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs (1 hunks)
  • crates/biome_cli/src/execute/process_file/workspace_file.rs (0 hunks)
  • crates/biome_cli/src/execute/std_in.rs (3 hunks)
  • crates/biome_cli/tests/cases/handle_astro_files.rs (1 hunks)
  • crates/biome_cli/tests/cases/handle_vue_files.rs (1 hunks)
  • crates/biome_cli/tests/cases/indent_script_and_style.rs (1 hunks)
  • crates/biome_cli/tests/commands/format.rs (2 hunks)
  • crates/biome_configuration/src/html.rs (1 hunks)
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs (1 hunks)
  • crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs (1 hunks)
  • crates/biome_html_formatter/src/astro/auxiliary/mod.rs (1 hunks)
  • crates/biome_html_formatter/src/generated.rs (1 hunks)
  • crates/biome_html_parser/src/syntax/astro.rs (2 hunks)
  • crates/biome_html_syntax/src/element_ext.rs (2 hunks)
  • crates/biome_html_syntax/src/file_source.rs (1 hunks)
  • crates/biome_js_analyze/tests/spec_tests.rs (2 hunks)
  • crates/biome_js_syntax/src/file_source.rs (1 hunks)
  • crates/biome_lsp/src/handlers/analysis.rs (4 hunks)
  • crates/biome_lsp/src/handlers/formatting.rs (2 hunks)
  • crates/biome_lsp/src/server.tests.rs (1 hunks)
  • crates/biome_lsp/src/session.rs (2 hunks)
  • crates/biome_lsp/src/utils.rs (1 hunks)
  • crates/biome_service/src/file_handlers/astro.rs (0 hunks)
  • crates/biome_service/src/file_handlers/css.rs (2 hunks)
  • crates/biome_service/src/file_handlers/graphql.rs (2 hunks)
  • crates/biome_service/src/file_handlers/html.rs (9 hunks)
  • crates/biome_service/src/file_handlers/javascript.rs (2 hunks)
  • crates/biome_service/src/file_handlers/json.rs (2 hunks)
  • crates/biome_service/src/file_handlers/mod.rs (5 hunks)
  • crates/biome_service/src/file_handlers/svelte.rs (0 hunks)
  • crates/biome_service/src/file_handlers/vue.rs (0 hunks)
  • crates/biome_service/src/workspace.rs (1 hunks)
  • crates/biome_service/src/workspace/server.rs (2 hunks)
  • xtask/codegen/html.ungram (1 hunks)
  • xtask/codegen/src/html_kinds_src.rs (1 hunks)
  • xtask/rules_check/src/lib.rs (1 hunks)
💤 Files with no reviewable changes (4)
  • crates/biome_cli/src/execute/process_file/workspace_file.rs
  • crates/biome_service/src/file_handlers/svelte.rs
  • crates/biome_service/src/file_handlers/vue.rs
  • crates/biome_service/src/file_handlers/astro.rs
🧰 Additional context used
📓 Path-based instructions (9)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_html_syntax/src/file_source.rs
  • crates/biome_html_formatter/src/astro/auxiliary/mod.rs
  • crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs
  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_js_syntax/src/file_source.rs
  • crates/biome_html_parser/src/syntax/astro.rs
  • crates/biome_html_syntax/src/element_ext.rs
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_html_syntax/src/file_source.rs
  • crates/biome_html_formatter/src/astro/auxiliary/mod.rs
  • crates/biome_lsp/src/utils.rs
  • crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs
  • crates/biome_cli/tests/cases/handle_vue_files.rs
  • crates/biome_configuration/src/html.rs
  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_cli/tests/cases/handle_astro_files.rs
  • crates/biome_service/src/file_handlers/json.rs
  • crates/biome_js_syntax/src/file_source.rs
  • crates/biome_lsp/src/handlers/formatting.rs
  • crates/biome_html_parser/src/syntax/astro.rs
  • crates/biome_service/src/workspace/server.rs
  • crates/biome_cli/tests/commands/format.rs
  • crates/biome_lsp/src/handlers/analysis.rs
  • crates/biome_cli/tests/cases/indent_script_and_style.rs
  • crates/biome_html_syntax/src/element_ext.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_cli/src/execute/process_file/format.rs
  • crates/biome_service/src/file_handlers/graphql.rs
  • crates/biome_lsp/src/session.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_service/src/file_handlers/html.rs
  • crates/biome_service/src/file_handlers/css.rs
  • crates/biome_lsp/src/server.tests.rs
  • crates/biome_service/src/file_handlers/javascript.rs
  • crates/biome_service/src/file_handlers/mod.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Before committing, format Rust and TOML files (e.g., via just f/just format)

Files:

  • crates/biome_html_syntax/src/file_source.rs
  • crates/biome_html_formatter/src/astro/auxiliary/mod.rs
  • crates/biome_lsp/src/utils.rs
  • crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs
  • crates/biome_cli/tests/cases/handle_vue_files.rs
  • crates/biome_configuration/src/html.rs
  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_cli/tests/cases/handle_astro_files.rs
  • crates/biome_service/src/file_handlers/json.rs
  • xtask/codegen/src/html_kinds_src.rs
  • xtask/rules_check/src/lib.rs
  • crates/biome_js_syntax/src/file_source.rs
  • crates/biome_lsp/src/handlers/formatting.rs
  • crates/biome_html_parser/src/syntax/astro.rs
  • crates/biome_service/src/workspace/server.rs
  • crates/biome_cli/tests/commands/format.rs
  • crates/biome_lsp/src/handlers/analysis.rs
  • crates/biome_cli/tests/cases/indent_script_and_style.rs
  • crates/biome_html_syntax/src/element_ext.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_cli/src/execute/process_file/format.rs
  • crates/biome_service/src/file_handlers/graphql.rs
  • crates/biome_lsp/src/session.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_service/src/file_handlers/html.rs
  • crates/biome_service/src/file_handlers/css.rs
  • crates/biome_lsp/src/server.tests.rs
  • crates/biome_service/src/file_handlers/javascript.rs
  • crates/biome_service/src/file_handlers/mod.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Document rules, assists, and options via inline rustdoc in Rust source

Files:

  • crates/biome_html_syntax/src/file_source.rs
  • crates/biome_html_formatter/src/astro/auxiliary/mod.rs
  • crates/biome_lsp/src/utils.rs
  • crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs
  • crates/biome_cli/tests/cases/handle_vue_files.rs
  • crates/biome_configuration/src/html.rs
  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_cli/src/execute/process_file/lint_and_assist.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_cli/tests/cases/handle_astro_files.rs
  • crates/biome_service/src/file_handlers/json.rs
  • xtask/codegen/src/html_kinds_src.rs
  • xtask/rules_check/src/lib.rs
  • crates/biome_js_syntax/src/file_source.rs
  • crates/biome_lsp/src/handlers/formatting.rs
  • crates/biome_html_parser/src/syntax/astro.rs
  • crates/biome_service/src/workspace/server.rs
  • crates/biome_cli/tests/commands/format.rs
  • crates/biome_lsp/src/handlers/analysis.rs
  • crates/biome_cli/tests/cases/indent_script_and_style.rs
  • crates/biome_html_syntax/src/element_ext.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_cli/src/execute/process_file/format.rs
  • crates/biome_service/src/file_handlers/graphql.rs
  • crates/biome_lsp/src/session.rs
  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_service/src/file_handlers/html.rs
  • crates/biome_service/src/file_handlers/css.rs
  • crates/biome_lsp/src/server.tests.rs
  • crates/biome_service/src/file_handlers/javascript.rs
  • crates/biome_service/src/file_handlers/mod.rs
**/tests/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place test files under a tests/ directory in each crate

Files:

  • crates/biome_cli/tests/cases/handle_vue_files.rs
  • crates/biome_js_analyze/tests/spec_tests.rs
  • crates/biome_cli/tests/cases/handle_astro_files.rs
  • crates/biome_cli/tests/commands/format.rs
  • crates/biome_cli/tests/cases/indent_script_and_style.rs
crates/biome_configuration/src/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep configuration sources under biome_configuration/src/

Files:

  • crates/biome_configuration/src/html.rs
.changeset/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/**/*.md: Create changesets using the just new-changeset command; do not author them manually
In changeset markdown, only use headers #### or #####
Changeset descriptions must end every sentence with a full stop (.)
For bug fixes, start the changeset description with a linked issue reference like “Fixed #1234
Prefer past tense for what was done and present tense for current behavior in changesets

Files:

  • .changeset/wise-forks-hide.md
  • .changeset/upset-impalas-grab.md
xtask/codegen/*.ungram

📄 CodeRabbit inference engine (CLAUDE.md)

Define and modify language grammars in .ungram files; ASTs are generated from these

Files:

  • xtask/codegen/html.ungram
crates/biome_service/src/workspace.rs

📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)

Workspace trait implementation entry point is located at src/workspace.rs

Files:

  • crates/biome_service/src/workspace.rs
🧠 Learnings (20)
📚 Learning: 2025-10-02T12:58:00.892Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:00.892Z
Learning: Applies to crates/biome_js_formatter/src/**/*.rs : When a token is mandatory and present in the AST, format using the node’s token accessor (e.g., node.l_paren_token().format()) instead of hardcoding the token

Applied to files:

  • crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/spec_test.rs : Provide a `run` function that builds a SpecSnapshot with HtmlFormatLanguage and HtmlTestFormatLanguage and calls `snapshot.test()`

Applied to files:

  • crates/biome_cli/tests/cases/handle_vue_files.rs
  • crates/biome_cli/tests/commands/format.rs
  • crates/biome_cli/tests/cases/indent_script_and_style.rs
📚 Learning: 2025-08-17T08:55:30.118Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T08:55:30.118Z
Learning: Applies to **/tests/specs/**/*.snap : Use snapshot spec tests stored as .snap files under tests/specs/ (via cargo insta)

Applied to files:

  • crates/biome_cli/tests/cases/handle_vue_files.rs
  • crates/biome_cli/tests/cases/indent_script_and_style.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/src/lib.rs : Define `pub(crate) type HtmlFormatter<'buf> = Formatter<'buf, HtmlFormatContext>;`

Applied to files:

  • crates/biome_configuration/src/html.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/src/cst.rs : Create FormatHtmlSyntaxNode and implement `FormatRule<HtmlSyntaxNode>` plus `AsFormat<HtmlFormatContext>` and `IntoFormat<HtmlFormatContext>` for HtmlSyntaxNode using the provided mapping code

Applied to files:

  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_html_parser/src/syntax/astro.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/src/lib.rs : Implement `FormatLanguage` for `HtmlFormatLanguage` with associated types: `SyntaxLanguage = HtmlLanguage`, `Context = HtmlFormatContext`, `FormatRule = FormatHtmlSyntaxNode`

Applied to files:

  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_html_parser/src/syntax/astro.rs
  • crates/biome_service/src/file_handlers/html.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/src/lib.rs : Add the AsFormat, IntoFormat, and FormattedIterExt plumbing traits and impls to lib.rs as provided

Applied to files:

  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_lsp/src/handlers/formatting.rs
📚 Learning: 2025-10-02T12:58:00.892Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:00.892Z
Learning: Applies to crates/biome_js_formatter/src/**/*.rs : Implement the Format trait for your AST nodes using biome_js_formatter (use biome_js_formatter::prelude::*, write!, token, dynamic_token, etc.)

Applied to files:

  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
📚 Learning: 2025-10-02T12:58:00.892Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:00.892Z
Learning: Applies to crates/biome_js_formatter/src/**/*.rs : Import and implement the FormatNode trait for your node types

Applied to files:

  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_service/src/file_handlers/html.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/src/lib.rs : Expose a documented public function `format_node(options: HtmlFormatOptions, root: &HtmlSyntaxNode) -> FormatResult<Formatted<HtmlFormatContext>>` that calls `biome_formatter::format_node(root, HtmlFormatLanguage::new(options))`

Applied to files:

  • crates/biome_html_formatter/src/generated.rs
  • crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs
  • crates/biome_service/src/file_handlers/html.rs
📚 Learning: 2025-10-02T13:00:18.232Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T13:00:18.232Z
Learning: Applies to crates/biome_service/**/biome_lsp/src/server.tests.rs : End-to-end LSP tests reside in biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_lsp/src/handlers/formatting.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/spec_tests.rs : Configure test generation using `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}` inside a formatter::html_module module

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-10-02T12:58:46.820Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:58:46.820Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/language.rs : Create `HtmlTestFormatLanguage` and implement the `TestFormatLanguage` trait

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-08-17T08:55:30.118Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T08:55:30.118Z
Learning: Applies to crates/biome_html_formatter/benches/html_formatter.rs : Maintain the HTML formatter benchmark at benches/html_formatter.rs within the biome_html_formatter crate

Applied to files:

  • crates/biome_cli/tests/commands/format.rs
📚 Learning: 2025-10-02T13:00:18.232Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T13:00:18.232Z
Learning: Applies to crates/biome_service/src/workspace.rs : `Workspace` trait implementation entry point is located at src/workspace.rs

Applied to files:

  • crates/biome_lsp/src/handlers/analysis.rs
  • crates/biome_service/src/file_handlers/mod.rs
📚 Learning: 2025-10-02T13:00:04.816Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T13:00:04.816Z
Learning: Applies to crates/biome_parser/xtask/codegen/*.ungram : Unions of nodes must start with Any*, e.g., AnyHtmlAttribute

Applied to files:

  • crates/biome_html_syntax/src/element_ext.rs
📚 Learning: 2025-10-02T12:56:59.406Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:56:59.406Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Types deriving Diagnostic must implement Debug

Applied to files:

  • crates/biome_cli/src/execute/process_file/format.rs
📚 Learning: 2025-10-02T12:56:59.406Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:56:59.406Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Prefer implementing diagnostics via #[derive(Diagnostic)] rather than manual trait impls

Applied to files:

  • crates/biome_cli/src/execute/process_file/format.rs
📚 Learning: 2025-10-02T12:56:59.406Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:56:59.406Z
Learning: Applies to crates/biome_diagnostics/**/*.rs : Use helper advice types (CodeFrameAdvice, CommandAdvice, DiffAdvice, LogAdvice) from biome_diagnostics::v2 when suitable; implement Advices manually only when needed for control/performance

Applied to files:

  • crates/biome_cli/src/execute/process_file/format.rs
📚 Learning: 2025-10-02T12:56:59.406Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-02T12:56:59.406Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category statically by adding it to crates/biome_diagnostics_categories/src/categories.rs

Applied to files:

  • crates/biome_cli/src/execute/process_file/format.rs
🧬 Code graph analysis (15)
crates/biome_lsp/src/utils.rs (2)
crates/biome_line_index/src/line_index.rs (1)
  • offset (91-95)
crates/biome_lsp_converters/src/from_proto.rs (1)
  • offset (8-30)
crates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rs (3)
crates/biome_html_syntax/src/generated/nodes.rs (2)
  • l_fence_token (78-80)
  • content (81-83)
crates/biome_html_formatter/src/generated.rs (16)
  • format (28-33)
  • format (66-71)
  • format (104-109)
  • format (142-144)
  • format (174-179)
  • format (212-217)
  • format (250-255)
  • format (288-293)
  • format (326-331)
  • format (364-370)
  • format (404-409)
  • format (442-447)
  • format (480-485)
  • format (512-517)
  • format (550-555)
  • format (588-594)
crates/biome_formatter/src/builders.rs (1)
  • hard_line_break (99-101)
crates/biome_cli/tests/cases/handle_vue_files.rs (1)
crates/biome_cli/tests/snap_test.rs (1)
  • assert_cli_snapshot (407-409)
crates/biome_html_formatter/src/generated.rs (2)
crates/biome_js_formatter/src/lib.rs (6)
  • format (213-213)
  • format (226-228)
  • into_format (274-274)
  • into_format (283-285)
  • into_format (297-299)
  • into_format (480-482)
crates/biome_html_formatter/src/lib.rs (10)
  • format (49-49)
  • format (62-64)
  • format (79-84)
  • format (99-101)
  • format (295-297)
  • new (144-146)
  • into_format (110-110)
  • into_format (119-121)
  • into_format (133-135)
  • into_format (303-305)
crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs (1)
crates/biome_html_formatter/src/verbatim.rs (1)
  • format_html_verbatim_node (28-36)
crates/biome_js_analyze/tests/spec_tests.rs (2)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (2)
  • JsFileSource (9412-9421)
  • ModuleKind (9446-9446)
crates/biome_formatter_test/src/spec.rs (1)
  • input_code (95-97)
crates/biome_service/src/workspace/server.rs (2)
crates/biome_plugin_loader/src/analyzer_grit_plugin.rs (1)
  • None (103-103)
crates/biome_js_runtime/src/plugin_api.rs (1)
  • None (51-51)
crates/biome_cli/tests/commands/format.rs (1)
crates/biome_cli/tests/snap_test.rs (1)
  • assert_cli_snapshot (407-409)
crates/biome_cli/tests/cases/indent_script_and_style.rs (1)
crates/biome_cli/tests/snap_test.rs (1)
  • assert_cli_snapshot (407-409)
crates/biome_html_syntax/src/element_ext.rs (2)
crates/biome_html_syntax/src/lib.rs (1)
  • inner_string_text (119-128)
crates/biome_html_syntax/src/generated/nodes.rs (5)
  • value_token (201-203)
  • value_token (331-333)
  • value_token (526-528)
  • value_token (766-768)
  • value_token (801-803)
crates/biome_service/src/workspace.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • TextSize (9279-9279)
crates/biome_lsp/src/session.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (4)
  • OpenProjectParams (9319-9328)
  • OpenProjectResult (9329-9334)
  • PullDiagnosticsParams (9591-9605)
  • SupportsFeatureParams (3-7)
crates/biome_cli/src/execute/std_in.rs (2)
packages/@biomejs/backend-jsonrpc/tests/workspace.test.mjs (1)
  • printed (26-29)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
  • FormatFileParams (9679-9682)
crates/biome_service/src/file_handlers/html.rs (5)
crates/biome_js_parser/src/parse.rs (5)
  • parse_js_with_offset_and_cache (396-409)
  • parse (187-192)
  • parse (233-234)
  • parse (261-264)
  • cast (37-43)
crates/biome_rowan/src/ast/mod.rs (1)
  • cast_ref (142-151)
crates/biome_js_syntax/src/file_source.rs (1)
  • ts (173-180)
crates/biome_service/src/workspace/document.rs (4)
  • parse (88-94)
  • parse (176-176)
  • parse (181-188)
  • new (158-172)
crates/biome_html_syntax/src/element_ext.rs (1)
  • value_token (277-282)
crates/biome_service/src/file_handlers/mod.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (4)
  • JsFileSource (9412-9421)
  • TextRange (9256-9256)
  • TextSize (9279-9279)
  • DocumentFileSource (9403-9411)
🔇 Additional comments (10)
.changeset/upset-impalas-grab.md (1)

5-12: Nice tidy changeset.

Everything’s punctuated to spec and reads cleanly. Cheers for making it effortless to ship.

crates/biome_cli/tests/commands/format.rs (1)

3419-3441: Test correctly reflects HTML formatter now enabled by default.

The test rename and assertion flip (from is_err() to is_ok()) accurately capture the change in default behaviour. Snapshot name updated consistently.

crates/biome_cli/tests/cases/indent_script_and_style.rs (1)

2-2: LGTM! Simplifies test imports.

Removing assert_file_contents aligns with the shift to snapshot-based verification across the test suite.

crates/biome_service/src/file_handlers/css.rs (1)

589-653: LGTM! Correctly propagates action offset.

The action_offset from CodeActionsParams is now properly destructured and assigned to each CodeAction.offset. This aligns with the broader refactor removing per-extension offset handling.

crates/biome_cli/tests/cases/handle_astro_files.rs (1)

45-52: Minor test input change.

Changed the statement from statement ( ) ; to something ( ) ;. Ensure this aligns with intended test behaviour and that corresponding snapshots were updated.

crates/biome_html_formatter/src/astro/auxiliary/embedded_content.rs (1)

1-22: LGTM! Formatter implementation follows conventions.

The FormatAstroEmbeddedContent implementation correctly:

  • Uses format_html_verbatim_node for verbatim rendering
  • Implements conditional embedded_node_range based on should_delegate_fmt_embedded_nodes()

This aligns with the broader embedded-content formatting strategy introduced in the PR.

crates/biome_lsp/src/handlers/formatting.rs (2)

16-86: Good simplification—removes per-extension formatting hooks.

The format function now uses printed.into_code() directly, eliminating the mutable output variable and extension-specific post-processing (Astro/Vue/Svelte handlers). This aligns with the broader refactor consolidating embedded-content handling.


88-176: Verify range formatting for embedded content in frontmatter and script blocks. No Astro/Vue/Svelte offset handlers remain in crates/biome_lsp; manually test formatting on .astro, .vue and .svelte files to ensure correct edits without offset adjustments.

crates/biome_html_parser/src/syntax/astro.rs (1)

30-38: Approve changes – ASTRO_EMBEDDED_CONTENT is defined in html.ungram.

crates/biome_html_syntax/src/element_ext.rs (1)

272-283: Approve AnyEmbeddedContent.value_token implementation. Both arms return Option<HtmlSyntaxToken>AstroEmbeddedContent.content_token() returns Option<SyntaxToken> (aliased to HtmlSyntaxToken).

@ematipico ematipico requested review from a team October 7, 2025 07:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/biome_js_syntax/src/file_source.rs (1)

203-215: Drop unused JsFileSource::astro/vue/svelte constructors
None of these public methods are referenced anywhere in this repo; remove them (or deprecate first if you need to preserve the public API).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf387cb and 6eac015.

📒 Files selected for processing (5)
  • .changeset/stupid-groups-grow.md (1 hunks)
  • crates/biome_cli/src/execute/std_in.rs (3 hunks)
  • crates/biome_html_syntax/src/file_source.rs (1 hunks)
  • crates/biome_js_syntax/src/file_source.rs (1 hunks)
  • xtask/rules_check/src/lib.rs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • xtask/rules_check/src/lib.rs
  • crates/biome_html_syntax/src/file_source.rs
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/**/*.md

📄 CodeRabbit inference engine (CONTRIBUTING.md)

.changeset/**/*.md: Create changesets using the just new-changeset command; do not author them manually
In changeset markdown, only use headers #### or #####
Changeset descriptions must end every sentence with a full stop (.)
For bug fixes, start the changeset description with a linked issue reference like “Fixed #1234
Prefer past tense for what was done and present tense for current behavior in changesets

Files:

  • .changeset/stupid-groups-grow.md
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_js_syntax/src/file_source.rs
**/*.{rs,toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Before committing, format Rust and TOML files (e.g., via just f/just format)

Files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_js_syntax/src/file_source.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Document rules, assists, and options via inline rustdoc in Rust source

Files:

  • crates/biome_cli/src/execute/std_in.rs
  • crates/biome_js_syntax/src/file_source.rs
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_js_syntax/src/file_source.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_configuration)
🔇 Additional comments (3)
crates/biome_cli/src/execute/std_in.rs (1)

79-82: Simplified output handling looks clean.

Removing the extension-specific file handler branching (Astro, Vue, Svelte) in favour of direct code or into_code() usage streamlines the logic nicely across all three paths—formatting, fix-file, and post-formatting. The changes align well with the PR's unified HTML-ish language support goal.

Also applies to: 169-170, 187-192

crates/biome_js_syntax/src/file_source.rs (2)

151-152: Nice typo fix!

The previous review flagged "embebbed" → "embedded"; now corrected. The Astro example clarifies the embedding context well.


328-342: .astro, .vue, .svelte handled by HtmlFileSource::try_from_extension
Verified in crates/biome_html_syntax/src/file_source.rs (match includes “astro”, “vue”, “svelte”); no further action required.

Comment on lines +5 to +9
Added linting and assist support for `.html` files, with addition of two new configurations:
- `html.linter.enabled`
- `html.assist.enabled`

The HTML linter, in this release, only contains the rule `noHeaderScope`. More rules will be released in the upcoming releases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Pop a full stop on that intro line.

Changeset sentences have to end with a period; the opener currently trails off with a colon, and the bullet text never lands either. Please tighten it up so every sentence closes properly.

-Added linting and assist support for `.html` files, with addition of two new configurations:
-- `html.linter.enabled`
-- `html.assist.enabled`
+Added linting and assist support for `.html` files, introducing two new configurations.
+- Introduced the `html.linter.enabled` configuration.
+- Introduced the `html.assist.enabled` configuration.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Added linting and assist support for `.html` files, with addition of two new configurations:
- `html.linter.enabled`
- `html.assist.enabled`
The HTML linter, in this release, only contains the rule `noHeaderScope`. More rules will be released in the upcoming releases.
Added linting and assist support for `.html` files, introducing two new configurations.
- Introduced the `html.linter.enabled` configuration.
- Introduced the `html.assist.enabled` configuration.
The HTML linter, in this release, only contains the rule `noHeaderScope`. More rules will be released in the upcoming releases.
🤖 Prompt for AI Agents
In .changeset/stupid-groups-grow.md around lines 5 to 9, the introductory
sentence and bullet lines end with a colon or no terminal punctuation; change
the opener to end with a period and add periods at the end of each bullet
sentence so every sentence in the changeset is properly terminated (e.g.,
replace the trailing colon after the intro with a period and append periods to
the bullet lines).

@mdevils
Copy link
Contributor

mdevils commented Oct 7, 2025

@ematipico did you already fix it? I don't see a regression.

@ematipico
Copy link
Member Author

ematipico commented Oct 7, 2025

@mdevils I didn't, see lint run: https://github.com/biomejs/biome/actions/runs/18306065139/job/52123597245?pr=7702

I believe the regression is caused by the fact that Vue blocks are now managed on the HTML side, and to lint the JS inside, we need the Workspace to pull the diagnostics. At the moment, we manually parse and analyze the blocks

Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Love the cleanups!


Now that the main architecture is stable and working, in the upcoming patches and minors we will also fix possible inaccuracies and edge cases coming from existing lint rules, such as `noUnusedVariables` inside `<script>` blocks or frontmatter.

The support is considered experimental because there might be cases that aren't fine-parsed yet, hence causing possible inaccuracies when it comes to formatting and linting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "fine-parsed"? Maybe "correctly parsed"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, at the moment the content of text expressions {{ }} is parsed as simple text, so we don't detect any language syntax such as Svelte, which has its own control-flow syntax:

{#if expression}...{/if}

I wanted to frame this, and say that such language cases aren't "correctly parsed", or we don't have a special parsing. Happy to receive suggestions to better frame this!

} else if html_file_source.is_vue() {
file_source = file_source.with_embedding_kind(EmbeddingKind::Vue);
}
} else if html_file_source.is_astro() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't Astro checked here anymore?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Astro frontmatter has its own node, which isn't a AnyHtmlElement, but a AstroFrontmatter node. For simplicity, I decided to move the detection logic in its own function.

@mdevils
Copy link
Contributor

mdevils commented Oct 7, 2025

@ematipico oh, I thought tests for those rules failed. Not sure how these blocks are processed from rule documentation to be honest.

@mdevils
Copy link
Contributor

mdevils commented Oct 7, 2025

Amazing work! I waited for this :) Will it be possible to check if <script has setup attribute for the vue-related rules (which handle JS/TS inside script tags) now?

@ematipico
Copy link
Member Author

Amazing work! I waited for this :) Will it be possible to check if <script has setup attribute for the vue-related rules now (which handle JS/TS inside script tags)?

Yes! I don't know where this information will reside, but to give you an example, we're able to detect if the language inside script is TypeScript:

let mut file_source = if element.is_typescript_lang().unwrap_or_default() {
JsFileSource::ts()
} else {
JsFileSource::js_module()
};

@mdevils
Copy link
Contributor

mdevils commented Oct 7, 2025

@ematipico could you please hint me how I can do it from the lint rule (which works in JS/TS context)?

@dyc3 dyc3 self-requested a review October 7, 2025 14:29
@dyc3
Copy link
Contributor

dyc3 commented Oct 7, 2025

@mdevils You would pass that information in via JsFileSource, like the code @ematipico linked. From inside the lint rule, you can reference JsFileSource via the context.

@dyc3
Copy link
Contributor

dyc3 commented Oct 7, 2025

I just ran this on 2 of my codebases, one vue and one svelte. Vue seemed fine at a glance, but the whitespace sensitivity problems are still there. The svelte codebase was triggering parsing errors all over the place, mostly getting stuck on { tokens.

Regarding the docs changes: I feel like it's a little misleading to mark parsing as experimental for these languages, but mark formatting and linting as fully supported for the current state. I don't want us to rush this out and have this cause problems for our users.

@ematipico
Copy link
Member Author

What do you suggest @dyc3 ? How should we approach this?

The reason why I defaulted the formatter and linter to true is mostly because, right now, Biome is able to handle the JavaScript inside these files by default. If we default to false, users won't see diagnostics anymore. I had to make a decision and that's why I chose enabled by default.

We could wait more and fix the parsing issues, however we don't know how long it will take. We can definitely do more testing! I will appreciate any help I can get

@dyc3
Copy link
Contributor

dyc3 commented Oct 7, 2025

Hmm, yeah, that's tricky. I think it would be ideal to keep the current default behavior for at least another minor. This would give us more time to iron out the major kinks before forcing the new behavior on everyone, and let people opt in and report issues.

Some things we could do:

  • Enable linting/formatting for embedded languages based on the language settings. Basically, don't allow outer languages to control the enabled setting of the inner language. (I'm not sure if this is already how it works)
  • Alternatively, we could add an experimental option to enable the new behavior, and default to the old behavior.

For communicating support status: We should mark parsing, formatting, and linting as experimental. Linting should have a footnote explaining that for linting, most javascript-only and css-only rules will work fine, but no rules that inspect across the html/language boundary have been implemented. For formatting, we should at least explain that we are still working on parity with prettier.


Also, I forgot to mention, we need to check <style> blocks for a lang attribute. My vue codebase uses scss and Biome doesn't have scss or sass support.

I have a little bit of time today, so I will see if I can finish up #7673

@einarpersson
Copy link

Happy to see this merged, as I am waiting eagerly to switch to biome from eslint/prettier but I am using Svelte.

This is clearly a step in the right direction, but I'm still a bit confused - is this in a useable state or not, given the Svelte particularities?

@ematipico
Copy link
Member Author

@einarpersson it really depends on what you mean by "usable state", because I believe we mean different things

@github-actions github-actions bot mentioned this pull request Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Formatter Area: formatter A-Linter Area: linter A-LSP Area: language server protocol A-Parser Area: parser A-Project Area: project A-Tooling Area: internal tools L-HTML Language: HTML and super languages L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants