kit icon indicating copy to clipboard operation
kit copied to clipboard

"plugins": ["prettier-plugin-svelte"] in .prettierrc is preventing VSCode for auto-formatting *.svelte files

Open regnaio opened this issue 3 years ago • 2 comments

Describe the bug

"plugins": ["prettier-plugin-svelte"] in .prettierrc is preventing VSCode from auto-formatting *.svelte files

After removing this line, Alt+Shift+F is now able to successfully auto-format *.svelte files

A Skeleton project was created 2 days ago using @sveltejs/[email protected] reproducing this

Reproduction

A Skeleton project was created 2 days ago using @sveltejs/[email protected] reproducing this

Logs

No response

System Info

Windows WSL 2

System:
    OS: Linux 4.19 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 18.65 GB / 24.92 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 17.3.1 - /usr/bin/node
    Yarn: 1.22.10 - /mnt/c/Program Files/nodejs/yarn
    npm: 8.3.0 - /usr/bin/npm

But using Docker container with `node:16.16.0-slim`

Severity

serious, but I can work around it

Additional Information

No response

regnaio avatar Nov 10 '22 05:11 regnaio

@dummdidumm maybe you'd have some ideas about this one?

benmccann avatar Nov 14 '22 23:11 benmccann

I’m having a similar issue when I remove svelte plugin and swap for prettier-plugin-tailwindcss

bobbymannino avatar Nov 20 '22 11:11 bobbymannino

Found this in the discord chat, seems to fix the problem with svelte and tailwind plugin

Change these settings in VS Code settings.json

bobbymannino avatar Jan 02 '23 23:01 bobbymannino