feat(core): full experimental support htmlish languages#7702
feat(core): full experimental support htmlish languages#7702
Conversation
🦋 Changeset detectedLatest commit: f1ae998 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
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 |
CodSpeed Performance ReportMerging #7702 will not alter performanceComparing Summary
Footnotes
|
WalkthroughAdds 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 Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 laterparams.*access touches a moved value and the file won’t compile. Let’s rely on the already boundsettings,path, andlanguageinstead.- 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, - ¶ms.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
⛔ Files ignored due to path filters (70)
crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/check_stdin_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/check_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/check_stdin_write_unsafe_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_astro_carriage_return_line_feed_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_astro_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_astro_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_empty_astro_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_stdin_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/format_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_and_fix_astro_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_astro_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/lint_stdin_write_unsafe_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/sorts_imports_check.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_astro_files/sorts_imports_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/check_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/check_stdin_write_unsafe_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_stdin_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_svelte_carriage_return_line_feed_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_svelte_ts_context_module_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/format_svelte_ts_context_module_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_svelte_files/sorts_imports_check.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/check_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/check_stdin_write_unsafe_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_empty_vue_js_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_empty_vue_ts_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_stdin_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_stdin_write_successfully.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_carriage_return_line_feed_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_explicit_js_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_explicit_js_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_generic_component_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_implicit_js_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_implicit_js_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_ts_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/format_vue_ts_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/lint_vue_js_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/lint_vue_ts_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/sorts_imports_check.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_handle_vue_files/vue_compiler_macros_as_globals.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_svelte_by_cli.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_svelte_by_config.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_svelte_by_default.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_vue_by_cli.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/indent_vue_by_config.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_cases_indent_script_and_style/unindent_vue_by_default.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_empty_svelte_js_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_empty_svelte_ts_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_explicit_js_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_explicit_js_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_implicit_js_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_implicit_js_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_ts_files.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/format_svelte_ts_files_write.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/html_disabled_by_default.snapis excluded by!**/*.snapand included by**crates/biome_cli/tests/snapshots/main_commands_format/html_enabled_by_default.snapis excluded by!**/*.snapand included by**crates/biome_html_factory/src/generated/node_factory.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_factory/src/generated/syntax_factory.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_parser/tests/html_specs/error/astro/attribute_expression.astro.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/frontmatter.html.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/frontmatter_bogus.html.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/error/missing_fence.astro.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/astro/attribute_expression.astro.snapis excluded by!**/*.snapand included by**crates/biome_html_parser/tests/html_specs/ok/with_fence.astro.snapis excluded by!**/*.snapand included by**crates/biome_html_syntax/src/generated/kind.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_syntax/src/generated/macros.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_syntax/src/generated/nodes.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_html_syntax/src/generated/nodes_mut.rsis excluded by!**/generated/**,!**/generated/**and included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand 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.rscrates/biome_html_formatter/src/astro/auxiliary/mod.rscrates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rscrates/biome_html_formatter/src/generated.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_js_syntax/src/file_source.rscrates/biome_html_parser/src/syntax/astro.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/mod.rscrates/biome_lsp/src/utils.rscrates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rscrates/biome_cli/tests/cases/handle_vue_files.rscrates/biome_configuration/src/html.rscrates/biome_html_formatter/src/generated.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/biome_cli/src/execute/process_file/lint_and_assist.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_cli/tests/cases/handle_astro_files.rscrates/biome_service/src/file_handlers/json.rscrates/biome_js_syntax/src/file_source.rscrates/biome_lsp/src/handlers/formatting.rscrates/biome_html_parser/src/syntax/astro.rscrates/biome_service/src/workspace/server.rscrates/biome_cli/tests/commands/format.rscrates/biome_lsp/src/handlers/analysis.rscrates/biome_cli/tests/cases/indent_script_and_style.rscrates/biome_html_syntax/src/element_ext.rscrates/biome_service/src/workspace.rscrates/biome_cli/src/execute/process_file/format.rscrates/biome_service/src/file_handlers/graphql.rscrates/biome_lsp/src/session.rscrates/biome_cli/src/execute/std_in.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/css.rscrates/biome_lsp/src/server.tests.rscrates/biome_service/src/file_handlers/javascript.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/mod.rscrates/biome_lsp/src/utils.rscrates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rscrates/biome_cli/tests/cases/handle_vue_files.rscrates/biome_configuration/src/html.rscrates/biome_html_formatter/src/generated.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/biome_cli/src/execute/process_file/lint_and_assist.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_cli/tests/cases/handle_astro_files.rscrates/biome_service/src/file_handlers/json.rsxtask/codegen/src/html_kinds_src.rsxtask/rules_check/src/lib.rscrates/biome_js_syntax/src/file_source.rscrates/biome_lsp/src/handlers/formatting.rscrates/biome_html_parser/src/syntax/astro.rscrates/biome_service/src/workspace/server.rscrates/biome_cli/tests/commands/format.rscrates/biome_lsp/src/handlers/analysis.rscrates/biome_cli/tests/cases/indent_script_and_style.rscrates/biome_html_syntax/src/element_ext.rscrates/biome_service/src/workspace.rscrates/biome_cli/src/execute/process_file/format.rscrates/biome_service/src/file_handlers/graphql.rscrates/biome_lsp/src/session.rscrates/biome_cli/src/execute/std_in.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/css.rscrates/biome_lsp/src/server.tests.rscrates/biome_service/src/file_handlers/javascript.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/mod.rscrates/biome_lsp/src/utils.rscrates/biome_html_formatter/src/astro/auxiliary/frontmatter_element.rscrates/biome_cli/tests/cases/handle_vue_files.rscrates/biome_configuration/src/html.rscrates/biome_html_formatter/src/generated.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/biome_cli/src/execute/process_file/lint_and_assist.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_cli/tests/cases/handle_astro_files.rscrates/biome_service/src/file_handlers/json.rsxtask/codegen/src/html_kinds_src.rsxtask/rules_check/src/lib.rscrates/biome_js_syntax/src/file_source.rscrates/biome_lsp/src/handlers/formatting.rscrates/biome_html_parser/src/syntax/astro.rscrates/biome_service/src/workspace/server.rscrates/biome_cli/tests/commands/format.rscrates/biome_lsp/src/handlers/analysis.rscrates/biome_cli/tests/cases/indent_script_and_style.rscrates/biome_html_syntax/src/element_ext.rscrates/biome_service/src/workspace.rscrates/biome_cli/src/execute/process_file/format.rscrates/biome_service/src/file_handlers/graphql.rscrates/biome_lsp/src/session.rscrates/biome_cli/src/execute/std_in.rscrates/biome_service/src/file_handlers/html.rscrates/biome_service/src/file_handlers/css.rscrates/biome_lsp/src/server.tests.rscrates/biome_service/src/file_handlers/javascript.rscrates/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.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_cli/tests/cases/handle_astro_files.rscrates/biome_cli/tests/commands/format.rscrates/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 thejust new-changesetcommand; 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)
Workspacetrait 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.rscrates/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.rscrates/biome_cli/tests/commands/format.rscrates/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.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/biome_html_parser/src/syntax/astro.rscrates/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.rscrates/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.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/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.rscrates/biome_html_formatter/src/astro/auxiliary/embedded_content.rscrates/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.rscrates/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()tois_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_contentsaligns 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_offsetfromCodeActionsParamsis now properly destructured and assigned to eachCodeAction.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 ( ) ;tosomething ( ) ;. 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
FormatAstroEmbeddedContentimplementation correctly:
- Uses
format_html_verbatim_nodefor verbatim rendering- Implements conditional
embedded_node_rangebased onshould_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
formatfunction now usesprinted.into_code()directly, eliminating the mutableoutputvariable 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 returnOption<HtmlSyntaxToken>—AstroEmbeddedContent.content_token()returnsOption<SyntaxToken>(aliased toHtmlSyntaxToken).
There was a problem hiding this comment.
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
📒 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 thejust new-changesetcommand; 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.rscrates/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.rscrates/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.rscrates/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
codeorinto_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.
| 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. |
There was a problem hiding this comment.
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.
| 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).
|
@ematipico did you already fix it? I don't see a regression. |
|
@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 |
arendjr
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
What is "fine-parsed"? Maybe "correctly parsed"?
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
Why isn't Astro checked here anymore?
There was a problem hiding this comment.
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.
|
@ematipico oh, I thought tests for those rules failed. Not sure how these blocks are processed from rule documentation to be honest. |
|
Amazing work! I waited for this :) Will it be possible to check if |
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: biome/crates/biome_service/src/file_handlers/html.rs Lines 480 to 484 in 3c998e1 |
|
@ematipico could you please hint me how I can do it from the lint rule (which works in JS/TS context)? |
|
@mdevils You would pass that information in via |
|
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 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. |
|
What do you suggest @dyc3 ? How should we approach this? The reason why I defaulted the formatter and linter to 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 |
|
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:
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 I have a little bit of time today, so I will see if I can finish up #7673 |
|
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? |
|
@einarpersson it really depends on what you mean by "usable state", because I believe we mean different things |
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:
Test Plan
Updated the current snapshot tests
Docs
I added all the missing changesets that we skipped so far:
html.interpolationbiomejs/website#3204
Footnotes
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