-
Notifications
You must be signed in to change notification settings - Fork 178
/
beautifyrc.json
executable file
·292 lines (292 loc) · 9.88 KB
/
beautifyrc.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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
{
"title": "JSON schema for beautifyrc",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"CHJProperties": {
"type": "object",
"properties": {
"indent_size": {
"description": "Indent size. [JS,CSS,HTML]",
"type": "integer",
"default": 4
},
"indent_char": {
"description": "Indentation character. [JS,CSS,HTML]",
"type": "string",
"default": " ",
"maxLength": 1
},
"eol": {
"description": "Character(s) to use as line terminators. [JS,CSS,HTML]",
"type": "string",
"default": "\n"
},
"indent_with_tabs": {
"description": "Indent with tabs, overrides 'indent_size' and 'indent_char' [JS,CSS,HTML]",
"type": "boolean",
"default": false
},
"end_with_newline": {
"description": "Ensure newline at end of file. [JS,CSS,HTML]",
"type": "boolean",
"default": false
},
"preserve_newlines": {
"description": "Preserve line-breaks. [JS,CSS,HTML]",
"type": "boolean",
"default": true
}
}
},
"HJProperties": {
"type": "object",
"properties": {
"max_preserve_newlines": {
"description": "Number of line-breaks to be preserved in one chunk. [JS,HTML]",
"type": "integer",
"default": 10
},
"wrap_line_length": {
"description": "Wrap lines at next opportunity after N characters. [JS,HTML]",
"type": "integer",
"default": 0
}
}
},
"CProperties": {
"type": "object",
"properties": {
"selector_separator_newline": {
"description": "Add a newline between multiple selectors. [CSS]",
"type": "boolean",
"default": true
},
"newline_between_rules": {
"description": "Add a newline between CSS rules. [CSS]",
"type": "boolean",
"default": false
},
"space_around_selector_separator": {
"description": "(Deprecated: use space_around_combinator) [CSS]",
"type": "boolean",
"default": false
},
"space_around_combinator": {
"description": "Ensure space around selector separators (>+~). [CSS]",
"type": "boolean",
"default": false
}
}
},
"HProperties": {
"type": "object",
"properties": {
"void_elements": {
"description": "HTLM void elements - aka self-closing tags. [HTML]",
"type": "array",
"items": {
"type": "string"
},
"default": ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta",
"param", "source", "track", "wbr", "!doctype", "?xml", "?php", "?=", "basefont", "isindex"]
},
"inline": {
"description": "",
"type": "array",
"items": {
"type": "string"
},
"default": [
"a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite",
"code", "data", "datalist", "del", "dfn", "em", "embed", "i", "iframe", "img",
"input", "ins", "kbd", "keygen", "label", "map", "mark", "math", "meter", "noscript",
"object", "output", "progress", "q", "ruby", "s", "samp", "select", "small",
"span", "strong", "sub", "sup", "svg", "template", "textarea", "time", "u", "var",
"video", "wbr", "text",
"acronym", "address", "big", "dt", "ins", "strike", "tt"
]
},
"wrap_attributes": {
"description": "Wrap attributes to new lines. [HTML]",
"type": "string",
"default": "auto",
"enum": ["auto", "force", "force-aligned", "force-expand-multiline", "align-multiple", "preserve", "preserve-aligned"]
},
"wrap_attributes_indent_size": {
"description": "Indent wrapped attributes to after N characters. Defaults to 'indent_size'. [HTML]",
"type": "number"
},
"indent_inner_html": {
"description": "Indent <head> and <body> sections. [HTML]",
"type": "boolean",
"default": false
},
"indent_scripts": {
"description": "[keep|separate|normal] [HTML]",
"type": "string",
"default": "normal",
"enum": ["keep", "separate", "normal"]
},
"unformatted": {
"description": "List of tags that should not be reformatted. [HTML]",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"content_unformatted": {
"description": "List of tags whose content should not be reformatted. [HTML]",
"type": "array",
"items": {
"type": "string"
},
"default": ["pre", "textarea"]
},
"extra_liners": {
"description": "List of tags that should have an extra newline before them. [HTML]",
"type": "array",
"items": {
"type": "string"
},
"default": ["head", "body", "/html"]
},
"indent_body_inner_html": {
"description": "Indent elements within html <body> element. [HTML]",
"type": "boolean",
"default": true
},
"indent_head_inner_html": {
"description": "Indent elements within html <head> element. [HTML]",
"type": "boolean",
"default": true
},
"indent_handlebars": {
"description": "format and indent {{#foo}} and {{/foo}}. [HTML]",
"type": "boolean",
"default": false
}
}
},
"JProperties": {
"type": "object",
"properties": {
"brace_style": {
"description": "[collapse|expand|end-expand|none][,preserve-inline] [JS]",
"type": "string",
"default": "collapse",
"enum": ["collapse", "expand", "end-expand", "none", "collapse,preserve-inline", "expand,preserve-inline",
"end-expand,preserve-inline", "none,preserve-inline"]
},
"indent_level": {
"description": "Initial indentation level. [JS]",
"type": "integer",
"default": 0
},
"space_in_paren": {
"description": "Add padding spaces within parentheses, ie. f( a, b ). [JS]",
"type": "boolean",
"default": false
},
"space_in_empty_paren": {
"description": "Leave space in empty parentheses, ie. f( ). [JS]",
"type": "boolean",
"default": false
},
"jslint_happy": {
"description": "Enable jslint-stricter mode. (Forces 'space_after_anon_function') [JS]",
"type": "boolean",
"default": false
},
"space_after_anon_function": {
"description": "Add a space before an anonymous function's parens, ie. function (). [JS]",
"type": "boolean",
"default": false
},
"space_after_named_function": {
"description": "Add a space before a named function's parens, ie. function example (). [JS]",
"type": "boolean",
"default": false
},
"break_chained_methods": {
"description": "Break chained method calls across subsequent lines. [JS]",
"type": "boolean",
"default": false
},
"keep_array_indentation": {
"description": "Preserve array indentation. [JS]",
"type": "boolean",
"default": false
},
"keep_function_indentation": {
"description": "Preserve function indentation. [JS]",
"type": "boolean",
"default": false
},
"space_before_conditional": {
"description": "Ensure a space before conditional statement. [JS]",
"type": "boolean",
"default": true
},
"unescape_strings": {
"description": "Decode printable characters encoded in xNN notation. [JS]",
"type": "boolean",
"default": false
},
"comma_first": {
"description": "Put commas at the beginning of new line instead of end. [JS]",
"type": "boolean",
"default": false
},
"operator_position": {
"description": "Move operators to before or after a new line, or keep as is. [JS]",
"type": "string",
"enum": ["before-newline", "after-newline", "preserve-newline"],
"default": "before-newline"
},
"e4x": {
"description": "Pass E4X xml literals through untouched. [JS]",
"type": "boolean",
"default": false
},
"unindent_chained_methods": {
"description": "Unindent chained methods. [JS]",
"type": "boolean",
"default": false
}
}
}
},
"allOf": [
{ "$ref": "#/definitions/CHJProperties" },
{ "$ref": "#/definitions/HJProperties" },
{ "$ref": "#/definitions/CProperties" },
{ "$ref": "#/definitions/HProperties" },
{ "$ref": "#/definitions/JProperties" },
{
"properties": {
"css": {
"type": "object",
"allOf": [
{ "$ref": "#/definitions/CHJProperties" },
{ "$ref": "#/definitions/CProperties" }]
},
"js": {
"type": "object",
"allOf": [
{ "$ref": "#/definitions/CHJProperties" },
{ "$ref": "#/definitions/HJProperties" },
{ "$ref": "#/definitions/JProperties" }
]
},
"html": {
"type": "object",
"allOf": [
{ "$ref": "#/definitions/CHJProperties" },
{ "$ref": "#/definitions/HJProperties" },
{ "$ref": "#/definitions/HProperties" }]
}
}
}]
}