forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 3
/
prettier.config.cjs
51 lines (50 loc) · 1.12 KB
/
prettier.config.cjs
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
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
// Shared prettier configuration for use in across the fluid-framework repository.
// Individual packages may extend this and override rules as needed, though for consistent formatting, package-local
// overrides should be avoided unless absolutely necessary.
module.exports = {
printWidth: 100,
quoteProps: "consistent",
semi: true,
singleQuote: false,
tabWidth: 4,
trailingComma: "all",
useTabs: true,
overrides: [
{
files: "lerna.json",
options: {
printWidth: 50,
tabWidth: 2,
},
},
{
// Some JSON files are only ever used by JSON5-aware tools
files: ["tsconfig*.json", ".vscode/*.json"],
options: {
parser: "json5",
tabWidth: 2,
quoteProps: "preserve",
},
},
{
files: "*.json",
options: {
tabWidth: 2,
quoteProps: "preserve",
},
},
{
// YAML formatting should not use tabs, and use a 2-space indent instead
files: ["*.yaml", "*.yml"],
options: {
tabWidth: 2,
useTabs: false,
quoteProps: "preserve",
},
},
],
};