We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello there!
I want to write this, because I only care about the possibility of an error.
{#await goto('/somewhere') catch error} {@debug error} {/await}
But Prettier formats the snippet above returning this.
{#await goto('/somewhere')}{:catch error} {@debug error} {/await}
This needless separation also leaves a warning: Empty blocksvelte(empty-block), because there is nothing between the #await block and the :catch one.
Empty blocksvelte(empty-block)
#await
:catch
My prettier config is as such.
/** * @type {import('prettier').Options} */ module.exports = { plugins: [require('prettier-plugin-tailwindcss')], pluginSearchDirs: ['.'], overrides: [{files: '*.svelte', options: {parser: 'svelte'}}], tailwindConfig: './tailwind.config.cjs', arrowParens: 'always', bracketSpacing: false, endOfLine: 'lf', plugins: [], pluginSearchDirs: ['../../'], printWidth: 80, semi: true, singleQuote: true, tabWidth: 2, trailingComma: 'es5', useTabs: false, svelteSortOrder: 'options-styles-scripts-markup', svelteStrictMode: true, svelteBracketNewLine: false, svelteAllowShorthand: false, svelteIndentScriptAndStyle: true, };
Should I remove strict mode? In any case, shouldn't this be allowed?
Kind regards.
The text was updated successfully, but these errors were encountered:
That was fast!
Sorry, something went wrong.
[fix] format {#await .. catch ..}..{/await} correctly
{#await .. catch ..}..{/await}
d7c9c9f
Fixes sveltejs#323
[fix] format {#await .. catch ..}..{/await} correctly (#324)
7cfd71b
Fixes #323
That was even faster.
Successfully merging a pull request may close this issue.
Hello there!
I want to write this, because I only care about the possibility of an error.
But Prettier formats the snippet above returning this.
This needless separation also leaves a warning:
Empty blocksvelte(empty-block)
, because there is nothing between the#await
block and the:catch
one.My prettier config is as such.
Should I remove strict mode? In any case, shouldn't this be allowed?
Kind regards.
The text was updated successfully, but these errors were encountered: