-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prettierrc.js
38 lines (38 loc) · 1.14 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
module.exports = {
"overrides": [
// all markdown is already wrapped before 100, keep consistent
{
"files": "*.md",
"options": {
"printWidth": 99,
},
},
// html is already (mostly) using two-space indents
{
"files": "*.html",
"options": {
"tabWidth": 2,
},
},
// yaml is also (mostly) using two-space indents
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2,
},
},
],
// prettier removes parens from single-argument arrow functions
// and AFAICT, this is the *only* case where parens on arrow functions are optional
// so let's not do that and keep consistency
"arrowParens": "always",
// consistent with black / python code
"printWidth": 88,
// eslint set to always quote props,
// so prettier must preserve
"quoteProps": "preserve",
// default is 2, we already used 4 everywhere
"tabWidth": 4,
// always use trailing commas where possible
"trailingComma": "all",
};