diff --git a/README.md b/README.md index 3dd1c70e..f9e1eb61 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ 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 bindings `on:click=""`, and more + - e.g. expressions inside of `{}`, event bindings `onclick={...}`, and more ## VS Code Extension @@ -28,7 +28,7 @@ Installing the plugin as a package allows: ### Compatibility -- `prettier-plugin-svelte@4` only works with `prettier@3` +- `prettier-plugin-svelte@4` only works with `prettier@3` and Svelte 5+ - `prettier-plugin-svelte@3` only works with `prettier@3` - `prettier-plugin-svelte@2` only works with `prettier@2` @@ -113,47 +113,6 @@ Example: | ------- | --------------------------------- | ------------------------------ | | `true` | `--svelte-allow-shorthand ` | `svelteAllowShorthand: ` | -### Svelte Bracket New Line - -> Deprecated since 2.5.0. Use Prettier 2.4.0 and [bracketSameLine](https://prettier.io/docs/en/options.html#bracket-line) instead. - -Put the `>` of a multiline element on a new line. Roughly the Svelte equivalent of the [jsxBracketSameLine](https://prettier.io/docs/en/options.html#jsx-brackets) rule. Setting this to `false` will have no effect for whitespace-sensitive tags (inline elements) when there's no whitespace between the `>` of the start tag and the inner content, or when there's no whitespace after the `>` of the end tag. You can read more about HTML whitespace sensitivity [here](https://prettier.io/blog/2018/11/07/1.15.0.html#whitespace-sensitive-formatting). You can adjust whitespace sensitivity through [this setting](https://prettier.io/docs/en/options.html#html-whitespace-sensitivity). - -Example: - - -```html - -
foo
bar
-
content
- - -
foo
- bar
-
- content -
- - -
foo
- bar
-
- content -
-``` - -| Default | CLI Override | API Override | -| ------- | ---------------------------------- | ------------------------------ | -| `true` | `--svelte-bracket-new-line ` | `svelteBracketNewLine: ` | - ### Svelte Indent Script And Style Whether or not to indent the code inside `