-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Expand file tree
/
Copy path.prettierrc.js
More file actions
65 lines (63 loc) · 1.6 KB
/
.prettierrc.js
File metadata and controls
65 lines (63 loc) · 1.6 KB
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
/**
* Prettier Configuration for Uptime Kuma
*
* Usage:
* npm run fmt - Format all files (auto-runs in CI via autofix workflow)
* npm run fmt -- --check - Check formatting without making changes
*
* TIP: This formatter is automatically run in CI, so no need to worry about it
*/
module.exports = {
// Core formatting options - matching original ESLint rules
semi: true,
singleQuote: false,
trailingComma: "es5",
printWidth: 120,
tabWidth: 4,
useTabs: false,
endOfLine: "lf",
arrowParens: "always",
bracketSpacing: true,
bracketSameLine: false,
// Vue-specific settings
vueIndentScriptAndStyle: false,
singleAttributePerLine: false,
htmlWhitespaceSensitivity: "ignore", // More forgiving with whitespace in HTML
// Override settings for specific file types
overrides: [
{
files: "*.vue",
options: {
parser: "vue",
},
},
{
files: ["*.json"],
options: {
tabWidth: 4,
trailingComma: "none",
},
},
{
files: ["*.yml", "*.yaml"],
options: {
tabWidth: 2,
trailingComma: "none",
},
},
{
files: ["src/icon.js"],
options: {
trailingComma: "all",
},
},
{
files: ["*.md"],
options: {
printWidth: 100,
proseWrap: "preserve",
tabWidth: 2,
},
},
],
};