I'm using WebStorm 2016.3 and currently working on typescript based project.
Right now auto import will generate something like this:
import {xxx} from "yyy"
I want to change the format to
import { xxx } from 'yyy'
How do I do this?
2016.3.*:
in Settings | Code Style | Typescript | Spaces
Settings | Code Style | Typescript | Spaces
Settings | Code Style | Typescript | Spaces
, enable Within / ES6 import/export braces
in Settings | Code Style | Typescript | Other
Settings | Code Style | Typescript | Other
Settings | Code Style | Typescript | Other
, set Quote marks:
to Single quotes
2017.1.*:
Settings | Code Style | Typescript | Spaces
Settings | Code Style | Typescript | Spaces
Settings | Code Style | Typescript | Spaces
, enable Within / ES6 import/export braces
Settings | Code Style | Typescript | Punctuation
Settings | Code Style | Typescript | Punctuation
Settings | Code Style | Typescript | Punctuation
, set Use
to single You can change this in:
Settings | Code Style | Typescript | Other
Select Single quote for Quote marks in Generated code section
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.