This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 95
/
config-schema.json
160 lines (160 loc) · 4.94 KB
/
config-schema.json
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
"silenceErrors": {
"title": "Silence Errors",
"description": "Don't show an error message if there is a problem formatting your code",
"type": "boolean",
"default": false,
"order": 1
},
"useEslint": {
"title": "ESlint Integration",
"description": "Use [prettier-eslint](https://github.com/prettier/prettier-eslint) to infer your prettier settings based on your eslint config. If we cannot infer a prettier setting from your eslint config (or if there is no eslint config in the current project), we will fallback to using your settings in the *Prettier Options* section.<br /><br />**Note:** If you enable *Format on Save*, we recommend disabling ESlint's auto-fix to prevent fixing your code twice.",
"type": "boolean",
"default": false,
"order": 2
},
"formatOnSaveOptions": {
"title": "Format on Save",
"order": 3,
"type": "object",
"properties": {
"enabled": {
"title": "Format Files on Save",
"description": "Automatically format entire file when saving.",
"type": "boolean",
"default": false,
"order": 1
},
"respectEslintignore": {
"title": "Ignore Files in .eslintignore",
"description": "Works regardless of whether ESlint integration is enabled or not.",
"type": "boolean",
"default": true,
"order": 2
},
"scopes": {
"title": "Scopes",
"description": "Use `Editor: Log Cursor Scope` to determine the scopes for a file.",
"type": "array",
"default": [
"source.js",
"source.jsx",
"source.js.jsx",
"source.babel",
"source.js-semantic",
"text.html.basic",
"text.html.vue"
],
"items": {
"type": "string"
},
"order": 3
},
"excludedGlobs": {
"title": "Exclude (list of globs)",
"description": "A list of file globs to exclude from formatting on save (takes precedence over scopes). Use commas to seperate each glob.",
"type": "array",
"default": [],
"order": 4
},
"whitelistedGlobs": {
"title": "Include (list of globs)",
"description": "A list of file globs to always format on save (takes precedence over scopes and excluded globs). Use commas to seperate each glob. NOTE: If there are globs in this list, files not matching the globs will not be formatted on save regardless of other options.",
"type": "array",
"default": [],
"order": 5
}
}
},
"prettierOptions": {
"type": "object",
"order": 4,
"properties": {
"singleQuote": {
"title": "Single Quotes",
"description": "Use single instead of double quotes.",
"type": "boolean",
"default": false,
"order": 1
},
"bracketSpacing": {
"title": "Bracket Spacing",
"description": "Print spaces inside of object literals.",
"type": "boolean",
"default": true,
"order": 2
},
"semi": {
"title": "Semicolons",
"description": "Add semicolons at the end of lines.",
"type": "boolean",
"default": true,
"order": 3
},
"useTabs": {
"title": "Use Tabs",
"description": "Use tabs instead of spaces.",
"type": "boolean",
"default": false,
"order": 4
},
"jsxBracketSameLine": {
"title": "JSX Bracket Same Line",
"description": "Put > on the same line in JSX.",
"type": "boolean",
"default": false,
"order": 5
},
"printWidth": {
"title": "Print Width",
"description": "Fit code within this line limit",
"type": "integer",
"default": 80,
"order": 6
},
"tabWidth": {
"title": "Tab Width",
"description": "Number of spaces to use per tab. Use 'auto' to use your editor's tab width setting.",
"type": "string",
"default": "auto",
"order": 7
},
"trailingComma": {
"title": "Trailing Comma",
"description": "Controls the printing of trailing commas wherever possible",
"type": "string",
"default": "none",
"enum": [
"none",
"es5",
"all"
],
"order": 8
},
"parser": {
"title": "Parser",
"description": "Use either the [flow](https://github.com/facebook/flow) or [babylon](https://github.com/babel/babylon) parser.",
"type": "string",
"default": "babylon",
"enum": [
"babylon",
"flow"
],
"order": 9
}
}
},
"prettierEslintOptions": {
"type": "object",
"order": 5,
"properties": {
"prettierLast": {
"title": "Run Prettier Last",
"description": "Run eslint => prettier (instead of prettier => eslint)",
"type": "boolean",
"default": false,
"order": 1
}
}
}
}