5

Anyone else come across Prettier formatting code with Double quotes instead of Single even though you explicitly set it to replace with single in the preferences? Here is a pic: enter image description here

After a recent update to VSCode I started getting this issue and it is driving me crazy. Any ideas as to how to fix this. Am I wrong that the Prettier: Single Quote in fact does not format with single quotes instead of double? Thanks.

Kevin192291
  • 1,925
  • 4
  • 26
  • 43
  • I have a similar question here (reversed problem, want double and get single quotes): https://stackoverflow.com/questions/62595498/prettier-in-vs-code-format-double-quotes-inside-double-quotes – tornord Jun 26 '20 at 13:15

1 Answers1

15

Try to create file .prettierrc at package.json level with property singleQuote set to true as below:

{
  "singleQuote": true
}
Kick Buttowski
  • 6,709
  • 13
  • 37
  • 58
Sushil Adokar
  • 370
  • 5
  • 9