Languages
[Edit]
EN

VS Code - use single quotes in imports (JavaScript / TypeScript)

8 points
Created by:
James-Z
767

In this short article, we would like to show how to set single quotes in imports in JavaScript and TypeScript under Windows or Linux.

This configuration causes using single quotes imports in automatically imported files,
e.g. import Class from './path/to/file';

Simple steps:

  1. in menu, go to: File -> Preferences -> Settings,
  2. type in search: single quotes,
  3. set Quote Style as: single.

Hint: you can press Ctrl+, keys to open Settings too.

Screenshots:

VS Code settings in application menu under Windows or Linux.
VS Code settings in application menu under Windows or Linux.
Single quote style in VS Code settings.
Single quote style in VS Code settings.

 

Alternative titles

  1. VS Code - set single quotes in imports (JavaScript / TypeScript)
  2. VS Code - select single quotes in imports (JavaScript / TypeScript)
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join