-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathoptions.ts
More file actions
54 lines (51 loc) · 1.5 KB
/
options.ts
File metadata and controls
54 lines (51 loc) · 1.5 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
import type { SupportOptions } from 'prettier';
const CATEGORY_COMMON = 'Common';
const CATEGORY_JAVASCRIPT = 'JavaScript';
const CATEGORY_SOLIDITY = 'Solidity';
const options: SupportOptions = {
bracketSpacing: {
category: CATEGORY_COMMON,
type: 'boolean',
default: true,
description: 'Print spaces between brackets.',
oppositeDescription: 'Do not print spaces between brackets.'
},
singleQuote: {
category: CATEGORY_COMMON,
type: 'boolean',
default: false,
description: 'Use single quotes instead of double quotes.'
},
experimentalTernaries: {
category: CATEGORY_JAVASCRIPT,
type: 'boolean',
default: false,
description:
'Use curious ternaries, with the question mark after the condition.',
oppositeDescription:
'Default behavior of ternaries; keep question marks on the same line as the consequent.'
},
experimentalOperatorPosition: {
category: CATEGORY_JAVASCRIPT,
type: 'choice',
default: 'end',
description: 'Where to print operators when binary expressions wrap lines.',
choices: [
{
value: 'start',
description: 'Print operators at the start of new lines.'
},
{
value: 'end',
description: 'Print operators at the end of previous lines.'
}
]
},
compiler: {
category: CATEGORY_SOLIDITY,
type: 'string',
description:
'The Solidity compiler version to help us avoid critical errors in format for the wrong version.'
}
};
export default options;