There is a migration guide as well as a migration tool that will migrate most of your code for you. You can also see what an individual file looks like when migrated in the playground.
That link should be a bit more prominent, until the community has upgraded. Right now I think it's only at the very end of https://svelte.dev/docs/svelte/legacy-overview and I for sure was not aware of it, cursing the new docs layout when maintaining existing code.