unstale

npm / prettier-plugin-svelte

prettier-plugin-svelte

What changed in prettier-plugin-svelte 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-24.

7 breaking1 behavior and defaults1 tooling5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

prettier-plugin-svelte 49 changes

Breaking changes 3

Tooling 1

Fixes and other changes 5

  • Preserves nested rest patterns in {#each} destructuring.

    4.1.1release notes

  • Prevents dropping <script> or <style> content when a closing tag has whitespace.

    4.1.1release notes

  • Preserves whitespace inside <textarea>, whose content is whitespace-sensitive like <pre>.

    4.1.1release notes

  • Fixes printing of @const.

    4.0.1release notes

  • Trailing <!-- #endregion --> comments are kept below svelte:options, scripts, and styles.

    4.0.0release notes

prettier-plugin-svelte 35 changes

Breaking changes 4

  • Requires Node.js version 14 or higher.

    3.0.0release notes

  • Requires Prettier version 3, which may require adjustments to your configuration file.

    3.0.0release notes

  • svelteAllowShorthand now takes precedence over svelteStrictMode; set it to false to restore the v2 behavior.

    3.0.0release notes

  • The deprecated svelteSortOrder options have been removed.

    3.0.0release notes

Behavior and default changes 1

  • Empty elements and components preserve the user's self-closing or paired-tag notation; with svelteStrictMode, elements must use paired tags while components are left alone.

    3.0.0release notes