Conversation
🦋 Changeset detectedLatest commit: 589736c 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 |
WalkthroughGates formatter invocation on feature support and stops reformatting embedded content at the root printing stage. Adjusts a formatter flag in lint-and-assist flow, changes root formatting for embedded nodes to print verbatim, and updates tests/expectations for several cases (including Astro frontmatter) to reflect added semicolons/newlines. Adds two changeset entries for patch releases. Fixes the non‑idempotent newline insertion in Astro frontmatter reported in issue 7912. Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.changeset/petite-mice-say.md:
- Line 5: Replace the typo "unincorrectly" with "incorrectly" in the changeset
sentence starting with "Fixed [`#7912`]...", updating the line to read "...where
Biome incorrectly added a leading newline to the code contained inside the Astro
frontmatter." to correct the grammar while keeping the existing issue reference
and wording intact.
In `@crates/biome_service/src/file_handlers/html.rs`:
- Around line 693-696: Remove the leftover dbg!() call inside the iterator
closure that finds a node by range: locate the iter.find(|node| {
dbg!(node.range, range); node.range == range }) expression and delete the
dbg!(node.range, range) invocation so the closure simply compares node.range ==
range; ensure no other dbg!() calls remain in the surrounding function (the
closure used to assign let node = iter.find(...)?).
e593154 to
3f2de8f
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.changeset/tricky-masks-cry.md:
- Line 5: Update the release note sentence "Fixed a regression where formatting
wasn't correctly applied when apply safe/unsafe fixes via Biome linter." to
correct the grammar by changing "when apply" to "when applying" and clarify
phrasing to "when applying safe or unsafe fixes via the Biome linter" so the
final sentence reads: "Fixed a regression where formatting wasn't correctly
applied when applying safe or unsafe fixes via the Biome linter."
♻️ Duplicate comments (1)
.changeset/petite-mice-say.md (1)
5-5: Typo: “unincorrectly” → “incorrectly”.
Already flagged earlier; keeping it brief.✏️ Proposed fix
-Fixed [`#7912`](https://github.com/biomejs/biome/issues/7912), where Biome unincorrectly added a leading newline to the code contained inside the Astro frontmatter. +Fixed [`#7912`](https://github.com/biomejs/biome/issues/7912), where Biome incorrectly added a leading newline to the code contained inside the Astro frontmatter.
🧹 Nitpick comments (1)
crates/biome_cli/tests/cases/handle_astro_files.rs (1)
752-803: Consider an explicit idempotence check.
Given issue#7912is about repeat runs, it would be sturdier to runlint --writetwice and assert the file content is unchanged on the second pass (e.g., compare contents after run one vs run two).
dyc3
left a comment
There was a problem hiding this comment.
Just a couple of typos that the bot picked up
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
This PR fixes two bugs.
Fixes #7912, where embedded formatting was incorrectly applied. I left a comment explaining the change.
The second bug is the CLI, which didn't apply formatting to the code actions when using
Workspace::fix_all. This works as expected in the LSP. As you can see, there are many changes because... well, we never caught it 😅Test Plan
Added a new test for the first bug. Updated the snapshots and tests for the second bug.
Docs
N/A