Jaroslaw K. Jaroslaw K. -3 years ago 176
TypeScript Question

How to make changes to custom formatter in WebStorm

I would like to make change to custom formatter in WebStorm IDE. When i use [ctrl] + [alt] + [o] hotkey, my imports in TypeScript files are formated to form:

import {HttpModule} from "@angular/http";


It's ok, but TSLint highlight line and show message:


TSLint: " should be ' (quotemark)


Is it possible to change Webstorm custom formatter so that format imports in this way:

import {HttpModule} from '@angular/http';


I note that I'm not interested in changing tslint.json

Answer Source

in Settings | Code Style | Typescript | Punctuation, set Use to single. Note that you can import code style prerefences from your tslint.json : open it in editor and click 'Yes' when prompted to apply settings. See https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2455/, Import code style from tslint.json

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download