I don't have prettier extension installed, but after reading the possible duplicate answer I've added from scratch in my User Setting (UserSetting.json, Ctrl+, shortcut):

"prettier.singleQuote": true

A part a green warning (Unknown configuration setting) the single quotes are no more replaced.

I suspect that the prettier extension is not visible but is embedded inside the Vetur extension.

Answer from attdona on Stack Overflow
🌐
GitHub
github.com › angular › angular-cli › issues › 17012
Force single quote for *.ts files in .editorconfig · Issue #17012 · angular/angular-cli
🚀 Feature request Command new build serve test e2e generate add update lint xi18n run config help version doc Description When saving typescript files, my editor format my code and change single quoted string to double quote. I use Prett...
Author   ghost
Discussions

How to use single quotes when formatting
https://editorconfig.org/ VS Code plug-in: https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig I hate single quotes myself but it's a config you can do. More on reddit.com
🌐 r/vscode
2
3
December 9, 2024
.editorconfig missing `quote_type = single` for formatting of typescript files
I'm submitting a... Bug report Feature request Documentation issue or request Question Current behavior Using prettier as formatter in VSCode, format whole .ts typescript file makes all single-... More on github.com
🌐 github.com
3
December 27, 2020
[deleted by user]
AFAIK that’s more of a job for a linter/formatter. Either style is valid code so the LSP is happy. Everything else is preference, similar to spaces vs tabs. That said some LSPs do have formatting built in but it’s generally not as customizable and can cause conflicts/pain when working with different styles in different projects. More on reddit.com
🌐 r/neovim
2
4
June 3, 2023
Single Quote isn't applied on save or format document/selection
The semi colon rule works fine on save or formatting document, but the single quote will not resolve. If I run prettier --write, it picks up the .prettierrc and correctly changes to single quotes. ... More on github.com
🌐 github.com
3
January 22, 2018

I don't have prettier extension installed, but after reading the possible duplicate answer I've added from scratch in my User Setting (UserSetting.json, Ctrl+, shortcut):

"prettier.singleQuote": true

A part a green warning (Unknown configuration setting) the single quotes are no more replaced.

I suspect that the prettier extension is not visible but is embedded inside the Vetur extension.

