在 WebStorm 中更改自动导入格式
我正在使用 WebStorm 2016.3,目前正在从事基于打字稿的项目.
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"
我想把格式改成
import { xxx } from 'yyy'
我该怎么做?
推荐答案
2016.3.*:
在
设置 |代码风格 |打字稿 |空格,启用Within/ES6导入/导出大括号
在 设置 |代码风格 |打字稿 |其他,设置引号:为单引号
2017.1.*:
- 在
设置|代码风格 |打字稿 |空格,启用Within/ES6 import/export 大括号 - 在
设置|代码风格 |打字稿 |标点符号,设置Use为single
- in
Settings | Code Style | Typescript | Spaces, enableWithin / ES6 import/export braces - in
Settings | Code Style | Typescript | Punctuation, setUseto single
相关文章