0

There is this WebStorm beast, I like it, and it provides good services when I edit/develop my Angular.js application, but the code inserted automatically, protecting me to enter that code, is not fit for TSLint rules created also automatically by angular-client.

Example:

I created a new module (AModule) which should be included by another module (module B). When I enter AMdule in the import section of BModule then the intellisense offers me AModule and I hit enter and the module will be imported. But, it is imported this:

import {AModule} from "./services/AModule/AModule.module";

And I want this:

import { AModule } from './services/AModule/AModule.module';

I haven't found so far how can I make changes in these templates. How can I make changes like this? I searched for templates but they deal with something else in WebStorm.

1

3 Answers 3

3

Check Es6 import/exports braces" enter image description here

Sign up to request clarification or add additional context in comments.

Comments

1
  • in Settings | Code Style | Typescript | Spaces, enable Within / ES6 import/export braces
  • 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

Comments

0

you have to look into setting > search for Live template > find the snippet you want to edit

1 Comment

autoimports don't use live templates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.