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

Viewed 125

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

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.

Related