{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/babelrc.json",
  "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": {
        "assumptions": {
          "description": "Assumptions that Babel can make in order to produce smaller output\nhttps://babeljs.io/docs/options#assumptions",
          "type": "object",
          "properties": {
            "arrayLikeIsIterable": {
              "type": "boolean"
            },
            "constantReexports": {
              "type": "boolean"
            },
            "constantSuper": {
              "type": "boolean"
            },
            "enumerableModuleMeta": {
              "type": "boolean"
            },
            "ignoreFunctionLength": {
              "type": "boolean"
            },
            "ignoreToPrimitiveHint": {
              "type": "boolean"
            },
            "iterableIsArray": {
              "type": "boolean"
            },
            "mutableTemplateObject": {
              "type": "boolean"
            },
            "noClassCalls": {
              "type": "boolean"
            },
            "noClassPrototypeAssign": {
              "type": "boolean"
            },
            "noConstructorPrimitiveReturn": {
              "type": "boolean"
            },
            "noDocumentAll": {
              "type": "boolean"
            },
            "noIncompleteNsImportDetection": {
              "type": "boolean"
            },
            "noNewArrows": {
              "type": "boolean"
            },
            "noUninitializedPrivateFieldAccess": {
              "type": "boolean"
            },
            "noUninitializedThis": {
              "type": "boolean"
            },
            "objectRestNoSymbols": {
              "type": "boolean"
            },
            "privateFieldsAsSymbols": {
              "type": "boolean"
            },
            "privateFieldsAsProperties": {
              "type": "boolean"
            },
            "pureGetters": {
              "type": "boolean"
            },
            "setClassMethods": {
              "type": "boolean"
            },
            "setComputedProperties": {
              "type": "boolean"
            },
            "setPublicClassFields": {
              "type": "boolean"
            },
            "setSpreadProperties": {
              "type": "boolean"
            },
            "skipForOfIteratorClosing": {
              "type": "boolean"
            },
            "superIsCallableConstructor": {
              "type": "boolean"
            }
          },
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "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"
        },
        "babelrc": {
          "description": "Whether to search for .babelrc.json files relative to the file being compiled. Only allowed in the root config file\nhttps://babeljs.io/docs/options#babelrc",
          "type": "boolean"
        },
        "babelrcRoots": {
          "description": "Packages that should be considered root packages when deciding whether to load their .babelrc.json files. Only allowed in the root config file\nhttps://babeljs.io/docs/options#babelrcroots",
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "browserslistConfigFile": {
          "description": "Whether to use browserslist config sources, or the path of a browserslist configuration file\nhttps://babeljs.io/docs/options#browserslistconfigfile",
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            }
          ]
        },
        "browserslistEnv": {
          "description": "The Browserslist environment to use\nhttps://babeljs.io/docs/options#browserslistenv",
          "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.",
          "anyOf": [
            {
              "const": "auto",
              "type": "string"
            },
            {
              "type": "boolean"
            }
          ],
          "default": "auto"
        },
        "exclude": {
          "description": "If any of these patterns match, the current configuration object is ignored\nhttps://babeljs.io/docs/options#exclude",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "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"
        },
        "generatorOpts": {
          "description": "An object containing the options to be passed down to the Babel code generator\nhttps://babeljs.io/docs/options#generatoropts",
          "type": "object"
        },
        "highlightCode": {
          "description": "ANSI highlight syntax error code frames",
          "type": "boolean"
        },
        "ignore": {
          "description": "Opposite of the \"only\" option",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "include": {
          "description": "A synonym for \"test\"\nhttps://babeljs.io/docs/options#include",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "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.",
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "object"
            }
          ],
          "default": true
        },
        "keepModuleIdExtensions": {
          "description": "Keep extensions in module ids",
          "type": "boolean",
          "default": false
        },
        "minified": {
          "description": "Like compact, but also omits block-end semicolons, () from new Foo() when possible, and may output shorter versions of literals\nhttps://babeljs.io/docs/options#minified",
          "type": "boolean"
        },
        "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.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        },
        "overrides": {
          "description": "An array of options that are merged into the current configuration one at a time, usually combined with test, include and exclude\nhttps://babeljs.io/docs/options#overrides",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Options"
          }
        },
        "parserOpts": {
          "description": "An object containing the options to be passed down to the Babel parser\nhttps://babeljs.io/docs/options#parseropts",
          "type": "object"
        },
        "passPerPreset": {
          "description": "Instructs Babel to run each of the presets in the presets array as an independent pass\nhttps://babeljs.io/docs/options#passperpreset",
          "type": "boolean"
        },
        "plugins": {
          "description": "List of plugins to load and use",
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": [
                  {
                    "description": "The name of the plugin.",
                    "type": "string"
                  },
                  {
                    "description": "The options of the plugin.",
                    "type": "object"
                  }
                ],
                "type": "array",
                "minItems": 2,
                "additionalItems": false
              }
            ]
          }
        },
        "presets": {
          "description": "List of presets (a set of plugins) to load and use",
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": [
                  {
                    "description": "The name of the preset.",
                    "type": "string"
                  },
                  {
                    "description": "The options of the preset.",
                    "type": "object"
                  }
                ],
                "minItems": 2,
                "additionalItems": false
              }
            ]
          }
        },
        "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.",
          "anyOf": [
            {
              "type": "string",
              "enum": ["both", "inline"]
            },
            {
              "type": "boolean"
            }
          ]
        },
        "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"
        },
        "sourceType": {
          "description": "Whether files are parsed as scripts, ES modules or CommonJS, or detected from their import/export statements\nhttps://babeljs.io/docs/options#sourcetype",
          "anyOf": [
            {
              "type": "string",
              "enum": ["module", "script", "commonjs", "unambiguous"]
            },
            {
              "type": "string"
            }
          ]
        },
        "targets": {
          "description": "The environments you support, as a browserslist query, a list of queries, or an object of minimum versions\nhttps://babeljs.io/docs/options#targets",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "object",
              "properties": {
                "browsers": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  ]
                },
                "esmodules": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "string",
                      "enum": ["intersect"]
                    }
                  ]
                },
                "node": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    },
                    {
                      "type": "boolean",
                      "enum": [true]
                    }
                  ]
                }
              },
              "additionalProperties": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "integer"
                  }
                ]
              }
            }
          ]
        },
        "test": {
          "description": "If all of these patterns fail to match, the current configuration object is ignored\nhttps://babeljs.io/docs/options#test",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        }
      }
    }
  },
  "title": "JSON schema for Babel 6+ configuration files",
  "type": "object"
}
