Visual Studio Code - Adjust import quotation setting Ask Question

Visual Studio Code - Adjust import quotation setting Ask Question

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?

ベストアンサー1

"typescript.preferences.quoteStyle": "single"

For more info see:

https://code.visualstudio.com/updates/v1_24#_preferences-for-auto-imports-and-generated-code

おすすめ記事