-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
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
Formatter not functioning as expected in latest version (extensions-108.0.0) #2210
Comments
|
My bad it was the wrong release tag 😄 The version that no longer works is this one (the most recent): Reproduction: |
{
"type": "Script",
"start": 0,
"end": 14003,
"context": "default",
"content": {
"type": "Program",
"start": 13992,
"end": 13994,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 13994
}
},
"body": [
{
"type": "BlockStatement",
"start": 13992,
"end": 13994,
"loc": {
"start": {
"line": 1,
"column": 13992
},
"end": {
"line": 1,
"column": 13994
}
},
"body": []
}
],
"sourceType": "module"
}
}
Error: unknown node type: Script
at Object.print (/Users/username/.vscode/extensions/svelte.svelte-vscode-108.0.0/node_modules/prettier-plugin-svelte/plugin.js:1450:11)
at callPluginPrintFunction (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8601:26)
at mainPrintInternal (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8550:22)
at mainPrint (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8537:18)
at AstPath.call (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8359:24)
at printTopLevelParts (/Users/username/.vscode/extensions/svelte.svelte-vscode-108.0.0/node_modules/prettier-plugin-svelte/plugin.js:1491:33)
at Object.print (/Users/username/.vscode/extensions/svelte.svelte-vscode-108.0.0/node_modules/prettier-plugin-svelte/plugin.js:901:16)
at callPluginPrintFunction (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8601:26)
at mainPrintInternal (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8550:22)
at mainPrint (/Users/username/Documents/Project/svelte-project/node_modules/prettier/index.js:8537:18) |
<script lang="ts">
// ... some basic code
</script>
<div>
<!-- basic html -->
</div>
<style lang="scss">
// some basic style here
</style> |
I can't reproduce this. Please provide a github repository that reproduces this issue. |
Experiencing the same bug since yesterday (latest release). Just opened a very basic empty .svelte file. Auto-formatting does currently not work. Reverting to v107.13.0 and auto-formatting works |
Can someone please provide an actual reproduction instead of just saying it doesn't work? As I said I can't reproduce this. It has to do with the bump to using prettier version 3 by default now, I'm pretty sure about that, but I need a reproducible to get to the bottom of this |
im working on it :) sorry for late |
@yassinrais if it helps you : I had the same issue with prettier version 2, updating to version 3 solved the problem |
needs to check for version 3 or higher now #2210
Should be fixed in the latest version of the VS Code extension |
Describe the bug
The formatter in vscode no longer works
Reproduction
Using the latest version
https://github.com/sveltejs/language-tools/releases/tag/extensions-108.0.0
Expected behaviour
formatting should works
System Info
Which package is the issue about?
https://github.com/sveltejs/language-tools/releases/tag/extensions-108.0.0
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: