forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babelrc.json
170 lines (170 loc) · 6.2 KB
/
babelrc.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
{
"$schema": "http://json-schema.org/draft-04/schema#",
"allOf": [
{
"$ref": "#/definitions/Options"
},
{
"properties": {
"env": {
"description": "This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the environment variable BABEL_ENV is set to \"production\". If BABEL_ENV isn't set then NODE_ENV will be used, if it's not set then it defaults to \"development\"",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Options"
},
"default": {}
}
}
}
],
"definitions": {
"Options": {
"type": "object",
"properties": {
"ast": {
"description": "Include the AST in the returned object",
"type": "boolean",
"default": true
},
"auxiliaryCommentAfter": {
"description": "Attach a comment after all non-user injected code.",
"type": "string"
},
"auxiliaryCommentBefore": {
"description": "Attach a comment before all non-user injected code.",
"type": "string"
},
"code": {
"description": "Enable code generation",
"type": "boolean",
"default": true
},
"comments": {
"description": "Output comments in generated output.",
"type": "boolean",
"default": true
},
"compact": {
"description": "Do not include superfluous whitespace characters and line terminators. When set to \"auto\" compact is set to true on input sizes of >500KB.",
"type": ["string", "boolean"],
"enum": ["auto", true, false],
"default": "auto"
},
"extends": {
"description": "A path to a .babelrc file to extend",
"type": "string"
},
"filename": {
"description": "Filename for use in errors etc.",
"type": "string",
"default": "unknown"
},
"filenameRelative": {
"description": "Filename relative to sourceRoot (defaults to \"filename\")",
"type": "string"
},
"highlightCode": {
"description": "ANSI highlight syntax error code frames",
"type": "boolean"
},
"ignore": {
"description": "Opposite of the \"only\" option",
"type": ["string", "array"],
"items": {
"type": "string"
}
},
"inputSourceMap": {
"description": "If true, attempt to load an input sourcemap from the file itself. If an object is provided, it will be treated as the source map object itself.",
"type": ["boolean", "object"],
"default": true
},
"keepModuleIdExtensions": {
"description": "Keep extensions in module ids",
"type": "boolean",
"default": false
},
"moduleId": {
"description": "Specify a custom name for module ids.",
"type": "string"
},
"moduleIds": {
"description": "If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for common modules)",
"type": "string",
"default": false
},
"moduleRoot": {
"description": "Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. (defaults to \"sourceRoot\")",
"type": "string"
},
"only": {
"description": "A glob, regex, or mixed array of both, matching paths to only compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim.",
"type": ["string", "array"],
"items": {
"type": "string"
}
},
"plugins": {
"description": "List of plugins to load and use",
"type": "array",
"items": {
"type": ["string", "array"],
"items": [
{
"description": "The name of the plugin.",
"type": "string"
},
{
"description": "The options of the plugin.",
"type": "object"
}
]
}
},
"presets": {
"description": "List of presets (a set of plugins) to load and use",
"type": "array",
"items": {
"type": ["string", "array"],
"items": [
{
"description": "The name of the preset.",
"type": "string"
},
{
"description": "The options of the preset.",
"type": "object"
}
]
}
},
"retainLines": {
"default": false,
"description": "Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. NOTE: This will obviously not retain the columns.",
"type": "boolean"
},
"sourceFileName": {
"description": "Set sources[0] on returned source map. (defaults to \"filenameRelative\")",
"type": "string"
},
"sourceMaps": {
"default": false,
"description": "If truthy, adds a map property to returned output. If set to \"inline\", a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to \"both\" then a map property is returned as well as a source map comment appended.",
"type": ["string", "boolean"],
"enum": ["both", "inline", true, false]
},
"sourceMapTarget": {
"description": "Set file on returned source map. (defaults to \"filenameRelative\")",
"type": "string"
},
"sourceRoot": {
"description": "The root from which all sources are relative. (defaults to \"moduleRoot\")",
"type": "string"
}
}
}
},
"id": "https://json.schemastore.org/babelrc.json",
"title": "JSON schema for Babel 6+ configuration files",
"type": "object"
}