Formatting doesn't work (with newly released Prettier v2.1.0)
See original GitHub issueWith Prettier v2.1.0, VSCode stops formatting .svelte
files and the Svelte VSCode extension runs into Error: unknown node type: undefined
pointing to prettier-plugin-svelte
in the stacktrace as culprit.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:18 (3 by maintainers)
Top Results From Across the Web
Options - Prettier
Prettier ships with a handful of format options. ... Prettier's printWidth option does not work the same way. ... 2, --tab-width <int>, tabWidth:...
Read more >Prettier 2.1: new --embedded-language-formatting option and ...
This release adds a new `--embedded-language-formatting` option, supports new JavaScript/TypeScript features, and includes many bug fixes ...
Read more >Releasing Prettier 1.0
We officially announced prettier over two months ago as a way to solve the problem of wasting time formatting your code.
Read more >Prettier 1.2
1.0 is not the end of prettier, we're going to continue to work on the long tail of formatting issues in order to...
Read more >Prettier 2.0 “2020”
Previously, Prettier CLI printed a "No matching files" error if it couldn't find any files at all—for all the patterns together, not for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@michaelwooley cool
Edited : Seems still not working for me (no formatter found etc)
My settings :
What is your configuration @michaelwooley ?
My configuration that works currently :
But I think format on save not working
How to get this working again
101.11.0
or higher installedpackage.json
: If you havesvelte-check
/prettier-plugin-svelte
/svelte-language-server
in there, set them to the latest version. If you don’t have them in there, you don’t have to install themnpm i
/yarn install
)More indepth
We deployed an update of the VSCode extension which contains the v1.1.1 of
prettier-plugin-svelte
. It leaves Prettier at2.0.5
to wait for some more bug fixes, but if you have a different Prettier version in your workspace then that one is used instead.To get formatting again, you also have to update your
prettier-plugin-svelte
version in your workspace, which you have installed if you installedsvelte-check
. Simply updatesvelte-check
for that. If you did not installsvelte-check
orprettier-plugin-svelte
directly, you can skip this.