{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/lint-staged-lintstagedrc/latest.json",
  "x-lintel": {
    "source": "https://www.schemastore.org/lintstagedrc.schema.json",
    "sourceSha256": "72ceb1864e70c464f8c72822612ffe82f2d8527e8170759ff5ae1ae0e1dd14df",
    "fileMatch": [
      ".lintstagedrc",
      ".lintstagedrc.json",
      ".lintstagedrc.yaml",
      ".lintstagedrc.yml"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "anyOf": [
    {
      "$ref": "#/$defs/advancedConfig"
    },
    {
      "$ref": "#/$defs/basicConfig"
    }
  ],
  "$defs": {
    "$schemaProperty": {
      "type": "string"
    },
    "linter": {
      "type": [
        "string",
        "array"
      ]
    },
    "lintersMap": {
      "description": "keys (String) are glob patterns, values (Array<String> | String) are commands to execute.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/linter"
      }
    },
    "globOptions": {
      "description": "micromatch options to customize how glob patterns match files.",
      "type": "object",
      "properties": {
        "matchBase": {
          "type": "boolean",
          "default": true
        },
        "dot": {
          "type": "boolean",
          "default": true
        }
      },
      "additionalProperties": false
    },
    "advancedConfig": {
      "properties": {
        "$schema": {
          "$ref": "#/$defs/$schemaProperty"
        },
        "concurrent": {
          "description": "Controls if linters are run simultaneously for each glob pattern.",
          "type": "boolean",
          "default": true
        },
        "chunkSize": {
          "description": "Max allowed chunk size based on number of files for glob pattern. This option is only applicable on Windows based systems to avoid command length limitations",
          "type": "number",
          "minimum": 1
        },
        "globOptions": {
          "$ref": "#/$defs/globOptions",
          "description": "micromatch options to customize how glob patterns match files."
        },
        "linters": {
          "$ref": "#/$defs/lintersMap",
          "description": "keys (String) are glob patterns, values (Array<String> | String) are commands to execute."
        },
        "ignore": {
          "description": "array of glob patterns to entirely ignore from any task.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": "['**/docs/**/*.js']"
        },
        "subTaskConcurrency": {
          "description": "Controls concurrency for processing chunks generated for each linter. This option is only applicable on Windows. Execution is not concurrent by default.",
          "type": "integer",
          "minimum": 1,
          "default": 1
        },
        "renderer": {
          "enum": [
            "update",
            "verbose"
          ],
          "default": "update"
        },
        "relative": {
          "description": "If true it will give the relative path from your package.json directory to your linter arguments.",
          "type": "boolean",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "basicConfig": {
      "properties": {
        "$schema": {
          "$ref": "#/$defs/$schemaProperty"
        }
      },
      "propertyNames": {
        "not": {
          "enum": [
            "concurrent",
            "chunkSize",
            "globOptions",
            "linters",
            "ignore",
            "subTaskConcurrency",
            "renderer",
            "relative"
          ]
        }
      },
      "additionalProperties": {
        "$ref": "#/$defs/linter"
      },
      "type": "object"
    }
  }
}
