Describe the bug
Projects using prettier@2 + prettier-plugin-svelte for code formatting see different results from running prettier --write vs svelte-vscode + formatOnSave
To Reproduce
<script>
const foo = bar().baz().baf();
</script>
svelte-vscode formats this as:
<script>
const foo = bar()
.baz()
.baf();
</script>
prettier --write formats this as
<script>
const foo = bar().baz().baf();
</script>
Expected behaviour
Expect the formatting to be consistent.
Ideally, I would expect svelte-vscode to use some instance of prettier installed locally or globally before anything else.
System (please complete the following information):
Additional context
Looks very much like the svelte-vscode is formatting like prettier@1
You are right, currently a hardcoded version of prettier 1.x is used. We will look into making this dynamic / dependent on user's installation, or at least bump to 2.x .
Most helpful comment
You are right, currently a hardcoded version of prettier 1.x is used. We will look into making this dynamic / dependent on user's installation, or at least bump to 2.x .