-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprettier.config.js
77 lines (75 loc) · 1.69 KB
/
prettier.config.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
// The values of these options match Prettier v3.x defaults.
// We repeat them here for clarity, and in case they change in the future.
const prettierDefaults = {
arrowParens: 'always',
jsxSingleQuote: false,
printWidth: 80,
semi: true,
singleAttributePerLine: false,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
};
module.exports = {
...prettierDefaults,
// Overrides for specific file types
overrides: [
{
files: ['**/*.cts', '**/*.mts', '**/*.ts', '**/*.tsx'],
options: {
arrowParens: 'avoid',
bracketSpacing: false,
singleQuote: true,
trailingComma: 'es5',
},
},
{
files: ['**/*.cjs', '**/*.js', '**/*.mjs', '**/*.jsx'],
options: {
bracketSameLine: true,
bracketSpacing: false,
embeddedLanguageFormatting: 'auto',
htmlWhitespaceSensitivity: 'strict',
quoteProps: 'preserve',
singleQuote: true,
},
},
{
files: ['**/*.css', '**/*.sass', '**/*.scss'],
options: {
singleQuote: true,
},
},
{
files: '*.html',
options: {
printWidth: 100,
},
},
{
files: '*.acx.html',
options: {
parser: 'angular',
singleQuote: true,
},
},
{
files: '*.ng.html',
options: {
parser: 'angular',
singleQuote: true,
printWidth: 100,
},
},
{
files: ['**/*.md'],
options: {
embeddedLanguageFormatting: 'off',
proseWrap: 'always',
// As recommended by the Google Markdown Style Guide
// https://google.github.io/styleguide/docguide/style.html
tabWidth: 4,
},
},
],
};