You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 3.4.0 a change was introduced which causes my User-Setting to have preference over the Workspace-Settings. (I just updated from 3.3.x)
Steps To Reproduce:
add .prettierrc with { "printWidth": 120 } to your project
Goto VSCode Preferences → Settings → User and set semi: false + printWidth: 40
add a random JS file having multiple lines of code with more than 120 chars
use >Format document (with Prettier)
Expected result
Code lines will be wrapped before 120 chars
Code has semicolons at the end of every line, since that's Prettier's default and a config file was provided, which does not touch that.
Actual result
Code lines are wrapped correctly (according to .prettierrc)
Code has NO semicolons (according to User-Settings)
Additional information
If .prettierrc or similar config is provided there should be no unexpected mix between User-Settings & config file. Settings not provided by .prettierrc should fallback to Prettier's default, else you will need to provide a full detailed config file to guarantee overwriting all User-Settings.
This update has caused my prettier to ignore my single quotes and is now making everything double quotes. No changes to my settings json in VSCODE where made apart from updating this plugin.
I was only using the VSCODE extension and had no need for a .prettierrc file, nor did I have prettier installed as a dependency in my project. Everything worked fine until this update.
Summary
In version
3.4.0
a change was introduced which causes my User-Setting to have preference over the Workspace-Settings. (I just updated from3.3.x
)Steps To Reproduce:
.prettierrc
with{ "printWidth": 120 }
to your projectPreferences
→Settings
→User
and setsemi: false
+printWidth: 40
>Format document
(with Prettier)Expected result
Code lines will be wrapped before 120 chars
Code has semicolons at the end of every line, since that's Prettier's default and a config file was provided, which does not touch that.
Actual result
Code lines are wrapped correctly (according to
.prettierrc
)Code has NO semicolons (according to User-Settings)
Additional information
If
.prettierrc
or similar config is provided there should be no unexpected mix between User-Settings & config file. Settings not provided by.prettierrc
should fallback to Prettier's default, else you will need to provide a full detailed config file to guarantee overwriting all User-Settings.See also:
https://code.visualstudio.com/docs/getstarted/settings
Reverting back to 3.3.0 the behavior is good again.
VS Code Version:
1.40.1
Prettier & Prettier Plugin Version:
3.7.0
OS and version:
MacOS 10.14.6
The text was updated successfully, but these errors were encountered: