From 0bf65c1ad9c0bb4f53c5b63950a2856806e8ecae Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Mon, 18 Jan 2021 11:33:11 +0100 Subject: [PATCH] (doc) add info about when options are ignored #764 --- packages/svelte-vscode/README.md | 18 +++++++++++++++--- packages/svelte-vscode/package.json | 16 ++++++++-------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/svelte-vscode/README.md b/packages/svelte-vscode/README.md index 29edf58c2..5ec40bd82 100644 --- a/packages/svelte-vscode/README.md +++ b/packages/svelte-vscode/README.md @@ -204,35 +204,47 @@ Svelte compiler warning codes to ignore or to treat as errors. Example: { 'css-u ##### `svelte.plugin.svelte.format.enable` -Enable formatting for Svelte (includes css & js) using [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte). You can set some formatting options through this extension. They will be ignored if there's a `.prettierrc` configuration file. _Default_: `true` +Enable formatting for Svelte (includes css & js) using [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte). _Default_: `true` + +You can set some formatting options through this extension. They will be ignored if there's any kind of configuration file, for example a `.prettierrc` file. Read more about Prettier's configuration file [here](https://prettier.io/docs/en/configuration.html). ##### `svelte.plugin.svelte.format.config.svelteSortOrder` Format: join the keys `options`, `scripts`, `markup`, `styles` with a `-` in the order you want. _Default_: `options-scripts-markup-styles` +This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file. + ##### `svelte.plugin.svelte.format.config.svelteStrictMode` More strict HTML syntax. _Default_: `false` +This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file. + ##### `svelte.plugin.svelte.format.config.svelteAllowShorthand` Option to enable/disable component attribute shorthand if attribute name and expression are the same. _Default_: `true` +This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file. + ##### `svelte.plugin.svelte.format.config.svelteBracketNewLine` Put the `>` of a multiline element on a new line. _Default_: `true` +This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file. + ##### `svelte.plugin.svelte.format.config.svelteIndentScriptAndStyle` Whether or not to indent code inside `