{
  "$id": "https://unpkg.com/@vuedx/projectconfig/schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "Project configuration for TS Plugin",
  "type": "object",
  "properties": {
    "globalComponents": {
      "description": "List of global components for type checking",
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "string",
            "description": "A file, a glob expression or a package name. NOTE: File must default export a Vue component and it should be included in 'tsconfig.json' or 'jsconfig.json'. Package must have either 'web-types' or 'vetur' fields on package.json"
          },
          {
            "type": "object",
            "patternProperties": {
              "^[A-Za-z][A-Za-z0-9-]*$": {
                "oneOf": [
                  {
                    "type": "string",
                    "description": "A relative file path or a package name. It must default export a Vue component."
                  },
                  {
                    "type": "object",
                    "properties": {
                      "moduleName": {
                        "type": "string",
                        "description": "A relative file path or a package name."
                      },
                      "exportName": {
                        "type": "string",
                        "description": "Named export identifier"
                      }
                    },
                    "additionalProperties": false,
                    "required": ["moduleName"]
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "preferences": {
      "type": "object",
      "description": "User preferences for the project",
      "properties": {
        "componentDirectories": {
          "type": "array",
          "description": "List of directories containing components. Used to provide option to 'extract to component' and other features.",
          "items": {
            "type": "string",
            "description": "Relative directory path"
          },
          "default": ["src/components/"]
        },
        "script": {
          "type": "object",
          "description": "Script block preferences",
          "properties": {
            "mode": {
              "description": "Preferred script block mode",
              "enum": ["setup", "setup-ref", "normal"],
              "default": "normal"
            },
            "language": {
              "description": "Preferred script block language",
              "enum": ["js", "ts"],
              "default": "js"
            }
          }
        },
        "style": {
          "type": "object",
          "description": "Style block preferences",
          "properties": {
            "language": {
              "description": "Preferred style block language",
              "enum": ["css", "scss", "sass", "styl", "stylus", "less"]
            }
          }
        },
        "template": {
          "type": "object",
          "description": "Template block preferences",
          "properties": {
            "directiveSyntax": {
              "description": "Preferred directive syntax",
              "enum": ["shorthand", "longhand"]
            },
            "propCase": {
              "description": "Preferred prop/attribute case",
              "enum": ["kebab", "camel"]
            },
            "tagCase": {
              "description": "Preferred tag/component case",
              "enum": ["kebab", "camel", "auto"]
            }
          }
        }
      }
    }
  }
}
