forked from kuyaaaa/vue3-ts-admin-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prettierrc.js
40 lines (40 loc) · 1.26 KB
/
.prettierrc.js
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
33
34
35
36
37
38
39
40
module.exports = {
// tab缩进大小,默认为2
tabWidth: 4,
//行宽
printWidth: 100,
// 使用tab缩进,默认false
useTabs: false,
// 使用分号, 默认true
semi: true,
// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: false,
// 行尾逗号,默认none,可选 none|es5|all
// es5 包括es5中的数组、对象
// all 包括函数对象等所有可选
TrailingCooma: "es5",
// 行尾序列模式
endOfLine: "lf",
// 对象中的空格 默认true
// true: { foo: bar }
// false: {foo: bar}
bracketSpacing: true,
// JSX标签闭合位置 默认false
// false: <div
// className=""
// style={{}}
// >
// true: <div
// className=""
// style={{}} >
jsxBracketSameLine: false,
// 箭头函数参数括号 默认avoid 可选 avoid| always
// avoid 能省略括号的时候就省略 例如x => x
// always 总是有括号
arrowParens: "avoid",
//换行方式 默认值。
// 因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
proseWrap: "preserve",
// 行尾序列设置
endOfLine: "auto",
};