-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathoptions.js
More file actions
77 lines (75 loc) · 2.1 KB
/
options.js
File metadata and controls
77 lines (75 loc) · 2.1 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
const CATEGORY_GLOBAL = 'Global';
const CATEGORY_COMMON = 'Common';
const CATEGORY_JAVASCRIPT = 'JavaScript';
const CATEGORY_SOLIDITY = 'Solidity';
const options = {
printWidth: {
since: '0.0.0',
category: CATEGORY_GLOBAL,
type: 'int',
default: 80,
description: 'The line length where Prettier will try wrap.',
range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 }
},
tabWidth: {
type: 'int',
category: CATEGORY_GLOBAL,
default: 2,
description: 'Number of spaces per indentation level.',
range: { start: 0, end: Number.POSITIVE_INFINITY, step: 1 }
},
useTabs: {
since: '1.0.0',
category: CATEGORY_GLOBAL,
type: 'boolean',
default: false,
description: 'Indent with tabs instead of spaces.'
},
bracketSpacing: {
since: '0.0.0',
category: CATEGORY_COMMON,
type: 'boolean',
default: true,
description: 'Print spaces between brackets.',
oppositeDescription: 'Do not print spaces between brackets.'
},
singleQuote: {
since: '0.0.0',
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;