Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

want to use single quotes by using prettier code formatter VS CODE

I have downloaded prettier from the extensions on visual studio code and I would want to use single quotes instead of double quotes please help

like image 790
George Njue Avatar asked May 01 '26 10:05

George Njue


1 Answers

Take a look at the configuration doc.

// prettier.config.js or .prettierrc.js
module.exports = {
  trailingComma: "es5",
  tabWidth: 4,
  semi: false,
  singleQuote: true, //what you want
};

Edit: or you can simply go to the extension settings and search for prettier.singleQuote.

like image 154
Tom Avatar answered May 03 '26 23:05

Tom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!