Skip to content

fix(format/html): group snippet definitions so they only line break when necessary - #12080

Merged
dyc3 merged 1 commit into
mainfrom
dyc3/fix-issue-12079-in-biome-thr_wwaampdrs6
Oct 2, 2026
Merged

dyc3 merged 1 commit into
mainfrom
dyc3/fix-issue-12079-in-biome-thr_wwaampdrs6

Conversation

@dyc3

@dyc3 dyc3 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

fixes #12079

fixed by opus 5.5

Test Plan

snapshots

Docs

@changeset-bot

changeset-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5491b64

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

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

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-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages L-HTML Language: HTML and super languages labels Oct 2, 2026
@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: biomejs/biome/.coderabbit.yaml

Review profile: CHILL

Plan: Essentials

Run ID: 3052e658-69c6-48cd-b847-fb409365a2a0

📥 Commits

Reviewing files that changed from the base of the PR and between 8cfb219 and 5491b64.

⛔ Files ignored due to path filters (2)
  • crates/biome_html_formatter/tests/specs/html/svelte/snippet_parameters.svelte.snap is excluded by !**/*.snap and included by **
  • crates/biome_html_formatter/tests/specs/html/svelte/snippet_with_whitespace.svelte.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (3)
  • .changeset/tidy-snippets-hug.md
  • crates/biome_html_formatter/tests/specs/html/svelte/snippet_parameters.svelte
  • crates/biome_js_formatter/src/js/auxiliary/svelte_snippet_root.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


Walkthrough

The Svelte snippet formatter now groups the snippet name and parameters, then formats the EOF token. A new fixture adds examples with single, multiple, destructured, and long-named parameters. A patch changeset describes the formatting change.

Priority: ⬇️ Low

Change: Bug fix · Severity of issue fixed: Low

🚥 Pre-merge checks | ✅ 3 | ❓ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The implementation changes FormatJsSvelteSnippetRoot::fmt_fields to group the snippet name and parameters before formatting the EOF token. The added Svelte fixture covers single, multiple, destructu… Provide reviewable snapshot output or equivalent test evidence for snippet_parameters.svelte and snippet_with_whitespace.svelte.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the formatter fix and the change to snippet line breaking. It matches the main purpose of the pull request.
Description check ✅ Passed The description identifies issue #12079 and states that snapshots verify the formatter fix. It is brief but related to the changeset.
Out of Scope Changes check ✅ Passed The changes are limited to the Svelte snippet formatter, its focused fixture, and a patch changeset for issue #12079. The fixture and changeset directly support the linked formatting objective. No unr…
Full details: Linked Issues check

Explanation

The implementation changes FormatJsSvelteSnippetRoot::fmt_fields to group the snippet name and parameters before formatting the EOF token. The added Svelte fixture covers single, multiple, destructured, and long parameters. However, the snapshot files required to verify the formatted output are excluded from review. The available evidence does not establish that parameters stay on one line when they fit or that the regression test passes.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@codspeed

codspeed Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 73 untouched benchmarks
⏩ 338 skipped benchmarks1


Comparing dyc3/fix-issue-12079-in-biome-thr_wwaampdrs6 (5491b64) with main (8cfb219)

Open in CodSpeed

Footnotes

  1. 338 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. ↩

@dyc3
dyc3 merged commit 6e2ee70 into main Oct 2, 2026
35 checks passed
@dyc3
dyc3 deleted the dyc3/fix-issue-12079-in-biome-thr_wwaampdrs6 branch October 2, 2026 16:47
@github-actions github-actions Bot mentioned this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter 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.

📝 Svelte snippet params are always formatted in new line

2 participants