Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / babelrc.json
Schema registry

babelrc.json

Babel configuration file

.babelrc.babelrc.jsonbabel.config.json

Check your file against this schema

Opens the validator with this schema already loaded. Paste your .babelrc and it validates in your browser — nothing is uploaded.

Validate a .babelrc → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
astbooleanInclude the AST in the returned object
default: true
auxiliaryCommentAfterstringAttach a comment after all non-user injected code.
auxiliaryCommentBeforestringAttach a comment before all non-user injected code.
codebooleanEnable code generation
default: true
commentsbooleanOutput comments in generated output.
default: true
compactanyOfDo not include superfluous whitespace characters and line terminators. When set to "auto" compact is set to true on input sizes of >500KB.
default: "auto"
extendsstringA path to a .babelrc file to extend
filenamestringFilename for use in errors etc.
default: "unknown"
filenameRelativestringFilename relative to sourceRoot (defaults to "filename")
highlightCodebooleanANSI highlight syntax error code frames
ignoreanyOfOpposite of the "only" option
inputSourceMapanyOfIf 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.
default: true
keepModuleIdExtensionsbooleanKeep extensions in module ids
default: false
moduleIdstringSpecify a custom name for module ids.
moduleIdsstringIf truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for common modules)
default: false
moduleRootstringOptional prefix for the AMD module formatter that will be prepend to the filename on module definitions. (defaults to "sourceRoot")
onlyanyOfA 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.
pluginsarrayList of plugins to load and use
presetsarrayList of presets (a set of plugins) to load and use
retainLinesbooleanRetain 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.
default: false
sourceFileNamestringSet sources[0] on returned source map. (defaults to "filenameRelative")
sourceMapsanyOfIf 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
default: false
sourceMapTargetstringSet file on returned source map. (defaults to "filenameRelative")
sourceRootstringThe root from which all sources are relative. (defaults to "moduleRoot")
envobjectThis 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"
default: {}

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$idJSON Schema Core, draft 2020-12§8.2.1 — The "$id" Keyword
$refJSON Schema Core, draft 2020-12§8.2.3.1 — Direct References with "$ref"
$schemaJSON Schema Core, draft 2020-12§8.1.1 — "$schema"
additionalPropertiesJSON Schema Core, draft 2020-12§10.3.2.3 — "additionalProperties"
allOfJSON Schema Core, draft 2020-12§10.2.1.1 — "allOf"
anyOfJSON Schema Core, draft 2020-12§10.2.1.2 — "anyOf"
defaultJSON Schema Validation, draft 2020-12§9.2 — "default"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
minItemsJSON Schema Validation, draft 2020-12§6.4.2 — "minItems"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas