Repository navigation
Labels
S-Bug-confirmedStatus: report has been confirmed as a valid bug
Description
Environment information
Details
CLI:
Version: 2.4.14
Color support: true
Platform:
CPU Architecture: aarch64
OS: macos
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_LOG_LEVEL: unset
BIOME_LOG_KIND: unset
BIOME_CONFIG_PATH: unset
BIOME_THREADS: unset
BIOME_WATCHER_KIND: unset
BIOME_WATCHER_POLLING_INTERVAL: unset
NO_COLOR: unset
TERM: screen-256color
JS_RUNTIME_VERSION: v24.12.0
JS_RUNTIME_NAME: node
NODE_PACKAGE_MANAGER: npm/11.6.2
Biome Configuration:
Status: Loaded successfully
Path: biome.json
Formatter enabled: true
Linter enabled: true
Assist enabled: true
VCS enabled: true
HTML full support enabled: true
Workspace:
Open Documents: 0
What happened?
- Clone https://github.com/iamdevlinph/astro-biome-js
npm install- Make sure you have the biome extension in vscode
- Open
Welcome.astrofile and reorder the imports then save - There's a new line added when the organize import fix is done
I was supposed to only report the new line issue but I sometimes encounter the code being deleted issue similar to biomejs/biome-vscode#894. Both or either issue is very finicky to replicate or there's some sequence of action. I have a recording here on what I did.
Video - starting a new project (finicky)
Screen.Recording.2026-05-08.at.9.37.15.PM.mp4
Video - cloning project, new line issue easy to replicate
Screen.Recording.2026-05-08.at.9.51.32.PM.mov
My biome extension:
Expected result
The organize imports should not add new lines.
Code of Conduct
- I agree to follow Biome's Code of Conduct
Metadata
Metadata
Assignees
Labels
S-Bug-confirmedStatus: report has been confirmed as a valid bug
Activity
[-]Autofix of organizeImports addeds white space[/-][+]Autofix of organizeImports adds white space[/+][-]Autofix of organizeImports adds white space[/-][+]Autofix of organizeImports adds white space in `.astro`[/+]Conaclos commentedon May 8, 2026
This doesn't seem to come from the import organizer, as newlines are added even when it is disabled.
iamdevlinph commentedon May 9, 2026
I don't know if this helps.
Running
npx @biomejs/biome lint --write src/components/Welcome.astroadds a new line.Running
npx @biomejs/biome check --write src/components/Welcome.astroadds a new line and also fixes the import sort.[-]Autofix of organizeImports adds white space in `.astro`[/-][+]Autofix adds newlines in `.astro`[/+][-]Autofix adds newlines in `.astro`[/-][+]Autofix (linter or assist) adds newlines in `.astro`[/+]Conaclos commentedon May 9, 2026
Do you mean
@biomejs/biome check?The issue happen also in previous releases (tested on Biome 2.4.13, 2.4.12, and 2.4.11).
Newlines are added regardless of whether the linter or the assist is run. The formatter doesn't add any newlines.
Important note: even when there is no code fix to apply, newlines are added. However, this only happen with the
--writeflag. Also, this only happen when experimental HTML support is enabled.Tested with:
and
iamdevlinph commentedon May 10, 2026
Ah yes. The other one is supposed to be
checkdidn't notice I copied the same command.experimentalFullSupportEnabledin Astro causes a newline when formatting #10096 as a duplicate of this issueUpdate dependency @biomejs/biome to v2.4.16 (#5)
Update dependency @biomejs/biome to v2.4.16 (#13)