Home > database >  IntelliJ / WebStorm auto format quotes stopped working
IntelliJ / WebStorm auto format quotes stopped working

Time:12-15

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?

CodePudding user response:

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.

  • Related