TypeScript auto-import style

Can i configure brackets style for auto-import?

import {DriversDAO} from '../models/DAO/drivers.dao';
->
import { DriversDAO } from '../models/DAO/drivers.dao';

Also, separated imports does not looks very good for me:

import {LatLng} from "../lib/location/latLng";
import {Test} from "../lib/location/latLng";
->
import { LatLng, Test } from "../lib/location/latLng";

 

3 comments

1. See https://youtrack.jetbrains.com/issue/WEB-19281: WebStorm 12 will provide 'Within | ES6 import/export braces' option for spaces, so imports will be formatted accordingly on adding.

2. In WebStorm 12, imports will be merged (https://youtrack.jetbrains.com/issue/WEB-17458)

1

Hi is it also possible to change the "" to '' currently when importing in IntelliJ it does not respect the TSLint styling that uses 

import {NgModule} from '@angular/core';

instead of
import {NgModule} from "@angular/core";

Ok found where to do it... so its fixed, its on a different page than on WS, its on the punctuation page.

0

Sure - In Settings | Editor | Code Style | TypeScript | Punctuation, set Use single quotes always

0

Please sign in to leave a comment.