{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/size-limit-configuration/latest.json",
  "title": "JSON Schema for configuration for size-limit",
  "x-lintel": {
    "source": "https://www.schemastore.org/size-limit.json",
    "sourceSha256": "79d8b0bdb240feed962c497fdad2749b178a040a9a200407e7f92b825a44d711",
    "fileMatch": [
      ".size-limit.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "array",
  "items": {
    "title": "Configuration Section",
    "allOf": [
      {
        "type": "object",
        "properties": {
          "path": {
            "oneOf": [
              {
                "title": "relative path to files",
                "type": "string",
                "pattern": "^/?([^/]+/)*[^/]+/?$",
                "default": ""
              },
              {
                "title": "relative paths to files",
                "type": "array",
                "items": {
                  "title": "Path or Glob Pattern",
                  "type": "string",
                  "pattern": "^/?([^/]+/)*[^/]+/?$",
                  "default": ""
                },
                "uniqueItems": true
              }
            ]
          },
          "import": {
            "title": "partial import to test tree-shaking",
            "oneOf": [
              {
                "type": "string",
                "default": ""
              },
              {
                "type": "object",
                "additionalProperties": false,
                "default": {},
                "patternProperties": {
                  "^/?([^/]+/)*[^/]+/?$": {
                    "type": "string",
                    "default": ""
                  }
                }
              }
            ],
            "default": ""
          },
          "limit": {
            "title": "size or time limit for files from the path option. It should be a string with a number and unit, separated by a space.",
            "type": "string",
            "pattern": "\\d+( ?(ms|s)|\\s*(B|kB|[MGTPEZY]i?B|KiB))",
            "default": ""
          },
          "name": {
            "title": "the name of the current section. It will only be useful if you have multiple sections.",
            "type": "string",
            "default": ""
          },
          "entry": {
            "title": "when using a custom webpack config, a webpack entry could be given. It could be a string or an array of strings. By default, the total size of all entry points will be checked.",
            "oneOf": [
              {
                "type": "string",
                "default": ""
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true,
                "default": []
              }
            ],
            "default": ""
          },
          "webpack": {
            "title": "with false it will disable webpack.",
            "type": "boolean",
            "default": false
          },
          "running": {
            "title": "with false it will disable calculating running time.",
            "type": "boolean",
            "default": true
          },
          "gzip": {
            "title": "with false it will disable gzip compression.",
            "type": "boolean",
            "default": true
          },
          "brotli": {
            "title": "with true it will use brotli compression and disable gzip compression.",
            "type": "boolean",
            "default": false
          },
          "ignore": {
            "type": "array",
            "items": {
              "title": "an array of files and dependencies to exclude from the project size calculation.",
              "type": "string",
              "pattern": "^/?([^/]+/)*[^/]+/?$"
            },
            "uniqueItems": true,
            "default": []
          }
        },
        "required": [
          "path"
        ],
        "default": {}
      },
      {
        "if": {
          "not": {
            "properties": {
              "webpack": {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            }
          }
        },
        "then": {
          "properties": {
            "config": {
              "title": "a path to a custom webpack config.",
              "type": "string",
              "pattern": "^/?([^/]+/)*[^/]+/?$",
              "default": "webpack.config.js"
            }
          }
        }
      }
    ]
  },
  "uniqueItems": true,
  "default": []
}
