George Njue
George Njue

Reputation: 37

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

Upvotes: 3

Views: 1039

Answers (1)

Tom
Tom

Reputation: 5677

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.

Upvotes: 3

Related Questions