Skip to content

Update vscode settings to apply Prettier code formatting on Svelte files#215

Open
eumalin wants to merge 1 commit into
mainfrom
vscode-prettier-settings
Open

Update vscode settings to apply Prettier code formatting on Svelte files#215
eumalin wants to merge 1 commit into
mainfrom
vscode-prettier-settings

Conversation

@eumalin
Copy link
Copy Markdown
Contributor

@eumalin eumalin commented May 27, 2026

Follow up from #212

This updates vscode settings so that Prettier code formatting is applied automatically on save.

Also added a couple of recommended vscode extensions (Svelte and Prettier), so that new contributors will see what the team uses.

@eumalin eumalin marked this pull request as ready for review May 27, 2026 20:10
@eumalin eumalin requested a review from carylwyatt May 27, 2026 20:10
@carylwyatt
Copy link
Copy Markdown
Member

These changes make sense! I pulled it down and my VS Code still won't format on save. 🤷‍♀️ I'll keep trying. I bet I have some setting from years ago that's overriding these settings.
I wonder if it would be helpful to have a formatter run in github actions? That way it won't matter if our local versions are messy, at least everything upstream will have the same formatting. What do you think, @eumalin?

@eumalin
Copy link
Copy Markdown
Contributor Author

eumalin commented May 29, 2026

These changes make sense! I pulled it down and my VS Code still won't format on save. 🤷‍♀️ I'll keep trying. I bet I have some setting from years ago that's overriding these settings. I wonder if it would be helpful to have a formatter run in github actions? That way it won't matter if our local versions are messy, at least everything upstream will have the same formatting. What do you think, @eumalin?

I had the same thing happen to me. Eventually got it working when I removed "[svelte]": {} from my global user settings JSON, and reloaded the vscode window. For some reason it worked on second try.

Auto-formatting in CI gets messy, it needs write permissions and creates noisy commits that change the PR diff after the fact 😬. I'm thinking about adding Husky (pre-commit hook that formats locally), plus prettier --check in github action CI as a backstop, best of both worlds!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants