Socket
Socket
Sign inDemoInstall

prettier-plugin-svelte

Package Overview
Dependencies
Maintainers
3
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-svelte - npm Package Versions

1
6

2.1.4

Diff

Changelog

Source

2.1.4

  • Don't print an empty line at the end of code embedded inside Markdown (further fixes) (#202)
conduitry
published 2.1.3 •

Changelog

Source

2.1.3

  • Don't print an empty line at the end of code embedded inside Markdown (#202)
conduitry
published 2.1.2 •

Changelog

Source

2.1.2

  • Keep whitespace around <script>/<style> tags (#197)
  • Make <script>/<style> tag snipping case-sensitive (#198)
conduitry
published 2.1.1 •

Changelog

Source

2.1.1

  • Fix svelteBracketNewLine: true sometimes not having > on a separate line (#194)
conduitry
published 2.1.0 •

Changelog

Source

2.1.0

  • Support Prettier's htmlWhitespaceSensitivity setting
  • When svelteBracketNewLine is set to true and only the closing tag has whitespace before it, print the closing > on a separate line
conduitry
published 2.0.3 •

Changelog

Source

2.0.3

  • When svelteBracketNewLine is set to false, don't print the closing > in a separate line if possible (#183)
conduitry
published 2.0.2 •

Changelog

Source

2.0.2

  • Fix formatting of <template> tags with an unsupported language inside
conduitry
published 2.0.1 •

Changelog

Source

2.0.1

  • Fix formatting of inline element when there's a line at the start/end (#183)
conduitry
published 2.0.0 •

Changelog

Source

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:

  • Rework the tag breaking logic with the goal to be more in line with how Prettier formats standard HTML. This includes respecting the user's decision to have child tags in separate lines even if they don't exceed the maximum line width (#143, #117). This is a breaking change because tags are broken up differently now than before.
  • <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
  • Fix formatting of fenced Svelte code blocks inside Markdown (#129)
  • Everything that is not explicitly a block element is now treated as an inline element, including components. This is a breaking change (#159)
  • Single quotes are no longer forced except inside quoted attributes/events/etc. This is a breaking change (#94)
  • If the content inside a {tag} is too long, break it up if possible (excluding {#if}/{#await}/etc. blocks). This is a breaking change (#170)
  • If the content of a <script>/<style> tag is completely empty (no whitespace), don't put the closing tag on a new line (#87)
conduitry
published 1.4.2 •

Changelog

Source

1.4.2

  • Pass options to embedded parser (#162)
  • Fall back to raw text if there is a parser error in a JS expression inside a moustache tag (#163)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc