h11
h11

Reputation: 148

IntelliJ / WebStorm auto format quotes stopped working

I am using TSLint and its set to allow single quotes (') instead of double (").

I used to be able to use the Reformat Code shortcut CTRL + ALT + L and this would automatically swap all occurrences of " to ' in the file.

This has stopped working and I cant see a way to turn it back on in the settings... Can anyone help?

Upvotes: 1

Views: 602

Answers (1)

Inigo
Inigo

Reputation: 15078

Go to Preferences : Editor : Code Style : Typescript, to the Punctuation tab, then make sure you have Use single quotes always

Then reformat the file again (CTRL-ALT-L).

It may have stopped working because you switched code style schemes to one without the above setting.

You can do the same for Javascript to be consistent.

Upvotes: 2

Related Questions