prettier-plugin-svelte
Advanced tools
Changelog
2.1.0
htmlWhitespaceSensitivity
settingsvelteBracketNewLine
is set to true
and only the closing tag has whitespace before it, print the closing >
on a separate lineChangelog
2.0.0
This release comes with a rewrite of the HTML formatting. The output is now much more in line with how standard Prettier formats HTML. This is also why svelteBracketNewLine
now defaults to true
. Another notable default change is the sort order: svelte:options
is now part of the sort order and the default changed to options-scripts-markup-styles
, which is in line with how the majority of users like to order the code blocks.
The complete list of changes:
<svelte:options>
is now part of svelteSortOrder
. Default sort order is now options-scripts-markup-styles
. This is a breaking change. (#73)svelteBracketNewLine
defaults to true
now to be more in line with how Prettier formats standard HTML. This is a breaking change{tag}
is too long, break it up if possible (excluding {#if}
/{#await}
/etc. blocks). This is a breaking change (#170)<script>
/<style>
tag is completely empty (no whitespace), don't put the closing tag on a new line (#87)