-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Prettier VSCode Not Consistent With CLI #3431
Comments
I have a similar issue, so I thought I'd bump that discussion as an issue, here. |
I was having a similar issue. It seems to be fixed for me now after uninstalling the VS Code extension, restarting VS Code, and then installing it again. If you're using a remote container, make sure you uninstall it in the container as well as on your host. |
Restart extension host at least fixed it for me when updating Prettier. Saving tried to format |
Restarting/reinstalling the vscode hasn't fixed the divergence for me. I'm on version 11.0.0 of the extension and version 3.3.3 of prettier CLI (used via With a minimal config, the consistent differences in formatting I've observed include:
|
I'm also experiencing some discrepancies, which seem to have appeared recently. In particular, the extension is removing trailing newlines from |
I'm also having issues where the plugin formats quite differently from the CLI. We use a fork of prettier, but it is still located in |
Update: I figured out my issue. Turns out I needed to add |
Also adding to this: a missing |
Setting |
Discussed in #3227
Originally posted by MarvNC December 14, 2023
I am using CLI 3.1.1 installed with npm globally. Meanwhile, my Prettier VSCode extension is v10.1.0.
I'd been mildly annoyed for a while at how it inserted random whitespaces between English and CJK text, but after doing some research I found out that this was fixed in the 3.0 release. After some debugging I found that using
prettier --write .
would not insert the random whitespaces, but the VSCode extension would.What should I do to debug this? Is there a way to update the version of prettier used within the VSCode extension or force it to use the same globally installed version? Reading the FAQ on the extension page it seems it should be using 3.0.0 as the extension is past version 10.
Log
The text was updated successfully, but these errors were encountered: