-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprettier.config.mjs
47 lines (47 loc) · 1.03 KB
/
prettier.config.mjs
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
/**
* @type import('prettier').Config
*/
export default {
overrides: [
{
files: ['*.{ts,tsx,js,jsx,mjs,mts,cjs,cts}'],
options: {
singleQuote: true,
quoteProps: 'consistent',
trailingComma: 'all',
arrowParens: 'always',
},
},
{
files: '*.json',
options: {
parser: 'json',
},
},
{
files: '*.jsonc',
options: {
parser: 'jsonc',
},
},
{
// VS Code does not support json5 (especially autocomplete/schemas), so we
// need to associate those files as jsonc. This helps prettier format it
// in a way that is compatible, for example avoiding unquoted properties
// and dangling commas, which are only supported in json.
files: 'renovate.json5',
options: {
parser: 'json',
},
},
{
files: ['*.md', '*.mdx'],
options: {
proseWrap: 'always',
singleQuote: true,
trailingComma: 'all',
arrowParens: 'always',
},
},
],
};