-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathoptions.ts
93 lines (91 loc) · 2.56 KB
/
options.ts
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
import type { SupportOption } from 'prettier'
import type { PrettierTaploOptions } from './types'
/**
* @see https://github.com/tamasfe/taplo/blob/848722f2c604de68535e5a3e0bb2a2c1d3c7dc74/crates/taplo/src/formatter/mod.rs#L150-L168
*/
export const prettierOptionsDefinitions = {
alignEntries: {
name: 'alignEntries',
type: 'boolean',
category: 'taplo',
default: false,
description: 'Align consecutive entries vertically.',
},
alignComments: {
name: 'alignComments',
type: 'boolean',
category: 'taplo',
default: true,
description:
'Align consecutive comments after entries and items vertically. This applies to comments that are after entries or array items.',
},
arrayAutoExpand: {
name: 'arrayAutoExpand',
type: 'boolean',
category: 'taplo',
default: true,
description:
'Expand arrays to multiple lines that exceed the maximum column width.',
},
arrayAutoCollapse: {
name: 'arrayAutoCollapse',
type: 'boolean',
category: 'taplo',
default: true,
description:
"Collapse arrays that don't exceed the maximum column width and don't contain comments.",
},
compactArrays: {
name: 'compactArrays',
type: 'boolean',
category: 'taplo',
default: true,
description: 'Omit white space padding from single-line arrays.',
},
compactInlineTables: {
name: 'compactInlineTables',
type: 'boolean',
category: 'taplo',
default: false,
description:
'Omit white space padding from the start and end of inline tables.',
},
compactEntries: {
name: 'compactEntries',
type: 'boolean',
category: 'taplo',
default: false,
description: 'Omit white space around `=`.',
},
indentTables: {
name: 'indentTables',
type: 'boolean',
category: 'taplo',
default: false,
description:
'Indent based on tables and arrays of tables and their subtables, subtables out of order are not indented.',
},
indentEntries: {
name: 'indentEntries',
type: 'boolean',
category: 'taplo',
default: false,
description: 'Indent entries under tables.',
},
reorderKeys: {
name: 'reorderKeys',
type: 'boolean',
category: 'taplo',
default: false,
description:
'Alphabetically reorder keys that are not separated by empty lines.',
},
allowedBlankLines: {
name: 'allowedBlankLines',
type: 'int',
category: 'taplo',
default: 1,
description:
'The maximum number of allowed blank lines between entries and tables.',
},
} satisfies Record<keyof PrettierTaploOptions, SupportOption>