-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
prettier stops formatting when snippet inside tag with attach tag with attribute_empty_shorthand error. svelte check gives no error and this code is compiled successfully.
Reproduction
<UIButton href="/filters" variant="blur" badge={filtersBadge}>
{#snippet icon()}
<svg {@attach svg('/filter.svg')} />
{/snippet}
</UIButton>Logs
2025-10-13T02:15:07+02:00 ERROR [project::lsp_store] Formatting failed: default prettier instance failed to format buffer: attribute_empty_shorthand: Attribute shorthand cannot be empty
https://svelte.dev/e/attribute_empty_shorthand
(unknown):6:8
4: <UIButton href="/filters" variant="blur" badge={filtersBadge}>
5: {#snippet icon()}
6: <svg {@attach svg('/filter.svg')} />
^
7: {/snippet}
8: </UIButton>
While handling prettier request: {"jsonrpc":"2.0","id":39,"method":"prettier/format","params":{"text":"..snip..","options":{"plugins":["/Users/~/Library/Application Support/Zed/prettier/node_modules/prettier-plugin-svelte/plugin.js"],"parser":null,"filepath":"/Users/~/git/~web/src/components/menu/Menu.svelte","prettierOptions":{"printWidth":120,"useTabs":true,"tabWidth":2},"ignorePath":nullSystem Info
nodejsSeverity
annoyance
Metadata
Metadata
Assignees
Labels
No labels