You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Svelte: HTML comment inside a tag is accepted, but the file cannot compile #11542
Biome 2.5.10
Windows 11, Node 22.14.0
Svelte 5.57.0
Description
Biome accepts an HTML comment placed inside a Svelte tag, between attributes. Svelte rejects that markup outright, so biome check reports a clean file that cannot compile.
Since Svelte 5.53 a comment between attributes is valid — but only as a JS-style comment (// or /* */), which Biome already parses. The HTML form is not valid in any Svelte version.
This matters for suppression comments in particular. When a lint diagnostic points at an attribute inside a multi-line tag, <!-- biome-ignore ... --> looks like the natural place to put it, Biome silently accepts it, and the file only breaks later at build time.
Steps to reproduce
B.svelte:
<inputtype="text"
<!-- acomment -->
disabled
>
Run biome check B.svelte.
Expected result
A parse error, the same way the Svelte compiler reports one:
expected_token — Expected token >
Actual result
Checked 1 file in 1988µs. No fixes applied.
No diagnostic at all. biome format also reports nothing.
For comparison, svelte.compile() on the same source throws expected_token. The JS-style form in the same position compiles fine and Biome honours it as a suppression:
Activity
Update dependency @biomejs/biome to v2.5.12 (#21)
Update dependency @biomejs/biome to v2.5.12 (#43)