Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding spaces between imports and braces in WebStorm

Is it possible to add spaces between imports and braces in WebStorm's auto-import feature?

Currently how the auto import looks like:

import {AbstractControl} from '@angular/forms';

I want to change it to:

import { AbstractControl } from '@angular/forms';
like image 827
Runtime Terror Avatar asked Jan 29 '17 11:01

Runtime Terror


2 Answers

Yes. Go to WebStorm -> Preferences -> Editor -> Code Style -> JavaScript -> Spaces (second tab), scroll to section "Within" and check ES6 import/export braces. enter image description here

like image 147
yivo Avatar answered Oct 22 '22 15:10

yivo


  • For javascript Project:

Go to WebStorm > File > Settings > Editor > Code Style > JavaScript > Spaces (second tab), scroll to section "Within" and check ES6 import/export braces.

  • For TypeScript Project:

Go to WebStorm > File > Settings > Editor > Code Style > TypeScript > Spaces (second tab), scroll to section "Within" and check ES6 import/export braces.

like image 22
Mehul Mali Avatar answered Oct 22 '22 15:10

Mehul Mali