How to make Webstorm "Reformatting Source Code" to change double quotes to single quotes?

Vlad Ankudinov picture Vlad Ankudinov · Mar 10, 2016 · Viewed 21.3k times · Source

When I push cmd + alt + l Webstorm doing some reformating to beautify my JavaScript sources. Ho to make Webstorm automatically change double quotes to single quotes in my sources?

Answer

Eduardo Vazquez picture Eduardo Vazquez · Mar 20, 2017

In Webstorm 2017.1, do the following:

  1. Go to File -> Settings | Preferences
  2. Choose Editor -> Code Style -> TypeScript
  3. Select 'Punctuation' tab
  4. Change: Use 'double' quotes to Use 'single' quotes. (Additionally, you can change 'in new code' to 'always')

Webstorm auto-import change to use double quotes instead of single quotes