forked from typescript-community/community-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.prettierrc.js
89 lines (79 loc) · 2.04 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
module.exports = {
/**
* Include parentheses around a sole arrow function parameter.
*
* avoid - Omit parens when possible. Example: `x => x`
* always - Always include parens. Example: `(x) => x`
*/
arrowParens: 'avoid',
/**
* Print spaces between brackets.
*
* Type: boolean
*/
bracketSpacing: true,
/**
* Print (to stderr) where a cursor at the given position would move to after formatting.
* This option cannot be used with --range-start and --range-end.
*
* Type: integer
*/
cursorOffset: -1,
/**
* Which end of line characters to apply.
*
* auto - Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)
* lf - Line Feed only (\n), common on Linux and macOS as well as inside git repos
* crlf - Carriage Return + Line Feed characters (\r\n), common on Windows
* cr - Carriage Return character only (\r), used very rarely
*/
endOfLine: 'auto',
/**
* How to wrap prose.
*
* always - Wrap prose if it exceeds the print width.
* never - Do not wrap prose.
* preserve - Wrap prose as-is.
*/
proseWrap: 'preserve',
/**
* Change when properties in objects are quoted.
*
* as-needed - Only add quotes around object properties where required.
* consistent - If at least one property in an object requires quotes, quote all properties.
* preserve - Respect the input use of quotes in object properties.
*/
quoteProps: 'as-needed',
/**
* Print semicolons.
*
* Type: boolean
*/
semi: true,
/**
* Use single quotes instead of double quotes.
*
* Type: boolean
*/
singleQuote: true,
/**
* Number of spaces per indentation level.
*
* Type: integer
*/
tabWidth: 4,
/**
* Print trailing commas wherever possible when multi-line.
*
* none - No trailing commas.
* es5 - Trailing commas where valid in ES5 (objects, arrays, etc.)
* all - Trailing commas wherever possible (including function arguments).
*/
trailingComma: 'all',
/**
* Indent with tabs instead of spaces.
*
* Type: boolean
*/
useTabs: true,
};