-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.dprint.jsonc
More file actions
141 lines (138 loc) · 5.06 KB
/
.dprint.jsonc
File metadata and controls
141 lines (138 loc) · 5.06 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// SPDX-License-Identifier: MIT
// Copyright 2026 Beslogic Inc.
//
// If using the `beslogic/json-like` preset with eslint-config-beslogic, use ".dprint-json-like.jsonc" instead.
{
// https://dprint.dev/config/#global-configuration
"lineWidth": 100,
"indentWidth": 2,
"newLineKind": "auto",
"useTabs": false,
// https://dprint.dev/plugins/typescript/config/
"typescript": {
"quoteStyle": "preferSingle",
"quoteProps": "asNeeded",
"semiColons": "asi",
"arrowFunction.useParentheses": "preferNone",
"binaryExpression.linePerExpression": true,
"typeLiteral.separatorKind": "comma",
"enumDeclaration.memberSpacing": "newLine",
"importDeclaration.forceSingleLine": true,
// Prevent unecessary wrapping on arrow-function assigned to props
// Also prevents adding parens inside ternaries and increasing indent
// https://github.com/dprint/dprint-plugin-typescript/issues/760
"jsx.multiLineParens": "never",
// One of the rare case where unconditional unwraping is what we want
"jsxAttributes.preferSingleLine": true,
// We were already wrapping single params in parens, and this is an upcoming global style guide change
// TODO: sync with eslint-config-beslogic
// "arrowFunction.useParentheses": "force",
// TODO: Consider this ! At least for string concatenation (test in DRL)
// "binaryExpression.linePerExpression": true,
// Not convinced yet
// "memberExpression.linePerExpression": true,
// conflict with simple-import-sort/imports
"module.sortImportDeclarations": "maintain",
"module.sortExportDeclarations": "maintain",
},
// https://dprint.dev/plugins/json/config/
"json": {
"associations": [
"*.json",
"*.jsonc",
"*.json5",
"*.nswag",
"*.dmw",
// Not including Power BI files as we're not expecting manual edits in those
],
// Request to allow globbing: https://github.com/dprint/dprint-plugin-json/issues/38
"jsonTrailingCommaFiles": [
".vscode/extensions.json",
".vscode/launch.json",
".vscode/settings.json",
".vscode/tasks.json",
"dprint.json",
"dprint-json-like.json",
".prettierrc.json5",
"jsconfig.json",
"pyrightconfig.json",
"tsconfig.app.json",
"tsconfig.base.json",
"tsconfig.editor.json",
"tsconfig.json",
"tsconfig.lib.json",
"tsconfig.prod.json",
"tsconfig.lib.prod.json",
"tsconfig.spec.json",
"typedoc.json",
// "launchsettings.json", // not supported until .NET 9 https://github.com/dotnet/sdk/issues/35558
// "appsettings.json", // For consistency, don't include until globbing is possible here
// "appsettings.*.json",
// nswag files generated with the client automatically removes trailing commas
],
},
"yaml": {
"printWidth": 100,
"ignoreCommentDirective": "dprint-ignore",
},
"malva": {
"printWidth": 100,
"hexColorLength": "long",
"operatorLinebreak": "before",
"trailingComma": true,
"formatComments": true,
"linebreakInPseudoParens": true,
"declarationOrder": "concentric",
"keyframeSelectorNotation": "keyword",
"selectorOverrideCommentDirective": "dprint-selector-override",
"ignoreCommentDirective": "dprint-ignore",
"ignoreFileCommentDirective": "dprint-ignore-file",
// Lowercase in hex is arguably more readable/accessible, even if it doesn't "feel" as clean
"hexCase": "lower",
},
"markup": {
"associations": [
"*.csproj",
"Directory.Build.props",
],
"printWidth": 100,
"formatComments": true,
"scriptIndent": true,
"styleIndent": true,
// TODO: Ask for a "selfClosing" shorthand
"component.selfClosing": true,
"svg.selfClosing": true,
"mathml.selfClosing": true,
// Self-closing tags on non-void elements aren't valid pure HTML. Let framework-specific linters handle them
"html.normal.selfClosing": false,
"html.void.selfClosing": true,
// Shorthand styles unspecified since we don't use Vue, Svelte or Astro
"strictSvelteAttr": true,
"ignoreCommentDirective": "dprint-ignore",
},
"plugins": [
"https://plugins.dprint.dev/typescript-0.93.0.wasm",
"https://plugins.dprint.dev/json-0.19.3.wasm",
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
"https://plugins.dprint.dev/toml-0.6.3.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm",
"https://plugins.dprint.dev/dockerfile-0.3.3.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.15.2.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.21.0.wasm",
],
"excludes": [
// dprint already exlcudes files in .gitignore, no need to add common ones here
// https://dprint.dev/config/#un-excluding-gitignored-files
"**/node_modules",
"**/storybook-static",
// Minified files aren't intended to be readable
"**/*.min.*",
// Autogenerated / handled by another program
"**/*[.-]lock.json",
"**/coverage", // created on install by nx
"**/.storybook/documentation.json",
// capacitor folders
"**/*/android/app",
"**/*/ios/App",
],
}