Closed mikemaccana closed 11 months ago
i had to disable formatting of svelte files in my projects because of this issue. It all worked fine a month ago, but prettier currently fails to parse svelte files with the existing version of prettier-plugin-svelte.
Have the same issue.
tweaked my .prettierrc.json:
"plugins": [
"prettier-plugin-svelte",
"prettier-plugin-tailwindcss"
],
and saw this error:
[error] src/components/vehicle-list.svelte: Error: printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed
[error] at printEmbeddedLanguages (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/index.mjs:17963:11)
[error] at printAstToDoc (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/index.mjs:18094:9)
[error] at async coreFormat (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/index.mjs:18405:14)
[error] at async formatWithCursor (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/index.mjs:18603:14)
[error] at async formatFiles (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/internal/cli.mjs:6778:18)
[error] at async main (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/internal/cli.mjs:6970:5)
[error] at async Module.run (file:///Users/richardhess/github/svelte/autos-s4e/node_modules/prettier/internal/cli.mjs:6924:5)
All matched files use Prettier code style!
error Command failed with exit code 2.
Error: printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed
That's due to this plugin not support prettier v3 yet. See #335 to track it.
When running:
The following error occurs:
I may be missing something - the README for this repo says it's for svelte but the README only mentions
.html
files, which is not the standard extension for Svelte.