-
Notifications
You must be signed in to change notification settings - Fork 12
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
Formatting svelte files #88
Comments
This is due to this package deriving the Prettier parser from the major mode instead of letting Prettier choose the parser. It's something I've been meaning to change, I'll see that I can push an improvement for this soon. As a workaround, if you use |
Thanks, looking forward to it.
I am using svelte-mode, but it changes the major mode depending on where you are in the file (ts / js mode inside the script tags, svelte in the markup and css within the style tags). In fact I have just checked it and it works if I save when the cursor is located in the markup. |
Right, that's different. I've pushed a fix, it should have landed in |
Yes, it is working now anywhere in the file, thank you! |
Describe the bug
When formatting a svelte files it seems like it thinks that it is a js file. Giving errors like
Link to
M-x prettier-info
outputhttps://gist.github.com/agorer/c57f881d75d39779a1a91a71b4f8bf15
To Reproduce
Expected behavior
The file should be formatted according to the rules in .prettierrc
Additional context
The text was updated successfully, but these errors were encountered: