VS Code Auto Indent / Code Formatting changes single quotation marks to double

Daniel B's solution didnt help my case, I needed to follow this: https://github.com/praveenpuglia/angular-sanity/issues/4

VSCode

Auto imports are intelligent in VSCode to use tslint.json file in order to insert import statements based on your configuration. But if you are manually writing import statement and accidentally mess that up here's one thing to rescue.

In User Preferences set the following:

"tslint.autoFixOnSave": true


Edit: one more thing, I noticed after testing that my issue seemed to boil down to the formatter. I updated my typescript formatter to this:
"[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
}

after I updated the formatter that - I believe - helped fix the part that was incorrectly updating my code to double quotes


The extensions uses the settings that are set in your VS Code user settings file.

To change it, open your user settings file

Ctrl+Shift+P and type Open User Settings.

Search for prettier.singleQuote and change it to true like

"prettier.singleQuote": true