patterntypescriptCritical
Visual Studio Code - Adjust import quotation setting
Viewed 0 times
studiovisualquotationadjustsettingcodeimport
Problem
When working in TypeScript in Visual Studio Code, the import suggestion on a type (triggered by space + period) will generate an import using double quotes.
Our TypeScript linter verifies that single quotes are used where possible.
As you can see below, the suggestion has double quotes ("@angular/...")
How can I adjust the setting of the import?
Our TypeScript linter verifies that single quotes are used where possible.
As you can see below, the suggestion has double quotes ("@angular/...")
How can I adjust the setting of the import?
Solution
"typescript.preferences.quoteStyle": "single"
For more info see:
https://code.visualstudio.com/updates/v1_24#_preferences-for-auto-imports-and-generated-code
For more info see:
https://code.visualstudio.com/updates/v1_24#_preferences-for-auto-imports-and-generated-code
Context
Stack Overflow Q#42952453, score: 224
Revisions (0)
No revisions yet.