Answer from attdona on Stack Overflow
🌐
JetBrains
jetbrains.com › help › resharper › EditorConfig_JAVA_SCRIPT_JavaScriptCodeStyleSchema.html
EditorConfig properties for JavaScript: Syntax Style | ReSharper Documentation
Defines whether single-quotes (') or double-quotes (") should be used for string literals ... EditorConfig properties for JavaScript: Braces LayoutEditorConfig properties for JavaScript: Tabs and Indents
🌐
EditorConfig
editorconfig.org
EditorConfig
EditorConfig files use an INI format that is compatible with the format used by Python configparser Library, but [ and ] are allowed in the section names. The section names are filepath globs (case sensitive), similar to the format accepted by gitignore. Only forward slashes (/, not backslashes) ...
Find elsewhere
🌐
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 - Add the following line to your .editorconfig file to replace single quotes with double.
🌐
GitHub
github.com › editorconfig › editorconfig › wiki › EditorConfig-Properties
EditorConfig Properties · editorconfig/editorconfig Wiki - GitHub
February 21, 2020 - This is simply a brainstorm of domain-specific properties that could be supported by some tools that rely on EditorConfig files. There is a proposal to "namespace" properties with a language-dependent prefix. See Issue #332. ... Denotes preferred quoting style for string literals (for languages that support multiple quote styles)
Author   editorconfig
🌐
DEV Community
dev.to › rkristelijn › most-basic-code-formatting-3cmb
Most elemental code formatting for Typescript/Javascript: .editorconfig vs prettier - DEV Community
April 19, 2024 - But the most elemental code formatting is not here, it is in the widely supported .editorconfig file. ... root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true max_line_length = 100 quote_type = single
🌐
Reddit
reddit.com › r/neovim › [deleted by user]
Can one have the built-in LSP format command replace ...
June 3, 2023 - Create or add to this file ~/.config/nvim/.editorconfig · [*.lua] # optional space/tab indent_style = space # if indent_style is space, this is valid indent_size = 2 # if indent_style is tab, this is valid tab_width = 2 # none/single/double quote_style = single ·
🌐
Prettier
prettier.io › docs › options
Options · Prettier
(Tabs will be used for indentation but Prettier uses spaces to align things, such as in ternaries. This behavior is known as SmartTabs.) Print semicolons at the ends of statements. ... Use single quotes instead of double quotes.
🌐
JetBrains
youtrack.jetbrains.com › issue › WEB-21157
generate imports with quotes from editorconfig files - YouTrack
December 28, 2022 - {{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 345
Single Quote isn't applied on save or format document/selection · Issue #345 · prettier/prettier-vscode
January 22, 2018 - The semi colon rule works fine on save or formatting document, but the single quote will not resolve. If I run prettier --write, it picks up the .prettierrc and correctly changes to single quotes. Even if I directly set the "prettier.singleQuote": false in VSC configuration and remove the .editorconfig completely this still happens.
Author   akrueger
🌐
JetBrains
youtrack.jetbrains.com › issue › WEB-21157 › Typescript-Javascript-generate-imports-with-quotes-from-editorconfig-files
generate imports with quotes from editorconfig files
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
GitHub
github.com › cookiecutter › cookiecutter-django › issues › 4512
VSCode privileges .editorconfig over settings.json for single quotes · Issue #4512 · cookiecutter/cookiecutter-django
August 11, 2023 - The only way to make VSCode apply single quotes when applying Prettier is to add quote_type = single
Author   acyment
🌐
GitHub
github.com › thisissoon › .editorconfig › issues › 4
Switch to single quote style [JS] · Issue #4 · thisissoon/.editorconfig
September 11, 2015 - thisissoon / .editorconfig Public · Notifications · You must be signed in to change notification settings · Fork 0 · Star 0 · New issueCopy link · New issueCopy link · Closed · Closed · Switch to single quote style [JS]#4 · Copy link · Labels · enhancement ·
Author   edoparearyee
🌐
David Walsh
davidwalsh.name › editor-config
Per-Project Whitespace with EditorConfig
September 5, 2013 - Single quotes or double quotes? MooTools, Dojo, or micro-frameworks? And then the question that has started wars: spaces or tabs? I'm a tab guy myself but the team that I work on has set a two-space standard. It's not my preference but it was a team decision so I have to drink the Kool-Aid. I still want to use my typical tab whitespace on other projects but just this one project should use spaces. I thought this would be a nightmare but enter EditorConfig, a utility with plugins for several text editors which allows developers to specify settings per project.
🌐
Python
wiki.python.org › moin › EditorConfigurationHowto
EditorConfigurationHowto - Python Wiki
In particular, a mode should correctly ... and quotes. Python allows for raw strings without \-escape sequences (written with a preceding r: r"c:\dir1\dir2"). A well-designed mode should support this feature as well. An emerging standard for describing the configuration of code editors in a portable way is EditorConfig...
🌐
Reddit
reddit.com › r/vscode › help! vs code broke my code formatting
r/vscode on Reddit: Help! VS Code Broke My Code Formatting
November 19, 2019 -

I'm really not sure what to do, but this is pissing me off greatly. I'm using VS Code with my Angular projects at work, and had things set to use single quotes and no semi-colons. Now, after closing the editor, and re-opening it, with my project, it's changing my code files on save to double quotes and adding semi-colons. I'm using Prettier to handle the formatting as well. This has been untouched for over a year, and now it decides to start screwing with my formatting. My settings.json is below:

{
    "editor.fontFamily": "Fira Code",
    "editor.fontLigatures": true,
    "editor.formatOnSave": true,
    "editor.formatOnSaveTimeout": 1000,
    "editor.tabSize": 2,
    "files.trimTrailingWhitespace": true,
    "git.autofetch": true,
    "prettier.jsxBracketSameLine": true,
    "prettier.printWidth": 120,
    "prettier.semi": false,
    "prettier.singleQuote": true,
    "typescript.preferences.quoteStyle": "single",
    "workbench.colorTheme": "Material Theme Palenight High Contrast"
}

Can anyone help get this working again? Thanks.

Update: I've determined that the issue is with the Prettier extension [v3.8.0]. I tried disabling the extension initially, and formatting was still not working correctly. I then decided to try installing the previous version [v3.7.0] (it's possible it got updated when I restarted the editor), and it started working again. I did notice in the output window, with Prettier selected, most of my settings were missing in v3.8.0. In version 3.7.0, the output when formatting looks like this:

[INFO - 9:36:18 AM] Formatting <Redacted>.component.spec.ts.
[INFO - 9:36:18 AM] Using bundled version of prettier.
[INFO - 9:36:18 AM] Resolved ignore file to <redacted>\.prettierignore.
[INFO - 9:36:18 AM] File Info:
{
  "ignored": false,
  "inferredParser": "typescript"
}
[INFO - 9:36:18 AM] Prettier Options:
{
  "arrowParens": "avoid",
  "bracketSpacing": true,
  "endOfLine": "auto",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxBracketSameLine": true,
  "jsxSingleQuote": false,
  "printWidth": 120,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": false,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "none",
  "useTabs": false,
  "vueIndentScriptAndStyle": false,
  "filepath": "<redacted>.component.spec.ts",
  "parser": "typescript"
}
[INFO - 9:36:18 AM] Formatting completed in 28.423ms.

In version 3.8.0, the output when formatting shows this:

[INFO - 9:39:45 AM] Formatting <redacted>.component.spec.ts.
[INFO - 9:39:45 AM] Using bundled version of prettier.
[INFO - 9:39:45 AM] Resolved ignore file to <redacted>\.prettierignore.
[INFO - 9:39:45 AM] File Info:
{
  "ignored": false,
  "inferredParser": "typescript"
}
[INFO - 9:39:45 AM] Prettier Options:
{
  "filepath": "<redacted>.component.spec.ts",
  "parser": "typescript",
  "useTabs": false,
  "tabWidth": 2
}
[INFO - 9:39:45 AM] Formatting completed in 21.654699ms.

Update 2: It looks like both version 3.7.0 and 3.8.0 were released on the same day, one right after the other. Version 3.7.0 works correctly, while version 3.8.0 does not.