DEV Community

jastuccio
jastuccio

Posted on

bug fix: VS Code was deleting my curly braces { } in a Sveltekit file

Image description

It's Friday night so of course I'll get a strange bug to work on 🤪

VS Code was auto formatting an {#if} block and removing the { } I was quick to pile blame on Prettier or maybe ESLint. It turns out this was an Emmet issue. You can see "Emmet Abreviaton" in the image. Hitting return was triggering Emmet to delete the { } "mustache brackets". I had to adjust some of the VS Code settings.

It seems I was able to resolve it after changing some setting in VS code based on info I found on Github.

https://github.com/sveltejs/language-tools/tree/master/packages/svelte-vscode#setup

Top comments (0)