在 WebStorm 中更改自动导入格式
Change auto import format in WebStorm
我正在使用 WebStorm 2016.3,目前正在处理基于 typescript 的项目。
现在自动导入会生成如下内容:
import {xxx} from "yyy"
我想将格式更改为
import { xxx } from 'yyy'
我该怎么做?
您可以在以下位置进行更改:
Settings | Code Style | Typescript | Other
Select 单引号 引号 生成的代码部分
2016.3.*:
在Settings | Code Style | Typescript | Spaces
中,启用Within / ES6 import/export braces
在Settings | Code Style | Typescript | Other
中,设置Quote marks:
为单引号
2017.1.*:
- 在
Settings | Code Style | Typescript | Spaces
中,启用 Within / ES6 import/export braces
- 在
Settings | Code Style | Typescript | Punctuation
中,将Use
设为单
我正在使用 WebStorm 2016.3,目前正在处理基于 typescript 的项目。
现在自动导入会生成如下内容:
import {xxx} from "yyy"
我想将格式更改为
import { xxx } from 'yyy'
我该怎么做?
您可以在以下位置进行更改:
Settings | Code Style | Typescript | Other
Select 单引号 引号 生成的代码部分
2016.3.*:
在
Settings | Code Style | Typescript | Spaces
中,启用Within / ES6 import/export braces
在
Settings | Code Style | Typescript | Other
中,设置Quote marks:
为单引号
2017.1.*:
- 在
Settings | Code Style | Typescript | Spaces
中,启用Within / ES6 import/export braces
- 在
Settings | Code Style | Typescript | Punctuation
中,将Use
设为单