Open alancwoo opened 4 months ago
Sorry I found an old issue here: https://github.com/sveltejs/prettier-plugin-svelte/issues/240 which is closed, so I can indeed confirm this is still happening.
If I set editor.formatOnSave
to false
, then this no longer happens. I'm actually not sure why I had that enabled, but in any case it should not be happening regardless.
Maybe you're running into #233
Also, which extension is responsible for formatting the code? The Svelte extension or the Prettier extension (you can see that in your VS Code config)? Also make sure that you have the latest version of prettier and prettier-plugin-svelte in your package.json
.
If this still persists, we need a proper reproduction.
I'm not sure if this is the correct place to post this, but I'm having an issue with:
VSCode
1.86.1
Prettier Extensionv10.1.0
Svelte for VS Codev108.2.2
If I paste anything in a document, the entire script tag is immediately replaced by a base64 encoding of its contents:
https://github.com/sveltejs/prettier-plugin-svelte/assets/1481890/f75bec4b-88b6-42c7-a76c-5d01a187b97a
My
.prettierrc
is as follows:This only happens in
.svelte
files, and only when"plugins": ["prettier-plugin-svelte"]
is set in.prettierrc