How to set up VSCode SvelteKit development (with all bells and whistles) #6383
Replies: 1 comment 1 reply
-
Some guidance on this would be good as the docs flesh out more over time, but this set of circumstances has more to do with VS Code than it does to do with Sveltekit. Some thought would also need to go into this to identify the appropriate place to document these things, because the things you are seeing aren't unique to SK, but also apply to vanilla Svelte. Something I've seen done in a few places is to place a As for the TS errors, seeing errors in the "Problems" tab for only open files is normal. That tool is in place to help you on the scope of what you are working on at the moment, and the exhaustive check is what The flipside is that if you get all the errors that Finally, for the formatting on save, I'd encourage you to look into |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I feel like I am not getting the most out of VSCode, and I might have missed it but I have not found a good single place that documents how to set everything up.
I'm thinking specifically:
While I've managed to now auto format .svelte files on save, my .ts files are not auto formatted. To get the Svelte formatting to work I had to add the following to the settings file:
But this info is inside in the "Svelte for VS Code" README which I missed at first, and it's also not very obvious for new VSCode users how to even open the "raw" settings file to paste this in.
And while
npm run check
shows over 300 errors (I'm migrating to TS so yeah a lot to fix), I am not seeing them in a single list with VSCode anywhere. There is the ESLint tab which shows errors for the opened files, but not everything across the whole source code. If I don't have files open it just says "No problems have been detected in the workspace" which is weird to me, as there are plenty of them in my project 😅So I guess to help more people it would maybe be nice to have a minimum settings.json file with all JS/TS/Svelte things, with an explanation on how to get to this settings file? And which extensions to install?
Beta Was this translation helpful? Give feedback.
All reactions