我正在使用 WebStorm 2016.3,目前正在从事基于 typescript 的项目。
现在自动导入会生成如下内容:
import {xxx} from "yyy"
我想把格式改成
import { xxx } from 'yyy'
我该怎么做?
最佳答案
2016.3.*:
在
设置中 |代码风格 | typescript |空格
,启用Within/ES6 import/export braces
在
设置中 |代码风格 | typescript |其他
,设置引号:
为单引号
2017.1.*:
- 在
设置中 |代码风格 | typescript |空格
,启用Within/ES6 import/export braces
- 在
设置中 |代码风格 | typescript |标点符号
,设置Use
为单个
关于javascript - 在 WebStorm 中更改自动导入格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41141154/