-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprettier.config.ts
More file actions
32 lines (31 loc) · 984 Bytes
/
Copy pathprettier.config.ts
File metadata and controls
32 lines (31 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { Config } from 'prettier'
export default {
// 在语句末尾打印分号
semi: false,
// 使用单引号而不是双引号
singleQuote: true,
// 指定打印机将包裹的行长度
printWidth: 100,
// 用制表符而不是空格缩进线条
useTabs: false,
// 指定每个缩进级别的空格数
tabWidth: 2,
// 箭头函数参数只有一个时是否添加括号
arrowParens: 'always',
// 是否在对象字面量中打印空格
bracketSpacing: true,
// 尽可能打印尾随逗号
trailingComma: 'all',
// HTML 标签中的空格敏感度
htmlWhitespaceSensitivity: 'ignore',
// 每个属性是否独占一行
singleAttributePerLine: false,
// 方括号是否与最后一个元素在同一行
bracketSameLine: false,
// 在 JSX 中使用单引号而不是双引号
jsxSingleQuote: false,
// 是否在 Markdown 中换行
proseWrap: 'preserve',
// 换行符使用 LF 而不是 CRLF
endOfLine: 'lf',
} as Config