-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdprint.jsonc
More file actions
122 lines (107 loc) · 3.15 KB
/
dprint.jsonc
File metadata and controls
122 lines (107 loc) · 3.15 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{
// general options
"lineWidth": 80,
"indentWidth": 2,
"useTabs": false,
"newLineKind": "lf",
// https://dprint.dev/plugins/typescript/config/
"typescript": {
"semiColons": "always",
"quoteStyle": "preferDouble",
"bracePosition": "sameLine",
"singleBodyPosition": "sameLine",
"nextControlFlowPosition": "nextLine",
"doWhileStatement.nextControlFlowPosition": "sameLine",
"arrowFunction.useParentheses": "force",
"exportDeclaration.sortTypeOnlyExports": "first",
"importDeclaration.sortTypeOnlyImports": "first",
"exportDeclaration.forceMultiLine": "whenMultiple",
"importDeclaration.forceMultiLine": "whenMultiple",
},
// https://dprint.dev/plugins/json/config/
"json": {
// some files are treated as jsonc despite using json file extension. list them here
"jsonTrailingCommaFiles": [
"tsconfig.json",
".vscode/extensions.json",
".vscode/settings.json",
],
},
// https://dprint.dev/plugins/markdown/config/
"markdown": {
"emphasisKind": "asterisks",
},
// https://dprint.dev/plugins/toml/config/
"toml": {
},
// https://malva.netlify.app/
"malva": {
"ignoreCommentDirective": "dprint-ignore",
"ignoreFileCommentDirective": "dprint-ignore-file",
"operatorLinebreak": "before",
"trailingComma": true,
"formatComments": true,
},
// https://markup-fmt.netlify.app/
"markup": {
"ignoreCommentDirective": "dprint-ignore",
"ignoreFileCommentDirective": "dprint-ignore-file",
"formatComments": true,
"maxAttrsPerLine": 1,
"component.selfClosing": true,
"doctypeKeywordCase": "lower",
// vue (not using vue, but I want to have a config for all projects)
"vBindStyle": "short",
"vOnStyle": "short",
"vSlotStyle": "vSlot",
"vBindSameNameShortHand": false,
"vueComponentCase": "pascalCase",
// svelte
"svelteAttrShorthand": false,
"svelteDirectiveShorthand": false,
// other
"astroAttrShorthand": false,
"angularNextControlFlowSameLine": false,
},
// https://pretty-yaml.netlify.app/
"yaml": {
"ignoreCommentDirective": "dprint-ignore",
"formatComments": true,
},
// external formatters
"exec": {
// use rustfmt for rust files
"commands": [
{
"command": "rustfmt",
"exts": "rs",
"cacheKeyFiles": [
"rustfmt.toml",
"rust-toolchain.toml",
],
},
],
},
"excludes": [
"**/*-lock.json",
"**/*-lock.yaml",
"**/Cargo.lock",
"**/node_modules",
"**/target",
"**/dist/*",
"**/build/*",
"logs/*",
"**/.svelte-kit",
"**/*.txt",
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.95.13.wasm",
"https://plugins.dprint.dev/json-0.21.0.wasm",
"https://plugins.dprint.dev/markdown-0.20.0.wasm",
"https://plugins.dprint.dev/toml-0.7.0.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.25.3.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
"https://plugins.dprint.dev/exec-0.6.0.json@a054130d458f124f9b5c91484833828950723a5af3f8ff2bd1523bd47b83b364",
"https://plugins.dprint.dev/g-plane/malva-v0.15.1.wasm",
],
}