In .prettierrc, add:

{
  "singleQuote": true,
  "jsxSingleQuote": true
}
Answer from Edmar Miyake on Stack Overflow
🌐
Prettier
prettier.io › docs › options
Options · Prettier
Note that Prettier never unquotes numeric property names in Angular expressions, TypeScript, and Flow because the distinction between string and numeric keys is significant in these languages. See: Angular, TypeScript, Flow.
Discussions

visual studio code - VSCode single to double quote automatic replace - Stack Overflow
In my specific case this rule conflicts with electron-vue lint configuration that require singlequote. I don't have prettier extensions installed (no prettier.singleQuote in my setting) More on stackoverflow.com
🌐 stackoverflow.com
Single quotes are sometimes replaced with double quotes even when "prettier.singleQuote: true" is specified
I am using the vscode extension and am having an issue with the prettier.singleQuote setting. More on github.com
🌐 github.com
11
June 28, 2017
Do you guys prefer single quotes or double quotes in JS and jQuery?
Does not matter. Whatever you pick, stay with it. Personally single quotes enforced via prettier. More on reddit.com
🌐 r/learnjavascript
19
8
July 9, 2021
Prettier single quote for JavaScript and JSON, double quote for HTML, Sass and CSS - Stack Overflow
Did the accepted answer work for you with JSON files? Single quotes are invalid when surrounding property names or string values in JSON and prettier seems to [appropriately] ignore singleQuote: true there for me. More on stackoverflow.com
🌐 stackoverflow.com
🌐
Medium
pjausovec.medium.com › prettier-single-quote-setting-not-respected-in-tsx-files-vs-code-8d34a9554b37
Prettier single quote setting not respected in .tsx files (VS Code) | by Peter Jausovec | Medium
March 7, 2021 - You can double-check that’s the case by looking at the Output window in VSCode and selecting “Prettier” from the dropdown on the right: ... Even though the output clearly shows the singleQuote setting is set to true, I am still seeing double quotes in my files when formatting the files.
🌐
GitHub
github.com › prettier › prettier › issues › 2338
Single quotes are sometimes replaced with double quotes even when "prettier.singleQuote: true" is specified · Issue #2338 · prettier/prettier
June 28, 2017 - I am using the vscode extension and am having an issue with the prettier.singleQuote setting. The only settings I have customized are: "prettier.singleQuote": true, "prettier.trailingComma": "all", "prettier.printWidth": 100 Specifically...
Author   alexjlockwood
🌐
Prettier
prettier.io › docs › configuration
Configuration File · Prettier
# .prettierrc.toml trailingComma = "es5" tabWidth = 4 semi = false singleQuote = true · Overrides let you have different configuration for certain file extensions, folders and specific files.
🌐
Prettier
prettier.io › docs › rationale
Rationale · Prettier
Double or single quotes? Prettier chooses the one which results in the fewest number of escapes. "It's gettin' better!", not 'It\'s gettin\' better!'. In case of a tie or the string not containing any quotes, Prettier defaults to double quotes ...
🌐
YouTube
youtube.com › watch
VS Code Prettier Setting: prettier.singleQuote - YouTube
Want to master VS Code? Click here: https://andrecasal.com/courses/mastery-for-vs-codeWant to upgrade web dev skills? Subscribe to the newsletter here: https...
Published   September 20, 2019
Find elsewhere
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 1099
Prettier "prettier.singleQuote" not working in 1.40 vs code · Issue #1099 · prettier/prettier-vscode
November 26, 2019 - Summary Prettier "prettier.singleQuote" not working in 1.40 vs code Github Repository to Reproduce Issue Steps To Reproduce: Install VS Code 1.40.1 (user step-up) Install Prettier add-on to VS Code Set below settings in VS Code "prettier...
Author   sreekumarp
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 1085
cannot format doubleQuotes to singleQuote in single javascript file · Issue #1085 · prettier/prettier-vscode
November 21, 2019 - prettier / prettier-vscode Public · There was an error while loading. Please reload this page. Notifications · You must be signed in to change notification settings · Fork 509 · Star 5.5k · New issueCopy link · New issueCopy link · Closed · Closed · cannot format doubleQuotes to singleQuote in single javascript file#1085 ·
Author   Fenglinwanyue
🌐
GitHub
github.com › prettier › prettier › issues › 2280
Trying to override eslint (using prettier) to use single quotes not double · Issue #2280 · prettier/prettier
June 27, 2017 - { "extends": "prettier", "env": { "browser": true, "node": true }, "parserOptions": { "ecmaVersion": 6, "sourceType": "module" }, "plugins": [ "prettier" ], "rules": { "prettier/prettier": "error", "quotes": ["error", "single"] } }
Author   iangregsondev
🌐
GitHub
github.com › prettier › prettier › issues › 4102
Change the default value for singleQuote to true · Issue #4102 · prettier/prettier
March 5, 2018 - prettier / prettier Public · There was an error while loading. Please reload this page. Notifications · You must be signed in to change notification settings · Fork 4.7k · Star 51.7k · New issueCopy link · New issueCopy link · Open · Open · Change the default value for singleQuote to true#4102 ·
Author   lipis
🌐
Bobby Hadz
bobbyhadz.com › blog › replace-double-quotes-with-single-in-vscode
VS Code: Replace Double quotes with Single or vice versa | bobbyhadz
April 6, 2024 - When the Prettier: Single Quote setting is enabled, single quotes are used instead of double quotes everywhere (except for JSX files).
🌐
Website Files
cdn.prod.website-files.com › 6724d7b555e56ffe1cc5eeba › 67b0a78701903fd77f7ed039_78241410014.pdf pdf
Vscode single quote on save
Quote setting. If you manage Prettier settings through your package.json file, add these lines: "prettier": { "singleQuote": true, "jsxSingleQuote": true }. If using a .editorconfig file, change the quote_type to single or double instead. Make sure VS Code is restarted after changes.