1
votes

Is there a way to integrate angular's style guide into WebStorm?

In particular, auto imports use double-quotes instead of single quotes, and imports {Component} instead of { Component }, as well as export: [Component] instead of [ Component ].

This is really annoying to manually fix every time I need to reformat my code with CTRL+Shift+L

2

2 Answers

4
votes
  • in Settings | Code Style | Typescript | Spaces, enable Within / ES6 import/export braces
  • in Settings | Code Style | Typescript | Punctuation, set Use to single
1
votes

Not sure how to solve the imports issue but, for using single quotes,

Preferences --> Editor --> Code Style --> Typescript --> Punctuation(tab) --> Second line --> Use single quotes in new code