Format your svelte components using prettier.
- Format your html, css, and javascript using prettier
- Format Svelte syntax, e.g. each loops, if statements, await blocks, etc.
- Format the javascript expressions embedded in the svelte syntax
- e.g. expressions inside of
{}
, event bindingson:click=""
, and more
- e.g. expressions inside of
- Install prettier-plugin-svelte and prettier should pick it up from your node_modules folder
- If you're using VS Code, it is embedded in the svelte vs code plugin
- If you're using Atom, it is embedded in the svelte atom plugin