{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/producers/tool.clj-kondo.producer.ts",
          "name": "sectionsOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-clj-kondo-producer-ts",
            "json": "https://banes-lab.com/json/source/quality/core/producers/tool.clj-kondo.producer.ts",
            "label": "core/producers/tool.clj-kondo.producer.ts",
            "markdown": "https://banes-lab.com/source/quality/core/producers/tool.clj-kondo.producer.ts.md",
            "ref": "anatomy:file-quality-core-producers-tool-clj-kondo-producer-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 32,
      "name": "withMeta",
      "signature": "const withMeta = function withMeta(section: Section, line: string): Section {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/producers/tool.clj-kondo.producer.ts",
          "name": "withMeta",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-clj-kondo-producer-ts",
            "json": "https://banes-lab.com/json/source/quality/core/producers/tool.clj-kondo.producer.ts",
            "label": "core/producers/tool.clj-kondo.producer.ts",
            "markdown": "https://banes-lab.com/source/quality/core/producers/tool.clj-kondo.producer.ts.md",
            "ref": "anatomy:file-quality-core-producers-tool-clj-kondo-producer-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "sectionsOf",
      "signature": "const sectionsOf = function sectionsOf(lines: readonly string[]): Section[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "TOOL",
      "signature": "const TOOL = \"clj-kondo\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 7,
      "name": "VERSION",
      "signature": "const VERSION = \"master\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 8,
      "name": "SOURCE",
      "signature": "const SOURCE = \"https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/doc/linters.md\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 9,
      "name": "DOCS",
      "signature": "const DOCS = \"https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "HEADER_PREFIX",
      "signature": "const HEADER_PREFIX = \"### \";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "interface_declaration",
      "line": 12,
      "name": "Section",
      "signature": "interface Section {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "backtickAfter",
      "signature": "const backtickAfter = function backtickAfter(line: string, marker: string): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 21,
      "name": "open",
      "signature": "const open = at === -1 ? -1 : line.indexOf(\"`\", at + marker.length);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 22,
      "name": "close",
      "signature": "const close = open === -1 ? -1 : line.indexOf(\"`\", open + 1);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "afterMarker",
      "signature": "const afterMarker = function afterMarker(line: string, marker: string): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "at",
      "signature": "const at = line.indexOf(marker);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 28,
      "name": "rest",
      "signature": "const rest = at === -1 ? \"\" : line.slice(at + marker.length).trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 33,
      "name": "keyword",
      "signature": "const keyword = backtickAfter(line, \"*Keyword:*\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "description",
      "signature": "const description = afterMarker(line, \"*Description:*\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 35,
      "name": "level",
      "signature": "const level = backtickAfter(line, \"*Default level:*\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "sections",
      "signature": "const sections: Section[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "last",
      "signature": "const last = sections.pop();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "ruleOf",
      "signature": "const ruleOf = function ruleOf(section: Section): CatalogRule[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 60,
      "name": "{ description, keyword, level, title }",
      "signature": "const { description, keyword, level, title } = section;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 80,
      "name": "produce",
      "signature": "const produce = async function produce(): Promise<CatalogProduct[]> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 81,
      "name": "lines",
      "signature": "const lines = ((await remoteText(SOURCE)) ?? \"\").split(\"\\n\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 82,
      "name": "rules",
      "signature": "const rules = sectionsOf(lines).flatMap(ruleOf).toSorted(byRuleId);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-clj-kondo-producer-ts",
  "language": "typescript",
  "layer": "application",
  "name": "tool.clj-kondo.producer.ts",
  "path": "core/producers/tool.clj-kondo.producer.ts",
  "ref": "anatomy:file-quality-core-producers-tool-clj-kondo-producer-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-producers",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-producers",
          "label": "core/producers",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-producers.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-producers"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-producers",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-producers",
          "label": "core/producers",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-producers.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-producers"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "producer",
    "subject": "tool",
    "variant": "clj-kondo"
  },
  "stats": {
    "bytes": 3169,
    "callable": 6,
    "definitions": 24,
    "edges": 1,
    "exported": 0,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "entry": 1,
      "isolated": 22
    },
    "lines": {
      "blank": 9,
      "code": 77,
      "total": 86
    }
  },
  "summary": "77 lines of code and 24 definitions.",
  "text": "https://banes-lab.com/source/quality/core/producers/tool.clj-kondo.producer.ts.txt",
  "tree": "quality",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-detekt-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.detekt.producer.ts",
      "label": "core/producers/tool.detekt.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.detekt.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-detekt-producer-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-clippy-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.clippy.producer.ts",
      "label": "core/producers/tool.clippy.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.clippy.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-clippy-producer-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/quality/core/producers",
    "label": "core/producers",
    "markdown": "https://banes-lab.com/api/source/quality/core/producers.md",
    "ref": "api:source/quality/core/producers"
  }
}
