{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://dprint.dev/schemas/v0.json",
  "title": "dprint configuration file",
  "description": "Schema for a dprint configuration file.",
  "type": "object",
  "properties": {
    "incremental": {
      "description": "Whether to format files only when they change.",
      "type": "boolean",
      "default": true
    },
    "extends": {
      "description": "Configurations to extend.",
      "anyOf": [{
        "description": "A file path or url to a configuration file to extend.",
        "type": "string"
      }, {
        "description": "A collection of file paths and/or urls to configuration files to extend.",
        "type": "array",
        "items": {
          "type": "string"
        }
      }]
    },
    "lineWidth": {
      "description": "The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases.",
      "type": "number",
      "default": 120
    },
    "indentWidth": {
      "description": "The number of characters for an indent.",
      "type": "number",
      "default": 2
    },
    "useTabs": {
      "description": "Whether to use tabs (true) or spaces (false) for indentation.",
      "type": "boolean",
      "default": false
    },
    "newLineKind": {
      "description": "The kind of newline to use.",
      "type": "string",
      "oneOf": [
        {
          "const": "auto",
          "description": "For each file, uses the newline kind found at the end of the last line."
        },
        {
          "const": "crlf",
          "description": "Uses carriage return, line feed."
        },
        {
          "const": "lf",
          "description": "Uses line feed."
        },
        {
          "const": "system",
          "description": "Uses the system standard (ex. crlf on Windows)."
        }
      ]
    },
    "includes": {
      "description": "Array of patterns (globs) to use to find files to format.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "excludes": {
      "description": "Array of patterns (globs) to exclude files or directories to format.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "plugins": {
      "description": "Array of plugin URLs to format files.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": {
    "description": "Plugin configuration.",
    "type": "object"
  }
}
