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
However, I use semi: false in .prettierrc, and it looks like there's a bug. After pretter removes the semicolon, saving again makes it delete part of the code and produce invalid code.
<scriptmodule>
export { snip }
}{/snippet}
In the case of semi: true, this also happens if the code doesn't have semicolon to begin with, prettier correctly add the semicolon, but "it's too late" and it still delete part of the code and produce invalid code.
Describe the bug
According to the snippets docs, it is possible to export a snippet.
https://svelte.dev/docs/svelte/snippet#Exporting-snippets
However, I use
semi: false
in.prettierrc
, and it looks like there's a bug. After pretter removes the semicolon, saving again makes it delete part of the code and produce invalid code.In the case of
semi: true
, this also happens if the code doesn't have semicolon to begin with, prettier correctly add the semicolon, but "it's too late" and it still delete part of the code and produce invalid code.Reproduction
Expected behaviour
System Info
IDE: VSCOdium 1.97.2
Extension:
Svelte for VS Code: 109.5.2
Prettier: 11.0.0
System:
OS: Linux 6.11 KDE neon 6.3 6.3
CPU: (12) x64 AMD Ryzen 5 7640U w/ Radeon 760M Graphics
Memory: 580.75 MB / 27.21 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
bun: 1.2.1 - /tmp/bun-node-ce532901c/bun
Browsers:
Brave Browser: 133.1.75.181
npmPackages:
prettier: ^3.4.2 => 3.5.2
svelte: ^5.0.0 => 5.20.5
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: