{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.targapps.xyz/schemas/chroma/jsconfig.schema.json",
  "title": "Chroma app jsconfig",
  "description": "Editor IntelliSense config generated by chroma build when missing. Derived from ensure_jsconfig() in Chroma/cli/chroma.sh.",
  "type": "object",
  "additionalProperties": false,
  "required": ["compilerOptions", "include", "exclude"],
  "properties": {
    "$schema": { "type": "string", "format": "uri" },
    "compilerOptions": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "target",
        "module",
        "moduleResolution",
        "lib",
        "allowJs",
        "checkJs"
      ],
      "properties": {
        "target": {
          "type": "string",
          "const": "ES2022"
        },
        "module": {
          "type": "string",
          "const": "ESNext"
        },
        "moduleResolution": {
          "type": "string",
          "const": "bundler"
        },
        "lib": {
          "type": "array",
          "items": { "type": "string" },
          "contains": { "const": "ES2022" },
          "minItems": 3
        },
        "allowJs": {
          "type": "boolean",
          "const": true
        },
        "checkJs": {
          "type": "boolean",
          "const": false
        }
      }
    },
    "include": {
      "type": "array",
      "items": { "type": "string" },
      "contains": { "const": "**/*.js" },
      "minItems": 1
    },
    "exclude": {
      "type": "array",
      "items": { "type": "string" },
      "contains": { "const": "node_modules" },
      "minItems": 2
    }
  }
}
