@geoql/doctor-core 0.1.0-alpha.0 → 0.2.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +347 -11
- package/dist/index.js +2049 -143
- package/dist/index.js.map +1 -1
- package/dist/load-DiK7Zv0B.js +447 -0
- package/dist/load-DiK7Zv0B.js.map +1 -0
- package/package.json +13 -5
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["resolvePath","check","vForHasKey","vIfVForPrecedence"],"sources":["../src/file-scan.ts","../src/merge-diagnostics.ts","../src/oxlint/diagnostic.ts","../src/oxlint/generate-config.ts","../src/oxlint/resolve-plugin.ts","../src/oxlint/spawn.ts","../src/oxlint/run.ts","../src/score.ts","../src/template/parse-sfc.ts","../src/template/directive-helpers.ts","../src/template/walk.ts","../src/template/rules/v-for-has-key.ts","../src/template/rules/v-if-v-for-precedence.ts","../src/template/rules/index.ts","../src/template/run.ts","../src/audit.ts","../src/config.ts","../src/reporters/json.ts","../src/reporters/text.ts","../src/reporters/index.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport { glob } from 'tinyglobby';\n\nexport interface ScanOptions {\n rootDir: string;\n include: string[];\n exclude: string[];\n}\n\nexport async function listSourceFiles(opts: ScanOptions): Promise<string[]> {\n const files = await glob(opts.include, {\n cwd: opts.rootDir,\n absolute: true,\n ignore: opts.exclude,\n onlyFiles: true,\n dot: false,\n });\n return files.map((f) => resolve(f)).sort();\n}\n","import type { Diagnostic } from './types.js';\n\nexport function mergeDiagnostics(...batches: Diagnostic[][]): Diagnostic[] {\n const seen = new Set<string>();\n const out: Diagnostic[] = [];\n for (const batch of batches) {\n for (const d of batch) {\n const key = `${d.file}|${d.line}|${d.column}|${d.ruleId}`;\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(d);\n }\n }\n out.sort((a, b) => {\n if (a.file !== b.file) return a.file < b.file ? -1 : 1;\n if (a.line !== b.line) return a.line - b.line;\n if (a.column !== b.column) return a.column - b.column;\n return a.ruleId < b.ruleId ? -1 : 1;\n });\n return out;\n}\n","import { resolve } from 'node:path';\nimport type { Diagnostic } from '../types.js';\nimport type { OxlintRawDiagnostic } from './types.js';\n\nconst OXLINT_CODE_PATTERN = /^([a-z0-9_-]+)\\(([a-z0-9_-]+)\\)$/i;\n\nexport function normalizeOxlintRuleId(raw: OxlintRawDiagnostic): string {\n if (raw.code) {\n const match = OXLINT_CODE_PATTERN.exec(raw.code);\n if (match) return `${match[1]}/${match[2]}`;\n return raw.code;\n }\n if (raw.rule) return raw.rule;\n return 'oxlint/unknown';\n}\n\nexport function toCanonicalDiagnostic(\n raw: OxlintRawDiagnostic,\n rootDir: string,\n): Diagnostic {\n const ruleId = normalizeOxlintRuleId(raw);\n const severity = raw.severity === 'warning' ? 'warning' : 'error';\n const primary = raw.labels?.[0]?.span;\n const line = primary?.line ?? raw.start_line ?? 1;\n const column = primary?.column ?? raw.start_column ?? 1;\n return {\n file: resolve(rootDir, raw.filename),\n line,\n column,\n endLine: raw.end_line,\n endColumn: raw.end_column,\n ruleId,\n severity,\n message: raw.message,\n source: 'oxlint',\n };\n}\n\nexport function toCanonicalDiagnostics(\n raws: OxlintRawDiagnostic[],\n rootDir: string,\n): Diagnostic[] {\n return raws.map((r) => toCanonicalDiagnostic(r, rootDir));\n}\n","import { writeFile, mkdtemp } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport type { Severity } from '../types.js';\n\nexport interface GenerateConfigInput {\n pluginPath: string;\n ruleOverrides?: Record<string, Severity | 'off'>;\n}\n\nconst DEFAULT_RULES: Record<string, Severity> = {\n 'vue/no-export-in-script-setup': 'error',\n 'vue/require-typed-ref': 'warning',\n 'vue-doctor/no-em-dash-in-string': 'warning',\n};\n\nfunction toOxlintSeverity(s: Severity | 'off'): 'error' | 'warn' | 'off' {\n if (s === 'warning') return 'warn';\n return s;\n}\n\nexport async function generateOxlintConfig(\n input: GenerateConfigInput,\n): Promise<string> {\n const dir = await mkdtemp(join(tmpdir(), 'geoql-doctor-'));\n const merged: Record<string, Severity> = { ...DEFAULT_RULES };\n if (input.ruleOverrides) {\n for (const [id, sev] of Object.entries(input.ruleOverrides)) {\n if (sev === 'off') delete merged[id];\n else merged[id] = sev;\n }\n }\n const rules: Record<string, 'error' | 'warn'> = {};\n for (const [id, sev] of Object.entries(merged)) {\n rules[id] = toOxlintSeverity(sev) as 'error' | 'warn';\n }\n const config = {\n $schema:\n 'https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json',\n plugins: ['vue'],\n jsPlugins: [input.pluginPath],\n rules,\n };\n const configPath = join(dir, '.oxlintrc.json');\n await writeFile(configPath, JSON.stringify(config, null, 2));\n return configPath;\n}\n","import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, resolve as resolvePath } from 'node:path';\nimport { fileURLToPath, pathToFileURL } from 'node:url';\n\nfunction readPkgMain(pkgJsonPath: string): string | undefined {\n try {\n const raw = readFileSync(pkgJsonPath, 'utf8');\n const pkg = JSON.parse(raw) as {\n exports?: {\n '.'?: { import?: string; default?: string };\n default?: string;\n };\n module?: string;\n main?: string;\n };\n const exp = pkg.exports?.['.'];\n if (exp?.import) return exp.import;\n if (exp?.default) return exp.default;\n if (pkg.module) return pkg.module;\n if (pkg.main) return pkg.main;\n return undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction lookUpwards(fromDir: string, relPath: string): string | undefined {\n let current = resolvePath(fromDir);\n // Bounded ascent: stop when dirname() returns the same value (filesystem root).\n while (true) {\n const candidate = resolvePath(current, relPath);\n if (existsSync(candidate)) return candidate;\n const parent = dirname(current);\n if (parent === current) return undefined;\n current = parent;\n }\n}\n\nexport function resolveVueDoctorPluginPath(fromDir: string): string {\n const pkgJson = lookUpwards(\n fromDir,\n 'node_modules/@geoql/oxlint-plugin-vue-doctor/package.json',\n );\n if (pkgJson) {\n const main = readPkgMain(pkgJson) ?? './dist/index.js';\n return resolvePath(dirname(pkgJson), main);\n }\n if (typeof import.meta.resolve === 'function') {\n try {\n const baseUrl = pathToFileURL(resolvePath(fromDir, 'package.json')).href;\n const resolved = import.meta.resolve(\n '@geoql/oxlint-plugin-vue-doctor',\n baseUrl,\n );\n return fileURLToPath(resolved);\n } catch {\n return throwResolveError(fromDir);\n }\n }\n return throwResolveError(fromDir);\n}\n\nfunction throwResolveError(fromDir: string): never {\n throw new Error(\n `Failed to resolve @geoql/oxlint-plugin-vue-doctor from ${fromDir}. Install it as a dependency of your project or use the bundled @geoql/vue-doctor CLI.`,\n );\n}\n\nexport function resolveOxlintBin(fromDir: string): string {\n const pkgJson = lookUpwards(fromDir, 'node_modules/oxlint/package.json');\n if (pkgJson) {\n return resolvePath(dirname(pkgJson), 'bin/oxlint');\n }\n throw new Error(\n `Failed to resolve oxlint from ${fromDir}. Install oxlint as a dependency of your project.`,\n );\n}\n","import { spawn } from 'node:child_process';\nimport type {\n OxlintRawDiagnostic,\n OxlintRunOptions,\n OxlintRunResult,\n} from './types.js';\n\nconst DEFAULT_TIMEOUT_MS = 60_000;\n\ninterface OxlintJsonReport {\n diagnostics?: OxlintRawDiagnostic[];\n}\n\nexport async function runOxlint(\n opts: OxlintRunOptions,\n): Promise<OxlintRunResult> {\n return new Promise<OxlintRunResult>((resolve, reject) => {\n const args = ['-c', opts.configPath, '--format', 'json', opts.targetPath];\n const child = spawn(opts.oxlintBin, args, {\n cwd: opts.rootDir,\n stdio: ['ignore', 'pipe', 'pipe'],\n });\n const stdoutChunks: Buffer[] = [];\n const stderrChunks: Buffer[] = [];\n let timer: NodeJS.Timeout | undefined;\n const timeoutMs = opts.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n if (timeoutMs > 0) {\n timer = setTimeout(() => {\n child.kill('SIGKILL');\n reject(new Error(`oxlint subprocess timed out after ${timeoutMs}ms`));\n }, timeoutMs);\n }\n child.stdout.on('data', (chunk: Buffer) => stdoutChunks.push(chunk));\n child.stderr.on('data', (chunk: Buffer) => stderrChunks.push(chunk));\n child.on('error', (err) => {\n if (timer) clearTimeout(timer);\n reject(err);\n });\n child.on('close', (exitCode) => {\n if (timer) clearTimeout(timer);\n const stdout = Buffer.concat(stdoutChunks).toString('utf8');\n const stderr = Buffer.concat(stderrChunks).toString('utf8');\n const diagnostics = parseOxlintJsonStream(stdout);\n resolve({ diagnostics, stderr, exitCode });\n });\n });\n}\n\nfunction parseOxlintJsonStream(stdout: string): OxlintRawDiagnostic[] {\n const trimmed = stdout.trim();\n if (!trimmed) return [];\n try {\n const parsed = JSON.parse(trimmed) as\n | OxlintJsonReport\n | OxlintRawDiagnostic[];\n if (Array.isArray(parsed)) return parsed;\n if (parsed.diagnostics) return parsed.diagnostics;\n } catch {\n return parseNdjson(trimmed);\n }\n return [];\n}\n\nfunction parseNdjson(text: string): OxlintRawDiagnostic[] {\n const out: OxlintRawDiagnostic[] = [];\n for (const line of text.split('\\n')) {\n const t = line.trim();\n if (!t) continue;\n try {\n const obj = JSON.parse(t) as OxlintRawDiagnostic;\n if (obj && typeof obj === 'object' && 'message' in obj) out.push(obj);\n } catch {\n // skip non-json line\n }\n }\n return out;\n}\n","import type { Diagnostic, Severity } from '../types.js';\nimport { toCanonicalDiagnostics } from './diagnostic.js';\nimport { generateOxlintConfig } from './generate-config.js';\nimport {\n resolveOxlintBin,\n resolveVueDoctorPluginPath,\n} from './resolve-plugin.js';\nimport { runOxlint } from './spawn.js';\n\nexport interface ScriptPassOptions {\n rootDir: string;\n targetPath: string;\n ruleOverrides?: Record<string, Severity | 'off'>;\n timeoutMs?: number;\n}\n\nexport interface ScriptPassResult {\n diagnostics: Diagnostic[];\n stderr: string;\n exitCode: number | null;\n}\n\nexport async function runScriptPass(\n opts: ScriptPassOptions,\n): Promise<ScriptPassResult> {\n const pluginPath = resolveVueDoctorPluginPath(opts.rootDir);\n const oxlintBin = resolveOxlintBin(opts.rootDir);\n const configPath = await generateOxlintConfig({\n pluginPath,\n ruleOverrides: opts.ruleOverrides,\n });\n const raw = await runOxlint({\n rootDir: opts.rootDir,\n targetPath: opts.targetPath,\n configPath,\n oxlintBin,\n timeoutMs: opts.timeoutMs,\n });\n return {\n diagnostics: toCanonicalDiagnostics(raw.diagnostics, opts.rootDir),\n stderr: raw.stderr,\n exitCode: raw.exitCode,\n };\n}\n","import type { Diagnostic } from './types.js';\n\nconst ERROR_PENALTY = 10;\nconst WARNING_PENALTY = 2;\n\nexport interface ScoreBreakdown {\n score: number;\n errorCount: number;\n warningCount: number;\n}\n\nexport function scoreDiagnostics(diagnostics: Diagnostic[]): ScoreBreakdown {\n let errorCount = 0;\n let warningCount = 0;\n for (const d of diagnostics) {\n if (d.severity === 'error') errorCount += 1;\n else warningCount += 1;\n }\n const penalty = errorCount * ERROR_PENALTY + warningCount * WARNING_PENALTY;\n const score = Math.max(0, 100 - penalty);\n return { score, errorCount, warningCount };\n}\n","import { readFile } from 'node:fs/promises';\nimport { parse, type SFCDescriptor } from '@vue/compiler-sfc';\n\nconst cache = new Map<string, SFCDescriptor | null>();\n\nexport async function parseSfc(absPath: string): Promise<SFCDescriptor | null> {\n if (cache.has(absPath)) return cache.get(absPath) ?? null;\n let source: string;\n try {\n source = await readFile(absPath, 'utf8');\n } catch {\n cache.set(absPath, null);\n return null;\n }\n const { descriptor, errors } = parse(source, { filename: absPath });\n if (errors.length > 0 || !descriptor.template) {\n cache.set(absPath, null);\n return null;\n }\n cache.set(absPath, descriptor);\n return descriptor;\n}\n\nexport function clearSfcCache(): void {\n cache.clear();\n}\n","import type {\n AttributeNode,\n DirectiveNode,\n ElementNode,\n} from '@vue/compiler-core';\n\nconst NODE_DIRECTIVE = 7;\n\nexport function findDirective(\n el: ElementNode,\n name: string,\n): DirectiveNode | undefined {\n for (const prop of el.props) {\n if (prop.type === NODE_DIRECTIVE && prop.name === name)\n return prop as DirectiveNode;\n }\n return undefined;\n}\n\nexport function findBindAttr(\n el: ElementNode,\n attrName: string,\n): DirectiveNode | undefined {\n for (const prop of el.props) {\n if (prop.type !== NODE_DIRECTIVE) continue;\n const dir = prop as DirectiveNode;\n if (dir.name !== 'bind') continue;\n const arg = dir.arg as { content?: string } | undefined;\n if (arg?.content === attrName) return dir;\n }\n return undefined;\n}\n\nexport function findStaticAttr(\n el: ElementNode,\n attrName: string,\n): AttributeNode | undefined {\n for (const prop of el.props) {\n if (prop.type === 6 && (prop as AttributeNode).name === attrName) {\n return prop as AttributeNode;\n }\n }\n return undefined;\n}\n","import type {\n ElementNode,\n RootNode,\n TemplateChildNode,\n} from '@vue/compiler-core';\n\nconst NODE_ELEMENT = 1;\n\nexport function isElementNode(\n node: { type: number } | undefined | null,\n): node is ElementNode {\n return node !== null && node !== undefined && node.type === NODE_ELEMENT;\n}\n\nexport type ElementVisitor = (node: ElementNode) => void;\n\nexport function walkElements(root: RootNode, visit: ElementVisitor): void {\n const stack: TemplateChildNode[] = [...root.children];\n while (stack.length > 0) {\n const node = stack.pop();\n if (!node) continue;\n if (isElementNode(node)) {\n visit(node);\n if (node.children) {\n for (const child of node.children) stack.push(child);\n }\n }\n }\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport {\n findBindAttr,\n findDirective,\n findStaticAttr,\n} from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n const vFor = findDirective(el, 'for');\n if (!vFor) return;\n const hasKey = findBindAttr(el, 'key') ?? findStaticAttr(el, 'key');\n if (hasKey) return;\n diagnostics.push({\n file: ctx.file,\n line: el.loc.start.line,\n column: el.loc.start.column,\n endLine: el.loc.end.line,\n endColumn: el.loc.end.column,\n ruleId: 'vue-doctor/template/v-for-has-key',\n severity: 'error',\n message: `<${el.tag}> uses v-for without :key. Vue cannot efficiently diff this list across renders.`,\n source: 'template',\n recommendation:\n 'Add :key with a stable, unique identifier from the iterated item.',\n });\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { findDirective } from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n const vIf = findDirective(el, 'if');\n const vFor = findDirective(el, 'for');\n if (!vIf || !vFor) return;\n diagnostics.push({\n file: ctx.file,\n line: el.loc.start.line,\n column: el.loc.start.column,\n endLine: el.loc.end.line,\n endColumn: el.loc.end.column,\n ruleId: 'vue-doctor/template/v-if-v-for-precedence',\n severity: 'error',\n message: `<${el.tag}> uses v-if and v-for on the same element. In Vue 3, v-if binds tighter than v-for, so the condition cannot reference loop variables.`,\n source: 'template',\n recommendation:\n 'Move the v-if to a <template v-for> wrapper or to a parent element, or filter the iterated source in a computed.',\n });\n });\n return { diagnostics };\n}\n","import { check as vForHasKey } from './v-for-has-key.js';\nimport { check as vIfVForPrecedence } from './v-if-v-for-precedence.js';\nimport type { TemplateRule } from './types.js';\n\nexport const TEMPLATE_RULES: TemplateRule[] = [\n { id: 'vue-doctor/template/v-for-has-key', check: vForHasKey },\n { id: 'vue-doctor/template/v-if-v-for-precedence', check: vIfVForPrecedence },\n];\n","import type { Diagnostic, Severity } from '../types.js';\nimport { parseSfc } from './parse-sfc.js';\nimport { TEMPLATE_RULES } from './rules/index.js';\n\nexport interface TemplatePassOptions {\n files: string[];\n ruleOverrides?: Record<string, Severity | 'off'>;\n}\n\nexport async function runTemplatePass(\n opts: TemplatePassOptions,\n): Promise<Diagnostic[]> {\n const all: Diagnostic[] = [];\n for (const file of opts.files) {\n if (!file.endsWith('.vue')) continue;\n const descriptor = await parseSfc(file);\n if (!descriptor?.template?.ast) continue;\n for (const rule of TEMPLATE_RULES) {\n const override = opts.ruleOverrides?.[rule.id];\n if (override === 'off') continue;\n const { diagnostics } = rule.check({\n file,\n template: descriptor.template.ast,\n });\n for (const d of diagnostics) {\n all.push(override ? { ...d, severity: override } : d);\n }\n }\n }\n return all;\n}\n","import { resolve } from 'node:path';\nimport { listSourceFiles } from './file-scan.js';\nimport { mergeDiagnostics } from './merge-diagnostics.js';\nimport { runScriptPass } from './oxlint/run.js';\nimport { scoreDiagnostics } from './score.js';\nimport { runTemplatePass } from './template/run.js';\nimport type { AuditConfig, AuditReport, Diagnostic } from './types.js';\n\nconst DEFAULT_INCLUDE = [\n '**/*.vue',\n '**/*.ts',\n '**/*.tsx',\n '**/*.js',\n '**/*.jsx',\n];\nconst DEFAULT_EXCLUDE = [\n 'node_modules',\n 'dist',\n '.nuxt',\n '.output',\n 'coverage',\n];\n\nexport async function audit(config: AuditConfig = {}): Promise<AuditReport> {\n const rootDir = resolve(config.rootDir ?? process.cwd());\n const include = config.include ?? DEFAULT_INCLUDE;\n const exclude = config.exclude ?? DEFAULT_EXCLUDE;\n const failOn = config.failOn ?? 'error';\n\n const files = await listSourceFiles({ rootDir, include, exclude });\n\n const templateDiagnostics = await runTemplatePass({\n files,\n ruleOverrides: config.rules,\n });\n\n let scriptDiagnostics: Diagnostic[] = [];\n let oxlintStderr = '';\n try {\n const result = await runScriptPass({\n rootDir,\n targetPath: rootDir,\n ruleOverrides: config.rules,\n });\n scriptDiagnostics = result.diagnostics;\n oxlintStderr = result.stderr;\n } catch (err) {\n oxlintStderr = err instanceof Error ? err.message : String(err);\n if (process.env.DOCTOR_DEBUG) {\n process.stderr.write(\n `[doctor-core] script pass failed: ${oxlintStderr}\\n`,\n );\n }\n }\n\n const merged = mergeDiagnostics(templateDiagnostics, scriptDiagnostics);\n const { score, errorCount, warningCount } = scoreDiagnostics(merged);\n\n let exitCode: 0 | 1 | 2 = 0;\n if (\n oxlintStderr &&\n scriptDiagnostics.length === 0 &&\n oxlintStderr.includes('Failed')\n ) {\n exitCode = 2;\n } else {\n const tripping =\n failOn === 'warning' ? errorCount + warningCount : errorCount;\n if (tripping > 0) exitCode = 1;\n }\n\n return {\n rootDir,\n filesScanned: files.length,\n diagnostics: merged,\n score,\n errorCount,\n warningCount,\n exitCode,\n };\n}\n","import { loadConfig } from 'c12';\nimport type { AuditConfig } from './types.js';\n\nconst DEFAULTS: Required<Pick<AuditConfig, 'include' | 'exclude' | 'failOn'>> =\n {\n include: ['**/*.vue', '**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],\n exclude: ['node_modules', 'dist', '.nuxt', '.output', 'coverage'],\n failOn: 'error',\n };\n\nexport interface LoadedConfig {\n config: AuditConfig;\n configFile?: string;\n}\n\nexport async function loadAuditConfig(\n rootDir: string,\n explicitPath?: string,\n): Promise<LoadedConfig> {\n const { config, configFile } = await loadConfig<AuditConfig>({\n cwd: rootDir,\n name: 'doctor',\n configFile: explicitPath,\n defaults: DEFAULTS as AuditConfig,\n });\n return { config: { rootDir, ...config }, configFile };\n}\n","import type { AuditReport } from '../types.js';\n\nexport function formatJson(report: AuditReport): string {\n return JSON.stringify(report, null, 2);\n}\n","import { relative } from 'node:path';\nimport * as c from 'kolorist';\nimport type { AuditReport } from '../types.js';\n\nexport function formatText(report: AuditReport): string {\n const lines: string[] = [];\n const groups = new Map<string, AuditReport['diagnostics']>();\n for (const d of report.diagnostics) {\n const arr = groups.get(d.file) ?? [];\n arr.push(d);\n groups.set(d.file, arr);\n }\n for (const [file, diags] of groups) {\n const rel = relative(report.rootDir, file) || file;\n lines.push(c.underline(c.bold(rel)));\n for (const d of diags) {\n const sev = d.severity === 'error' ? c.red('error') : c.yellow('warning');\n const loc = c.dim(`${d.line}:${d.column}`);\n const rule = c.dim(`(${d.ruleId})`);\n lines.push(` ${loc} ${sev} ${d.message} ${rule}`);\n if (d.recommendation)\n lines.push(` ${c.dim('hint:')} ${d.recommendation}`);\n }\n lines.push('');\n }\n const summary = `${report.errorCount} error${report.errorCount === 1 ? '' : 's'}, ${report.warningCount} warning${report.warningCount === 1 ? '' : 's'} in ${report.filesScanned} file${report.filesScanned === 1 ? '' : 's'}`;\n const scoreLine = `Score: ${c.bold(String(report.score))}/100`;\n lines.push(summary);\n lines.push(scoreLine);\n return lines.join('\\n');\n}\n","import type { AuditReport } from '../types.js';\nimport { formatJson } from './json.js';\nimport { formatText } from './text.js';\n\nexport type ReporterFormat = 'text' | 'json';\n\nexport function format(report: AuditReport, kind: ReporterFormat): string {\n if (kind === 'json') return formatJson(report);\n return formatText(report);\n}\n"],"mappings":";;;;;;;;;;;AASA,eAAsB,gBAAgB,MAAsC;CAQ1E,QAAO,MAPa,KAAK,KAAK,SAAS;EACrC,KAAK,KAAK;EACV,UAAU;EACV,QAAQ,KAAK;EACb,WAAW;EACX,KAAK;EACN,CAAC,EACW,KAAK,MAAM,QAAQ,EAAE,CAAC,CAAC,MAAM;;;;ACf5C,SAAgB,iBAAiB,GAAG,SAAuC;CACzE,MAAM,uBAAO,IAAI,KAAa;CAC9B,MAAM,MAAoB,EAAE;CAC5B,KAAK,MAAM,SAAS,SAClB,KAAK,MAAM,KAAK,OAAO;EACrB,MAAM,MAAM,GAAG,EAAE,KAAK,GAAG,EAAE,KAAK,GAAG,EAAE,OAAO,GAAG,EAAE;EACjD,IAAI,KAAK,IAAI,IAAI,EAAE;EACnB,KAAK,IAAI,IAAI;EACb,IAAI,KAAK,EAAE;;CAGf,IAAI,MAAM,GAAG,MAAM;EACjB,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK;EACrD,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,OAAO,EAAE;EACzC,IAAI,EAAE,WAAW,EAAE,QAAQ,OAAO,EAAE,SAAS,EAAE;EAC/C,OAAO,EAAE,SAAS,EAAE,SAAS,KAAK;GAClC;CACF,OAAO;;;;ACfT,MAAM,sBAAsB;AAE5B,SAAgB,sBAAsB,KAAkC;CACtE,IAAI,IAAI,MAAM;EACZ,MAAM,QAAQ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,eAAe,IAAI,KAAK,IAAI,IAAI,OAAO,aAAa,UAAU,OAAO,iBAAiB,IAAI,KAAK,IAAI,MAAM,OAAO,aAAa,OAAO,OAAO,iBAAiB,IAAI,KAAK;CACzN,MAAM,YAAY,UAAU,EAAE,KAAK,OAAO,OAAO,MAAM,CAAC,CAAC;CACzD,MAAM,KAAK,QAAQ;CACnB,MAAM,KAAK,UAAU;CACrB,OAAO,MAAM,KAAK,KAAK;;;;ACvBzB,SAAgB,OAAO,QAAqB,MAA8B;CACxE,IAAI,SAAS,QAAQ,OAAO,WAAW,OAAO;CAC9C,OAAO,WAAW,OAAO"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["RULE_ID","DOCS","RULE_ID","DOCS","RULE_ID","DOCS","RULE_ID","RULE_ID","RULE_ID","resolvePath","cache","check","noMixedOptionsAndCompositionApi","NODE_DIRECTIVE","NODE_ELEMENT","check","check","check","NODE_DIRECTIVE","checkElement","check","NODE_ELEMENT","NODE_DIRECTIVE","checkElement","check","vForHasKey","vIfVForPrecedence","vMemoOnLargeList","noInlineObjectPropInList","noComputedGetterInTemplateLoop","avoidDeepVBindSpreadInList","relativize","process"],"sources":["../src/annotations.ts","../src/project-info/read-package-json.ts","../src/build-quality/read-deps.ts","../src/build-quality/check-eslint-plugin-vue.ts","../src/build-quality/check-no-vue-cli.ts","../src/build-quality/strip-json-comments.ts","../src/build-quality/check-tsconfig-strict.ts","../src/build-quality/check-vue-tsc.ts","../src/check-build-quality.ts","../src/dead-code/build-knip-config.ts","../src/dead-code/dedupe.ts","../src/dead-code/errors.ts","../src/dead-code/map-knip-diagnostic.ts","../src/check-dead-code.ts","../src/deps/exec-list.ts","../src/deps/list-vue-resolutions.ts","../src/deps/check-duplicate-vue.ts","../src/deps/check-vue-major-current.ts","../src/check-deps.ts","../src/disables/parse-directives.ts","../src/disables/apply.ts","../src/code-snippet.ts","../src/project-info/path-exists.ts","../src/project-info/find-monorepo-root.ts","../src/project-info/parse-nuxt-config.ts","../src/project-info/resolve-dep-version.ts","../src/project-info/parse-nuxt-version.ts","../src/project-info/parse-vue-version.ts","../src/detect-project.ts","../src/file-scan.ts","../src/merge-diagnostics.ts","../src/oxlint/diagnostic.ts","../src/oxlint/generate-config.ts","../src/oxlint/resolve-plugin.ts","../src/oxlint/errors.ts","../src/oxlint/spawn.ts","../src/oxlint/run.ts","../src/score.ts","../src/sfc/parse-sfc-descriptor.ts","../src/sfc/rules/no-mixed-options-and-composition-api.ts","../src/sfc/rules/index.ts","../src/sfc/run.ts","../src/template/parse-sfc.ts","../src/template/directive-helpers.ts","../src/template/walk.ts","../src/template/rules/v-for-has-key.ts","../src/template/rules/v-if-v-for-precedence.ts","../src/template/rules/v-memo-on-large-list.ts","../src/template/rules/no-inline-object-prop-in-list.ts","../src/template/rules/no-computed-getter-in-template-loop.ts","../src/template/rules/avoid-deep-v-bind-spread-in-list.ts","../src/template/rules/index.ts","../src/template/run.ts","../src/audit.ts","../src/config/define-config.ts","../src/config/merge-cli-overrides.ts","../src/git-scope.ts","../src/reporters/docs-url.ts","../src/reporters/render.ts","../src/reporters/agent.ts","../src/rule-docs.ts","../src/reporters/sarif.ts","../src/reporters/html.ts","../src/reporters/json.ts","../src/reporters/json-compact.ts","../src/reporters/pretty.ts","../src/reporters/verbose.ts","../src/reporters/index.ts"],"sourcesContent":["import type { Diagnostic } from './types.js';\n\nfunction escapeProperty(value: string): string {\n return value\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n\nfunction escapeData(value: string): string {\n return value.replace(/%/g, '%25').replace(/\\r/g, '%0D').replace(/\\n/g, '%0A');\n}\n\nexport function encodeAnnotation(diagnostic: Diagnostic): string {\n const level = diagnostic.severity === 'error' ? 'error' : 'warning';\n const props = [\n `file=${escapeProperty(diagnostic.file)}`,\n `line=${diagnostic.line}`,\n `col=${diagnostic.column}`,\n `title=${escapeProperty(diagnostic.ruleId)}`,\n ].join(',');\n return `::${level} ${props}::${escapeData(diagnostic.message)}`;\n}\n\nexport function encodeAnnotations(diagnostics: Diagnostic[]): string {\n return diagnostics.map(encodeAnnotation).join('\\n');\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nexport interface PackageJson {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n workspaces?: string[] | { packages?: string[] };\n engines?: Record<string, string>;\n}\n\nexport async function readPackageJson(\n dir: string,\n): Promise<PackageJson | null> {\n try {\n const source = await readFile(join(dir, 'package.json'), 'utf8');\n return JSON.parse(source) as PackageJson;\n } catch {\n return null;\n }\n}\n","import { dirname } from 'node:path';\nimport { readPackageJson } from '../project-info/read-package-json.js';\n\nexport interface PackageDeps {\n dependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n}\n\nexport async function readDeps(\n packageJsonPath: string,\n): Promise<PackageDeps | null> {\n const pkg = await readPackageJson(dirname(packageJsonPath));\n if (pkg === null) return null;\n return {\n dependencies: pkg.dependencies ?? {},\n devDependencies: pkg.devDependencies ?? {},\n };\n}\n","import type { ProjectInfo } from '../types/project-info.js';\nimport type { BuildQualityIssue } from './types.js';\nimport { readDeps } from './read-deps.js';\n\nconst RULE_ID = 'vue-doctor/build-quality/eslint-plugin-vue-installed';\nconst DOCS = 'https://eslint.vuejs.org/';\n\nexport async function checkEslintPluginVue(\n projectInfo: ProjectInfo,\n): Promise<BuildQualityIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.framework !== 'vue' && projectInfo.framework !== 'nuxt') {\n return [];\n }\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n if (deps.devDependencies['eslint-plugin-vue']) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'info',\n message: `eslint-plugin-vue is not in devDependencies; it catches many Vue-specific issues. See ${DOCS}`,\n recommendation: 'Add eslint-plugin-vue to devDependencies.',\n },\n ];\n}\n","import type { ProjectInfo } from '../types/project-info.js';\nimport type { BuildQualityIssue } from './types.js';\nimport { readDeps } from './read-deps.js';\n\nconst RULE_ID = 'vue-doctor/build-quality/no-vue-cli';\nconst DOCS = 'https://cli.vuejs.org/migrations/migrate-from-v4.html';\n\nfunction isOffendingKey(key: string): boolean {\n return key === '@vue/cli-service' || key.startsWith('vue-cli-plugin-');\n}\n\nexport async function checkNoVueCli(\n projectInfo: ProjectInfo,\n): Promise<BuildQualityIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n\n const offenders: string[] = [];\n for (const key of [\n ...Object.keys(deps.dependencies),\n ...Object.keys(deps.devDependencies),\n ]) {\n if (isOffendingKey(key) && !offenders.includes(key)) offenders.push(key);\n }\n\n return offenders.map((key, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'warn',\n message: `${key} indicates Vue CLI, which is deprecated; migrate to Vite. See ${DOCS}`,\n recommendation: `Remove ${key} and migrate the build to Vite.`,\n }));\n}\n","export function stripJsonComments(input: string): string {\n let out = '';\n let inString = false;\n let inLineComment = false;\n let inBlockComment = false;\n let escaped = false;\n\n for (let i = 0; i < input.length; i++) {\n const char = input[i];\n const next = input[i + 1];\n\n if (inLineComment) {\n if (char === '\\n') {\n inLineComment = false;\n out += char;\n }\n continue;\n }\n\n if (inBlockComment) {\n if (char === '*' && next === '/') {\n inBlockComment = false;\n i++;\n }\n continue;\n }\n\n if (inString) {\n out += char;\n if (escaped) {\n escaped = false;\n } else if (char === '\\\\') {\n escaped = true;\n } else if (char === '\"') {\n inString = false;\n }\n continue;\n }\n\n if (char === '\"') {\n inString = true;\n out += char;\n continue;\n }\n\n if (char === '/' && next === '/') {\n inLineComment = true;\n i++;\n continue;\n }\n\n if (char === '/' && next === '*') {\n inBlockComment = true;\n i++;\n continue;\n }\n\n out += char;\n }\n\n return out;\n}\n","import { readFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport type { ProjectInfo } from '../types/project-info.js';\nimport type { BuildQualityIssue } from './types.js';\nimport { stripJsonComments } from './strip-json-comments.js';\n\nconst RULE_ID = 'vue-doctor/build-quality/tsconfig-strict-required';\nconst DOCS = 'https://www.typescriptlang.org/tsconfig#strict';\n\ninterface TsconfigShape {\n compilerOptions?: { strict?: unknown };\n}\n\nexport async function checkTsconfigStrict(\n projectInfo: ProjectInfo,\n): Promise<BuildQualityIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const tsconfigPath = join(\n dirname(projectInfo.packageJsonPath),\n 'tsconfig.json',\n );\n\n let parsed: TsconfigShape;\n try {\n const source = await readFile(tsconfigPath, 'utf8');\n parsed = JSON.parse(stripJsonComments(source)) as TsconfigShape;\n } catch {\n return [];\n }\n\n if (parsed.compilerOptions?.strict === true) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: tsconfigPath,\n line: 1,\n column: 1,\n severity: 'warn',\n message: `tsconfig.json should set compilerOptions.strict to true for full type safety. See ${DOCS}`,\n recommendation: 'Set \"strict\": true in tsconfig.json compilerOptions.',\n },\n ];\n}\n","import type { ProjectInfo } from '../types/project-info.js';\nimport type { BuildQualityIssue } from './types.js';\nimport { readDeps } from './read-deps.js';\n\nconst RULE_ID = 'vue-doctor/build-quality/vue-tsc-in-devDeps';\nconst DOCS = 'https://github.com/vuejs/language-tools/tree/master/packages/tsc';\n\nexport async function checkVueTsc(\n projectInfo: ProjectInfo,\n): Promise<BuildQualityIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.framework !== 'vue' && projectInfo.framework !== 'nuxt') {\n return [];\n }\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n if (deps.devDependencies['vue-tsc']) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'warn',\n message: `Vue projects should type-check with vue-tsc, but it is missing from devDependencies. See ${DOCS}`,\n recommendation: 'Add vue-tsc to devDependencies.',\n },\n ];\n}\n","import type { Diagnostic } from './types.js';\nimport type { ProjectInfo } from './types/project-info.js';\nimport { checkEslintPluginVue } from './build-quality/check-eslint-plugin-vue.js';\nimport { checkNoVueCli } from './build-quality/check-no-vue-cli.js';\nimport { checkTsconfigStrict } from './build-quality/check-tsconfig-strict.js';\nimport { checkVueTsc } from './build-quality/check-vue-tsc.js';\nimport type { BuildQualityIssue } from './build-quality/types.js';\n\nexport async function checkBuildQuality(\n projectInfo: ProjectInfo,\n): Promise<Diagnostic[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const results = await Promise.all([\n checkTsconfigStrict(projectInfo),\n checkVueTsc(projectInfo),\n checkNoVueCli(projectInfo),\n checkEslintPluginVue(projectInfo),\n ]);\n\n const issues: BuildQualityIssue[] = results.flat();\n\n return issues.map((issue) => ({\n file: issue.file,\n line: issue.line,\n column: issue.column,\n ruleId: issue.ruleId,\n severity: issue.severity,\n message: issue.message,\n source: 'project',\n recommendation: issue.recommendation,\n }));\n}\n","import type { ProjectInfo } from '../types/project-info.js';\nimport type { ResolvedDoctorConfig } from '../config/types.js';\n\nexport interface KnipConfig {\n cwd: string;\n entry: string[];\n project: string[];\n ignoreFiles: string[];\n ignoreDependencies: string[];\n compilers?: Record<string, true>;\n}\n\nexport function buildKnipConfig(\n projectInfo: ProjectInfo,\n doctorConfig: ResolvedDoctorConfig,\n): KnipConfig {\n const isNuxt = projectInfo.framework === 'nuxt';\n\n const entry = isNuxt\n ? [\n 'app/**/*.vue',\n 'app/**/*.ts',\n 'server/**/*.ts',\n 'nuxt.config.{ts,js,mjs}',\n ]\n : ['src/main.{ts,js}', 'src/App.vue', 'index.html', 'vite.config.{ts,js}'];\n\n const config: KnipConfig = {\n cwd: projectInfo.rootDirectory,\n entry,\n project: [\n '**/*.{ts,vue}',\n '!**/node_modules/**',\n '!**/dist/**',\n '!**/.nuxt/**',\n '!**/knip.config.mjs',\n ],\n ignoreFiles: [...doctorConfig.exclude, 'knip.config.mjs'],\n ignoreDependencies: [\n 'vite-plus',\n '@geoql/vue-doctor',\n '@geoql/nuxt-doctor',\n ],\n };\n\n if (isNuxt) {\n config.compilers = { nuxt: true };\n }\n\n return config;\n}\n","import type { Diagnostic } from '../types.js';\n\nexport function dedupeDeadCodeAgainstLint(\n deadCode: Diagnostic[],\n lint: Diagnostic[],\n): Diagnostic[] {\n const lintFiles = new Set(lint.map((d) => d.file));\n return deadCode.filter(\n (d) => !(d.ruleId === 'dead-code/unused-file' && lintFiles.has(d.file)),\n );\n}\n","export class DeadCodeTimeoutError extends Error {\n override name = 'DeadCodeTimeoutError' as const;\n\n constructor(timeoutMs: number) {\n super(`Dead-code analysis timed out after ${timeoutMs}ms`);\n }\n}\n\nexport class DeadCodeImportFailed extends Error {\n override name = 'DeadCodeImportFailed' as const;\n\n constructor(cause?: unknown) {\n const message =\n cause instanceof Error\n ? `Failed to import knip: ${cause.message}`\n : 'Failed to import knip';\n super(message, { cause });\n }\n}\n","import { resolve } from 'node:path';\nimport type { Diagnostic, Severity } from '../types.js';\nimport type { KnipIssue, KnipIssueKind } from './types.js';\n\nconst KIND_MAP: Record<\n KnipIssueKind,\n { ruleId: string; severity: Severity; message: string } | null\n> = {\n files: {\n ruleId: 'dead-code/unused-file',\n severity: 'warn',\n message: 'Unused file',\n },\n exports: {\n ruleId: 'dead-code/unused-export',\n severity: 'warn',\n message: 'Unused export',\n },\n types: {\n ruleId: 'dead-code/unused-type-export',\n severity: 'info',\n message: 'Unused type export',\n },\n enumMembers: {\n ruleId: 'dead-code/unused-member',\n severity: 'info',\n message: 'Unused enum member',\n },\n namespaceMembers: {\n ruleId: 'dead-code/unused-member',\n severity: 'info',\n message: 'Unused namespace member',\n },\n deps: {\n ruleId: 'dead-code/unused-dependency',\n severity: 'warn',\n message: 'Unused dependency',\n },\n devDependencies: {\n ruleId: 'dead-code/unused-dependency',\n severity: 'warn',\n message: 'Unused devDependency',\n },\n unlisted: {\n ruleId: 'dead-code/unlisted-dependency',\n severity: 'error',\n message: 'Unlisted dependency',\n },\n duplicates: {\n ruleId: 'dead-code/duplicate-export',\n severity: 'warn',\n message: 'Duplicate export',\n },\n nsExports: null,\n nsTypes: null,\n optionalPeerDependencies: null,\n binaries: null,\n unresolved: null,\n catalog: null,\n};\n\nexport function mapKnipDiagnostic(\n rootDirectory: string,\n issue: KnipIssue,\n): Diagnostic | null {\n const mapping = KIND_MAP[issue.kind];\n if (!mapping) return null;\n\n return {\n file: resolve(rootDirectory, issue.file),\n line: issue.line ?? 1,\n column: issue.col ?? 1,\n ruleId: mapping.ruleId,\n severity: mapping.severity,\n message: issue.symbol\n ? `${mapping.message}: ${issue.symbol}`\n : mapping.message,\n source: 'dead-code',\n };\n}\n","import { join } from 'node:path';\nimport { createRequire } from 'node:module';\nimport type { Diagnostic } from './types.js';\nimport type { ProjectInfo } from './types/project-info.js';\nimport type { ResolvedDoctorConfig } from './config/types.js';\nimport { buildKnipConfig } from './dead-code/build-knip-config.js';\nimport { dedupeDeadCodeAgainstLint } from './dead-code/dedupe.js';\nimport {\n DeadCodeImportFailed,\n DeadCodeTimeoutError,\n} from './dead-code/errors.js';\nimport { mapKnipDiagnostic } from './dead-code/map-knip-diagnostic.js';\nimport type { KnipIssue, KnipIssueKind } from './dead-code/types.js';\n\ninterface CheckDeadCodeOptions {\n projectInfo: ProjectInfo;\n doctorConfig: ResolvedDoctorConfig;\n enabled: boolean;\n timeoutMs?: number;\n}\n\ninterface KnipIssueEntry {\n filePath: string;\n symbol: string;\n line?: number;\n col?: number;\n type: string;\n}\n\ntype KnipIssueRecords = Record<string, Record<string, KnipIssueEntry>>;\n\ninterface KnipIssues {\n files: KnipIssueRecords;\n exports: KnipIssueRecords;\n types: KnipIssueRecords;\n deps: KnipIssueRecords;\n devDependencies: KnipIssueRecords;\n unlisted: KnipIssueRecords;\n duplicates: KnipIssueRecords;\n enumMembers: KnipIssueRecords;\n namespaceMembers: KnipIssueRecords;\n nsExports: KnipIssueRecords;\n nsTypes: KnipIssueRecords;\n optionalPeerDependencies: KnipIssueRecords;\n binaries: KnipIssueRecords;\n unresolved: KnipIssueRecords;\n catalog: KnipIssueRecords;\n}\n\nconst MAPPED_KINDS: KnipIssueKind[] = [\n 'files',\n 'exports',\n 'types',\n 'deps',\n 'devDependencies',\n 'unlisted',\n 'duplicates',\n 'enumMembers',\n 'namespaceMembers',\n];\n\nfunction flattenKnipIssues(issues: KnipIssues): KnipIssue[] {\n const out: KnipIssue[] = [];\n for (const kind of MAPPED_KINDS) {\n const records = issues[kind];\n if (!records) continue;\n for (const filePath of Object.keys(records)) {\n const symbols = records[filePath];\n for (const symbolName of Object.keys(symbols)) {\n const entry = symbols[symbolName];\n out.push({\n file: entry.filePath,\n symbol: entry.symbol,\n line: entry.line,\n col: entry.col,\n kind,\n });\n }\n }\n }\n return out;\n}\n\nexport const _knipLoader = {\n load: async (): Promise<{\n createOptions: (opts: { cwd: string }) => Promise<Record<string, unknown>>;\n run: (\n opts: Record<string, unknown>,\n ) => Promise<{ results: { issues: KnipIssues } }>;\n }> => {\n const require = createRequire(import.meta.url);\n const knipMainPath = require.resolve('knip');\n const knipDir = knipMainPath.replace(/\\/dist\\/index\\.js$/, '');\n\n const { pathToFileURL } = await import('node:url');\n const createOptionsUrl = pathToFileURL(\n join(knipDir, 'dist', 'util', 'create-options.js'),\n ).href;\n const runUrl = pathToFileURL(join(knipDir, 'dist', 'run.js')).href;\n\n const createOptionsModule = (await import(createOptionsUrl)) as {\n createOptions: (opts: {\n cwd: string;\n }) => Promise<Record<string, unknown>>;\n };\n const runModule = (await import(runUrl)) as {\n run: (\n opts: Record<string, unknown>,\n ) => Promise<{ results: { issues: KnipIssues } }>;\n };\n\n return {\n createOptions: createOptionsModule.createOptions,\n run: runModule.run,\n };\n },\n};\n\nexport async function checkDeadCode(\n options: CheckDeadCodeOptions,\n): Promise<Diagnostic[]> {\n if (!options.enabled) return [];\n\n const config = buildKnipConfig(options.projectInfo, options.doctorConfig);\n const timeoutMs = options.timeoutMs ?? 30_000;\n\n let createOptions: (opts: {\n cwd: string;\n }) => Promise<Record<string, unknown>>;\n let run: (\n opts: Record<string, unknown>,\n ) => Promise<{ results: { issues: KnipIssues } }>;\n try {\n const internals = await _knipLoader.load();\n createOptions = internals.createOptions;\n run = internals.run;\n } catch (err) {\n throw new DeadCodeImportFailed(err);\n }\n\n const knipOptions = await createOptions({\n cwd: options.projectInfo.rootDirectory,\n entry: config.entry,\n project: config.project,\n ignoreFiles: config.ignoreFiles,\n ignoreDependencies: config.ignoreDependencies,\n ...(config.compilers ? { compilers: config.compilers } : {}),\n });\n\n const result = await Promise.race([\n run(knipOptions),\n new Promise<never>((_, reject) =>\n setTimeout(() => reject(new DeadCodeTimeoutError(timeoutMs)), timeoutMs),\n ),\n ]);\n\n const allIssues = flattenKnipIssues(result.results.issues);\n const diagnostics = allIssues\n .map((issue) => mapKnipDiagnostic(options.projectInfo.rootDirectory, issue))\n .filter((d): d is Diagnostic => d !== null);\n\n diagnostics.sort((a, b) => {\n if (a.file !== b.file) return a.file < b.file ? -1 : 1;\n if (a.line !== b.line) return a.line - b.line;\n return a.ruleId.localeCompare(b.ruleId);\n });\n\n return diagnostics;\n}\n\nexport {\n dedupeDeadCodeAgainstLint,\n DeadCodeImportFailed,\n DeadCodeTimeoutError,\n};\n","import { execFile } from 'node:child_process';\n\ninterface PnpmListEntry {\n dependencies?: Record<string, { version: string }>;\n devDependencies?: Record<string, { version: string }>;\n peers?: Array<{ name: string; version: string }>;\n}\n\nfunction collectVersions(entry: PnpmListEntry, versions: Set<string>): void {\n if (entry.dependencies) {\n for (const [name, info] of Object.entries(entry.dependencies)) {\n if (name === 'vue' && info.version) {\n versions.add(info.version);\n }\n }\n }\n if (entry.devDependencies) {\n for (const [name, info] of Object.entries(entry.devDependencies)) {\n if (name === 'vue' && info.version) {\n versions.add(info.version);\n }\n }\n }\n if (entry.peers) {\n for (const peer of entry.peers) {\n if (peer.name === 'vue' && peer.version) {\n versions.add(peer.version);\n }\n }\n }\n}\n\nexport async function runPnpmList(\n rootDir: string,\n): Promise<\n { versions: string[]; error: null } | { versions: []; error: Error }\n> {\n return new Promise((resolve) => {\n const timeout = setTimeout(() => {\n resolve({ versions: [], error: new Error('timeout') });\n }, 10_000);\n\n execFile(\n 'pnpm',\n ['list', 'vue', '--depth', 'Infinity', '--json'],\n { cwd: rootDir, timeout: 10_000 },\n (error: Error | null, stdout: string, stderr: string) => {\n clearTimeout(timeout);\n if (error || stderr) {\n resolve({ versions: [], error: error ?? new Error(stderr) });\n return;\n }\n try {\n const parsed = JSON.parse(stdout) as PnpmListEntry[];\n const versions = new Set<string>();\n for (const entry of parsed) {\n collectVersions(entry, versions);\n }\n resolve({ versions: [...versions], error: null });\n } catch {\n resolve({ versions: [], error: new Error('parse error') });\n }\n },\n );\n });\n}\n\nexport async function runNpmList(\n rootDir: string,\n): Promise<\n { versions: string[]; error: null } | { versions: []; error: Error }\n> {\n return new Promise((resolve) => {\n const timeout = setTimeout(() => {\n resolve({ versions: [], error: new Error('timeout') });\n }, 10_000);\n\n execFile(\n 'npm',\n ['ls', 'vue', '--all', '--json'],\n { cwd: rootDir, timeout: 10_000 },\n (error: Error | null, stdout: string, stderr: string) => {\n clearTimeout(timeout);\n if (error || stderr) {\n resolve({ versions: [], error: error ?? new Error(stderr) });\n return;\n }\n try {\n const parsed = JSON.parse(stdout) as PnpmListEntry;\n const versions = new Set<string>();\n collectVersions(parsed, versions);\n resolve({ versions: [...versions], error: null });\n } catch {\n resolve({ versions: [], error: new Error('parse error') });\n }\n },\n );\n });\n}\n","import { dirname } from 'node:path';\nimport { runPnpmList, runNpmList } from './exec-list.js';\n\nexport async function listVueResolutions(\n packageJsonPath: string,\n): Promise<string[]> {\n const rootDir = dirname(packageJsonPath);\n\n const pnpmResult = await runPnpmList(rootDir);\n if (pnpmResult.error === null) {\n return pnpmResult.versions;\n }\n\n const npmResult = await runNpmList(rootDir);\n if (npmResult.error === null) {\n return npmResult.versions;\n }\n\n return [];\n}\n","import type { ProjectInfo } from '../types/project-info.js';\nimport { listVueResolutions } from './list-vue-resolutions.js';\nimport type { DepsIssue } from './types.js';\n\nconst RULE_ID = 'vue-doctor/deps/duplicate-vue-versions';\n\nexport async function checkDuplicateVue(\n projectInfo: ProjectInfo,\n): Promise<DepsIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const versions = await listVueResolutions(projectInfo.packageJsonPath);\n\n const uniqueVersions = [...new Set(versions)];\n if (uniqueVersions.length <= 1) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'error',\n message: `Multiple versions of vue detected in node_modules: ${uniqueVersions.join(', ')}. Vue's reactivity system requires a single instance.`,\n recommendation:\n 'Add \"vue\": \"^3.5.0\" to pnpm.overrides (or npm overrides) to deduplicate. Run pnpm dedupe.',\n versions: uniqueVersions,\n },\n ];\n}\n","import type { ProjectInfo } from '../types/project-info.js';\nimport type { DepsIssue } from './types.js';\n\nconst RULE_ID = 'vue-doctor/deps/vue-major-current';\n\nconst DOCTOR_BUNDLED_VUE_FLOOR_MAJOR = 3;\nconst DOCTOR_BUNDLED_VUE_FLOOR_MINOR = 5;\n\nfunction parseMajorMinor(\n version: string,\n): { major: number; minor: number } | null {\n const match = /^v?(\\d+)\\.(\\d+)/.exec(version.trim());\n if (!match) return null;\n return { major: Number(match[1]), minor: Number(match[2]) };\n}\n\nexport function checkVueMajorCurrent(projectInfo: ProjectInfo): DepsIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.vueVersion === null) return [];\n\n const parsed = parseMajorMinor(projectInfo.vueVersion);\n if (parsed === null) return [];\n\n if (parsed.major !== DOCTOR_BUNDLED_VUE_FLOOR_MAJOR) return [];\n if (parsed.minor >= DOCTOR_BUNDLED_VUE_FLOOR_MINOR) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'info',\n message: `Vue ${projectInfo.vueVersion} is older than the doctor-bundled floor (^${DOCTOR_BUNDLED_VUE_FLOOR_MAJOR}.${DOCTOR_BUNDLED_VUE_FLOOR_MINOR}.0). Newer minors often ship rule-relevant features (e.g. 3.4 reactive props destructure, 3.5 useTemplateRef).`,\n recommendation: `Bump \"vue\" to ^${DOCTOR_BUNDLED_VUE_FLOOR_MAJOR}.${DOCTOR_BUNDLED_VUE_FLOOR_MINOR}.0 or later in package.json.`,\n },\n ];\n}\n","import type { Diagnostic } from './types.js';\nimport type { ProjectInfo } from './types/project-info.js';\nimport { checkDuplicateVue } from './deps/check-duplicate-vue.js';\nimport { checkVueMajorCurrent } from './deps/check-vue-major-current.js';\nimport type { DepsIssue } from './deps/types.js';\n\nexport async function checkDeps(\n projectInfo: ProjectInfo,\n): Promise<Diagnostic[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const results = await Promise.all([\n checkDuplicateVue(projectInfo),\n Promise.resolve(checkVueMajorCurrent(projectInfo)),\n ]);\n\n const issues: DepsIssue[] = results.flat();\n\n return issues.map((issue) => ({\n file: issue.file,\n line: issue.line,\n column: issue.column,\n ruleId: issue.ruleId,\n severity: issue.severity,\n message: issue.message,\n source: 'deps',\n recommendation: issue.recommendation,\n }));\n}\n","export interface DirectiveRange {\n start: number;\n end: number;\n rules: string[];\n}\n\nexport interface DirectiveLine {\n line: number;\n rules: string[];\n}\n\nexport interface DirectiveSet {\n blocks: DirectiveRange[];\n nextLine: DirectiveLine[];\n sameLine: DirectiveLine[];\n}\n\nconst DIRECTIVE =\n /doctor-(disable-next-line|disable-line|disable|enable)\\b(.*)/;\n\nfunction parseRuleList(raw: string): string[] {\n return raw\n .replace(/-->\\s*$/, '')\n .split(',')\n .map((token) => token.trim())\n .filter((token) => token.length > 0);\n}\n\nexport function parseDirectives(text: string): DirectiveSet {\n const blocks: DirectiveRange[] = [];\n const nextLine: DirectiveLine[] = [];\n const sameLine: DirectiveLine[] = [];\n\n const lines = text.split('\\n');\n let open: { start: number; rules: string[] } | null = null;\n\n for (let index = 0; index < lines.length; index += 1) {\n const match = DIRECTIVE.exec(lines[index]);\n if (!match) continue;\n\n const keyword = match[1];\n const rules = parseRuleList(match[2]);\n const lineNumber = index + 1;\n\n if (keyword === 'disable-next-line') {\n nextLine.push({ line: lineNumber + 1, rules });\n } else if (keyword === 'disable-line') {\n sameLine.push({ line: lineNumber, rules });\n } else if (keyword === 'disable') {\n if (!open) open = { start: lineNumber, rules };\n } else if (open) {\n blocks.push({ start: open.start, end: lineNumber, rules: open.rules });\n open = null;\n }\n }\n\n if (open) {\n blocks.push({ start: open.start, end: lines.length, rules: open.rules });\n }\n\n return { blocks, nextLine, sameLine };\n}\n","import { readFileSync } from 'node:fs';\nimport type { Diagnostic } from '../types.js';\nimport { parseDirectives, type DirectiveSet } from './parse-directives.js';\n\nexport interface ApplyInlineDisablesOptions {\n respect: boolean;\n}\n\nfunction ruleMatches(ruleId: string, rules: string[]): boolean {\n if (rules.length === 0) return true;\n return rules.some(\n (token) => ruleId === token || ruleId.endsWith(`/${token}`),\n );\n}\n\nfunction isSuppressed(set: DirectiveSet, diagnostic: Diagnostic): boolean {\n const { line, ruleId } = diagnostic;\n for (const block of set.blocks) {\n if (\n line >= block.start &&\n line <= block.end &&\n ruleMatches(ruleId, block.rules)\n ) {\n return true;\n }\n }\n for (const target of set.nextLine) {\n if (target.line === line && ruleMatches(ruleId, target.rules)) return true;\n }\n for (const target of set.sameLine) {\n if (target.line === line && ruleMatches(ruleId, target.rules)) return true;\n }\n return false;\n}\n\nfunction loadDirectives(\n file: string,\n cache: Map<string, DirectiveSet | null>,\n): DirectiveSet | null {\n const cached = cache.get(file);\n if (cached !== undefined) return cached;\n let set: DirectiveSet | null;\n try {\n set = parseDirectives(readFileSync(file, 'utf-8'));\n } catch {\n set = null;\n }\n cache.set(file, set);\n return set;\n}\n\nexport function applyInlineDisables(\n diags: Diagnostic[],\n opts: ApplyInlineDisablesOptions,\n): Diagnostic[] {\n if (!opts.respect) return diags;\n const cache = new Map<string, DirectiveSet | null>();\n return diags.filter((diagnostic) => {\n const set = loadDirectives(diagnostic.file, cache);\n return set === null || !isSuppressed(set, diagnostic);\n });\n}\n","import { readFile } from 'node:fs/promises';\nimport type { Diagnostic } from './types.js';\n\nasync function readLines(file: string): Promise<string[]> {\n try {\n const content = await readFile(file, 'utf-8');\n return content.split('\\n');\n } catch {\n return [];\n }\n}\n\nexport async function attachCodeSnippets(\n diagnostics: readonly Diagnostic[],\n): Promise<Diagnostic[]> {\n const cache = new Map<string, string[]>();\n const out: Diagnostic[] = [];\n for (const d of diagnostics) {\n let lines = cache.get(d.file);\n if (lines === undefined) {\n lines = await readLines(d.file);\n cache.set(d.file, lines);\n }\n const raw = lines[d.line - 1];\n if (raw === undefined) {\n out.push(d);\n } else {\n out.push({ ...d, codeSnippet: raw.trim() });\n }\n }\n return out;\n}\n","import { access } from 'node:fs/promises';\n\nexport async function pathExists(target: string): Promise<boolean> {\n try {\n await access(target);\n return true;\n } catch {\n return false;\n }\n}\n","import { dirname, join } from 'node:path';\nimport type { MonorepoKind } from '../types/project-info.js';\nimport { pathExists } from './path-exists.js';\nimport { readPackageJson } from './read-package-json.js';\n\nexport interface MonorepoResult {\n root: string;\n kind: MonorepoKind;\n}\n\nasync function detectKind(dir: string): Promise<MonorepoKind> {\n if (await pathExists(join(dir, 'pnpm-workspace.yaml'))) return 'pnpm';\n const pkg = await readPackageJson(dir);\n if (pkg?.workspaces) {\n if (await pathExists(join(dir, 'yarn.lock'))) return 'yarn';\n if (await pathExists(join(dir, 'package-lock.json'))) return 'npm';\n }\n if (await pathExists(join(dir, 'turbo.json'))) return 'turbo';\n return null;\n}\n\nexport async function findMonorepoRoot(\n rootDirectory: string,\n): Promise<MonorepoResult> {\n let current = rootDirectory;\n for (;;) {\n const kind = await detectKind(current);\n if (kind) return { root: current, kind };\n const parent = dirname(current);\n if (parent === current) break;\n current = parent;\n }\n return { root: rootDirectory, kind: null };\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { parseSync } from 'oxc-parser';\n\nexport interface NuxtConfigInfo {\n compatibilityVersion?: number;\n nitroPreset?: string;\n modules?: string[];\n importsAutoImport?: boolean;\n}\n\ninterface AstNode {\n type: string;\n [key: string]: unknown;\n}\n\nconst CONFIG_FILES = ['nuxt.config.ts', 'nuxt.config.js', 'nuxt.config.mjs'];\n\nasync function readConfigSource(dir: string): Promise<string | null> {\n for (const name of CONFIG_FILES) {\n try {\n return await readFile(join(dir, name), 'utf8');\n } catch {\n continue;\n }\n }\n return null;\n}\n\nfunction* objectEntries(obj: AstNode): Generator<[string, AstNode]> {\n for (const prop of obj.properties as AstNode[]) {\n if (prop.type !== 'Property') continue;\n const key = prop.key as AstNode;\n if (key.type !== 'Identifier') continue;\n yield [key.name as string, prop.value as AstNode];\n }\n}\n\nfunction findEntry(obj: AstNode, name: string): AstNode | undefined {\n for (const [key, value] of objectEntries(obj)) {\n if (key === name) return value;\n }\n return undefined;\n}\n\nfunction stringLiteral(node: AstNode): string | undefined {\n return node.type === 'Literal' && typeof node.value === 'string'\n ? node.value\n : undefined;\n}\n\nfunction unwrapDefault(decl: AstNode): AstNode | null {\n if (decl.type !== 'CallExpression') return decl;\n const callee = decl.callee as AstNode;\n if (callee.type !== 'Identifier') return null;\n if (callee.name !== 'defineNuxtConfig') return null;\n return (decl.arguments as AstNode[])[0] ?? null;\n}\n\nfunction extractConfigObject(source: string): AstNode | null {\n const result = parseSync('nuxt.config.ts', source, {\n sourceType: 'module',\n lang: 'ts',\n });\n const body = (result.program as unknown as AstNode).body as AstNode[];\n const exported = body.find((n) => n.type === 'ExportDefaultDeclaration');\n if (!exported) return null;\n const node = unwrapDefault(exported.declaration as AstNode);\n if (!node) return null;\n return node.type === 'ObjectExpression' ? node : null;\n}\n\nfunction readNitroPreset(value: AstNode): string | undefined {\n if (value.type !== 'ObjectExpression') return undefined;\n const preset = findEntry(value, 'preset');\n return preset ? stringLiteral(preset) : undefined;\n}\n\nfunction readImportsAutoImport(value: AstNode): boolean | undefined {\n if (value.type !== 'ObjectExpression') return undefined;\n const node = findEntry(value, 'autoImport');\n if (node?.type === 'Literal' && typeof node.value === 'boolean') {\n return node.value;\n }\n return undefined;\n}\n\nfunction readModules(value: AstNode): string[] | undefined {\n if (value.type !== 'ArrayExpression') return undefined;\n const out: string[] = [];\n for (const element of value.elements as (AstNode | null)[]) {\n if (!element) continue;\n const str = stringLiteral(element);\n if (str !== undefined) out.push(str);\n }\n return out;\n}\n\nfunction readCompatibility(value: AstNode): number | undefined {\n return value.type === 'Literal' && typeof value.value === 'number'\n ? value.value\n : undefined;\n}\n\nexport async function parseNuxtConfig(\n dir: string,\n): Promise<NuxtConfigInfo | null> {\n const source = await readConfigSource(dir);\n if (source === null) return null;\n\n const info: NuxtConfigInfo = {};\n const config = extractConfigObject(source);\n if (!config) return info;\n\n for (const [key, value] of objectEntries(config)) {\n if (key === 'compatibilityVersion') {\n const compat = readCompatibility(value);\n if (compat !== undefined) info.compatibilityVersion = compat;\n } else if (key === 'nitro') {\n const preset = readNitroPreset(value);\n if (preset !== undefined) info.nitroPreset = preset;\n } else if (key === 'modules') {\n const modules = readModules(value);\n if (modules !== undefined) info.modules = modules;\n } else if (key === 'imports') {\n const autoImport = readImportsAutoImport(value);\n if (autoImport !== undefined) info.importsAutoImport = autoImport;\n }\n }\n return info;\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { coerce } from 'semver';\nimport type { PackageJson } from './read-package-json.js';\n\nasync function readInstalledVersion(\n base: string,\n dep: string,\n): Promise<string | null> {\n try {\n const source = await readFile(\n join(base, 'node_modules', dep, 'package.json'),\n 'utf8',\n );\n const parsed = JSON.parse(source) as { version?: string };\n return parsed.version ?? null;\n } catch {\n return null;\n }\n}\n\nfunction declaredRange(dep: string, pkg: PackageJson | null): string | null {\n return pkg?.dependencies?.[dep] ?? pkg?.devDependencies?.[dep] ?? null;\n}\n\nexport async function resolveDepVersion(\n dep: string,\n rootDirectory: string,\n monorepoRoot: string,\n pkg: PackageJson | null,\n): Promise<string | null> {\n const installed =\n (await readInstalledVersion(rootDirectory, dep)) ??\n (await readInstalledVersion(monorepoRoot, dep));\n if (installed) return installed;\n\n const range = declaredRange(dep, pkg);\n if (!range) return null;\n return coerce(range)?.version ?? null;\n}\n","import type { PackageJson } from './read-package-json.js';\nimport { resolveDepVersion } from './resolve-dep-version.js';\n\nexport function parseNuxtVersion(\n rootDirectory: string,\n monorepoRoot: string,\n pkg: PackageJson | null,\n): Promise<string | null> {\n return resolveDepVersion('nuxt', rootDirectory, monorepoRoot, pkg);\n}\n","import type { PackageJson } from './read-package-json.js';\nimport { resolveDepVersion } from './resolve-dep-version.js';\n\nexport function parseVueVersion(\n rootDirectory: string,\n monorepoRoot: string,\n pkg: PackageJson | null,\n): Promise<string | null> {\n return resolveDepVersion('vue', rootDirectory, monorepoRoot, pkg);\n}\n","import { join } from 'node:path';\nimport { gte, major, minor } from 'semver';\nimport { findMonorepoRoot } from './project-info/find-monorepo-root.js';\nimport { parseNuxtConfig } from './project-info/parse-nuxt-config.js';\nimport { parseNuxtVersion } from './project-info/parse-nuxt-version.js';\nimport { parseVueVersion } from './project-info/parse-vue-version.js';\nimport { pathExists } from './project-info/path-exists.js';\nimport type { PackageJson } from './project-info/read-package-json.js';\nimport { readPackageJson } from './project-info/read-package-json.js';\nimport { resolveDepVersion } from './project-info/resolve-dep-version.js';\nimport type {\n Capability,\n Framework,\n MonorepoKind,\n ProjectInfo,\n} from './types/project-info.js';\n\ninterface DetectionInput {\n framework: Framework;\n vueVersion: string | null;\n nuxtVersion: string | null;\n typescriptVersion: string | null;\n hasTypescript: boolean;\n hasAutoImports: boolean;\n hasComponentsAutoImport: boolean;\n hasPinia: boolean;\n hasVueRouter: boolean;\n nitroPreset: string | null;\n nuxtCompatibilityVersion: 3 | 4 | null;\n monorepoKind: MonorepoKind;\n hasWrangler: boolean;\n}\n\nfunction hasDependency(pkg: PackageJson | null, name: string): boolean {\n return Boolean(pkg?.dependencies?.[name] ?? pkg?.devDependencies?.[name]);\n}\n\nfunction resolveFramework(pkg: PackageJson | null): Framework {\n if (hasDependency(pkg, 'nuxt')) return 'nuxt';\n if (hasDependency(pkg, 'vue')) return 'vue';\n return 'unknown';\n}\n\nfunction resolveCompatibility(\n nuxtVersion: string | null,\n compatibilityVersion: number | undefined,\n): 3 | 4 | null {\n const nuxtMajor = nuxtVersion ? major(nuxtVersion) : 0;\n if (compatibilityVersion === 4 || nuxtMajor >= 4) return 4;\n if (compatibilityVersion === 3) return 3;\n return null;\n}\n\nfunction buildCapabilities(input: DetectionInput): Set<Capability> {\n const caps = new Set<Capability>();\n if (input.framework === 'unknown') return caps;\n\n if (input.vueVersion && major(input.vueVersion) === 3) {\n caps.add('vue:3');\n if (minor(input.vueVersion) >= 4) caps.add('vue:3.4');\n if (minor(input.vueVersion) >= 5) caps.add('vue:3.5');\n }\n\n if (input.nuxtCompatibilityVersion === 4) caps.add('nuxt:4');\n if (input.nuxtVersion && gte(input.nuxtVersion, '4.4.0'))\n caps.add('nuxt:4.4');\n\n if (input.hasAutoImports) caps.add('auto-imports:vue');\n if (input.hasComponentsAutoImport) caps.add('components:auto');\n if (input.hasPinia) caps.add('pinia');\n if (input.hasVueRouter) caps.add('vue-router');\n\n if (input.hasTypescript) caps.add('typescript');\n if (input.typescriptVersion && major(input.typescriptVersion) >= 6) {\n caps.add('typescript:6');\n }\n\n if (\n input.monorepoKind === 'pnpm' ||\n input.monorepoKind === 'yarn' ||\n input.monorepoKind === 'npm'\n ) {\n caps.add(`monorepo:${input.monorepoKind}`);\n }\n\n if (input.hasWrangler || input.nitroPreset === 'cloudflare-pages') {\n caps.add('cf-pages:enabled');\n }\n if (input.nitroPreset === 'node-server') caps.add('nitro:node-server');\n\n return caps;\n}\n\nexport async function detectProject(\n rootDirectory: string,\n): Promise<ProjectInfo> {\n const pkg = await readPackageJson(rootDirectory);\n const packageJsonPath = pkg ? join(rootDirectory, 'package.json') : null;\n const { root: monorepoRoot, kind: monorepoKind } =\n await findMonorepoRoot(rootDirectory);\n\n const framework = resolveFramework(pkg);\n const vueVersion = await parseVueVersion(rootDirectory, monorepoRoot, pkg);\n const nuxtVersion = await parseNuxtVersion(rootDirectory, monorepoRoot, pkg);\n const typescriptVersion = await resolveDepVersion(\n 'typescript',\n rootDirectory,\n monorepoRoot,\n pkg,\n );\n\n const nuxtConfig =\n framework === 'nuxt' ? await parseNuxtConfig(rootDirectory) : null;\n const nitroPreset = nuxtConfig?.nitroPreset ?? null;\n const nuxtCompatibilityVersion = resolveCompatibility(\n nuxtVersion,\n nuxtConfig?.compatibilityVersion,\n );\n\n const isNuxt = framework === 'nuxt';\n const hasAutoImports = isNuxt\n ? nuxtConfig?.importsAutoImport !== false\n : hasDependency(pkg, 'unplugin-auto-import');\n const hasComponentsAutoImport =\n isNuxt || hasDependency(pkg, 'unplugin-vue-components');\n const hasPinia = hasDependency(pkg, 'pinia');\n const hasVueRouter = hasDependency(pkg, 'vue-router') && !isNuxt;\n\n const tsconfigExists = await pathExists(join(rootDirectory, 'tsconfig.json'));\n const hasTypescript = hasDependency(pkg, 'typescript') || tsconfigExists;\n\n const hasWrangler =\n (await pathExists(join(rootDirectory, 'wrangler.toml'))) ||\n (await pathExists(join(rootDirectory, 'wrangler.jsonc')));\n\n const capabilities = buildCapabilities({\n framework,\n vueVersion,\n nuxtVersion,\n typescriptVersion,\n hasTypescript,\n hasAutoImports,\n hasComponentsAutoImport,\n hasPinia,\n hasVueRouter,\n nitroPreset,\n nuxtCompatibilityVersion,\n monorepoKind,\n hasWrangler,\n });\n\n return {\n framework,\n rootDirectory,\n packageJsonPath,\n vueVersion,\n nuxtVersion,\n typescriptVersion,\n hasAutoImports,\n hasComponentsAutoImport,\n hasPinia,\n hasVueRouter,\n nitroPreset,\n nuxtCompatibilityVersion,\n monorepoKind,\n capabilities,\n };\n}\n","import { resolve } from 'node:path';\nimport { glob } from 'tinyglobby';\n\nexport interface ScanOptions {\n rootDir: string;\n include: string[];\n exclude: string[];\n}\n\nexport async function listSourceFiles(opts: ScanOptions): Promise<string[]> {\n const files = await glob(opts.include, {\n cwd: opts.rootDir,\n absolute: true,\n ignore: opts.exclude,\n onlyFiles: true,\n dot: false,\n });\n return files.map((f) => resolve(f)).sort();\n}\n","import type { Diagnostic } from './types.js';\n\nexport function mergeDiagnostics(...batches: Diagnostic[][]): Diagnostic[] {\n const seen = new Set<string>();\n const out: Diagnostic[] = [];\n for (const batch of batches) {\n for (const d of batch) {\n const key = `${d.file}|${d.line}|${d.column}|${d.ruleId}`;\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(d);\n }\n }\n out.sort((a, b) => {\n if (a.file !== b.file) return a.file < b.file ? -1 : 1;\n if (a.line !== b.line) return a.line - b.line;\n if (a.column !== b.column) return a.column - b.column;\n return a.ruleId < b.ruleId ? -1 : 1;\n });\n return out;\n}\n","import { resolve } from 'node:path';\nimport type { Diagnostic } from '../types.js';\nimport type { OxlintRawDiagnostic } from './types.js';\n\nconst OXLINT_CODE_PATTERN = /^([a-z0-9_-]+)\\(([a-z0-9/_-]+)\\)$/i;\n\nexport function normalizeOxlintRuleId(raw: OxlintRawDiagnostic): string {\n if (raw.code) {\n const match = OXLINT_CODE_PATTERN.exec(raw.code);\n if (match) return `${match[1]}/${match[2]}`;\n return raw.code;\n }\n if (raw.rule) return raw.rule;\n return 'oxlint/unknown';\n}\n\nexport function toCanonicalDiagnostic(\n raw: OxlintRawDiagnostic,\n rootDir: string,\n): Diagnostic {\n const ruleId = normalizeOxlintRuleId(raw);\n const severity = raw.severity === 'warning' ? 'warn' : 'error';\n const primary = raw.labels?.[0]?.span;\n const line = primary?.line ?? raw.start_line ?? 1;\n const column = primary?.column ?? raw.start_column ?? 1;\n return {\n file: resolve(rootDir, raw.filename),\n line,\n column,\n endLine: raw.end_line,\n endColumn: raw.end_column,\n ruleId,\n severity,\n message: raw.message,\n source: 'oxlint',\n };\n}\n\nexport function toCanonicalDiagnostics(\n raws: OxlintRawDiagnostic[],\n rootDir: string,\n): Diagnostic[] {\n return raws.map((r) => toCanonicalDiagnostic(r, rootDir));\n}\n","import { existsSync } from 'node:fs';\nimport { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport type { Severity } from '../types.js';\n\nexport interface GenerateConfigInput {\n pluginPath: string;\n ruleOverrides?: Record<string, Severity | 'off'>;\n rootDir?: string;\n}\n\nexport interface GeneratedConfig {\n configPath: string;\n cleanup: () => Promise<void>;\n}\n\nconst DEFAULT_RULES: Record<string, Severity> = {\n 'vue/no-export-in-script-setup': 'error',\n 'vue/require-typed-ref': 'warn',\n 'vue-doctor/no-em-dash-in-string': 'warn',\n 'vue-doctor/no-destructure-props-without-to-refs': 'error',\n 'vue-doctor/no-destructure-reactive-without-to-refs': 'error',\n 'vue-doctor/no-non-null-assertion-on-ref-value': 'warn',\n 'vue-doctor/no-imports-from-vue-when-auto-imported': 'warn',\n 'vue-doctor/reactivity/watch-without-cleanup': 'warn',\n 'vue-doctor/composition/prefer-script-setup-for-new-files': 'warn',\n 'vue-doctor/composition/defineProps-typed': 'warn',\n};\n\nfunction toOxlintSeverity(s: Severity): 'error' | 'warn' {\n if (s === 'error') return 'error';\n return 'warn';\n}\n\ninterface CacheTarget {\n dir: string;\n removeDir: boolean;\n}\n\nasync function resolveCacheDir(\n rootDir: string | undefined,\n): Promise<CacheTarget> {\n if (rootDir && existsSync(join(rootDir, 'node_modules'))) {\n const dir = join(rootDir, 'node_modules', '.cache', 'doctor');\n await mkdir(dir, { recursive: true });\n return { dir, removeDir: false };\n }\n const dir = await mkdtemp(join(tmpdir(), 'geoql-doctor-'));\n return { dir, removeDir: true };\n}\n\nfunction resolveUserConfig(rootDir: string | undefined): string | undefined {\n if (!rootDir) return undefined;\n for (const name of ['.oxlintrc.json', '.oxlintrc']) {\n const candidate = join(rootDir, name);\n if (existsSync(candidate)) return candidate;\n }\n return undefined;\n}\n\nexport async function generateOxlintConfig(\n input: GenerateConfigInput,\n): Promise<GeneratedConfig> {\n const { dir, removeDir } = await resolveCacheDir(input.rootDir);\n const merged: Record<string, Severity> = { ...DEFAULT_RULES };\n if (input.ruleOverrides) {\n for (const [id, sev] of Object.entries(input.ruleOverrides)) {\n if (sev === 'off') delete merged[id];\n else merged[id] = sev;\n }\n }\n const rules: Record<string, 'error' | 'warn'> = {};\n for (const [id, sev] of Object.entries(merged)) {\n rules[id] = toOxlintSeverity(sev);\n }\n const userConfig = resolveUserConfig(input.rootDir);\n const config = {\n $schema:\n 'https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json',\n ...(userConfig ? { extends: [userConfig] } : {}),\n plugins: ['vue'],\n jsPlugins: [input.pluginPath],\n rules,\n };\n const configPath = join(dir, '.oxlintrc.json');\n await writeFile(configPath, JSON.stringify(config, null, 2));\n const cleanup = async (): Promise<void> => {\n await rm(removeDir ? dir : configPath, { recursive: true, force: true });\n };\n return { configPath, cleanup };\n}\n","import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, resolve as resolvePath } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nfunction readPkgMain(pkgJsonPath: string): string | undefined {\n try {\n const raw = readFileSync(pkgJsonPath, 'utf8');\n const pkg = JSON.parse(raw) as {\n exports?: {\n '.'?: { import?: string; default?: string };\n default?: string;\n };\n module?: string;\n main?: string;\n };\n const exp = pkg.exports?.['.'];\n if (exp?.import) return exp.import;\n if (exp?.default) return exp.default;\n if (pkg.module) return pkg.module;\n if (pkg.main) return pkg.main;\n return undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction lookUpwards(fromDir: string, relPath: string): string | undefined {\n let current = resolvePath(fromDir);\n // Bounded ascent: stop when dirname() returns the same value (filesystem root).\n while (true) {\n const candidate = resolvePath(current, relPath);\n if (existsSync(candidate)) return candidate;\n const parent = dirname(current);\n if (parent === current) return undefined;\n current = parent;\n }\n}\n\nfunction resolveFromSelf(specifier: string): string | undefined {\n try {\n return fileURLToPath(import.meta.resolve(specifier));\n } catch {\n return undefined;\n }\n}\n\nexport function resolveVueDoctorPluginPath(fromDir: string): string {\n const pkgJson = lookUpwards(\n fromDir,\n 'node_modules/@geoql/oxlint-plugin-vue-doctor/package.json',\n );\n if (pkgJson) {\n const main = readPkgMain(pkgJson) ?? './dist/index.js';\n return resolvePath(dirname(pkgJson), main);\n }\n const selfMain = resolveFromSelf('@geoql/oxlint-plugin-vue-doctor');\n if (selfMain) return selfMain;\n return throwResolveError(fromDir);\n}\n\nfunction throwResolveError(fromDir: string): never {\n throw new Error(\n `Failed to resolve @geoql/oxlint-plugin-vue-doctor from ${fromDir}. Install it as a dependency of your project or use the bundled @geoql/vue-doctor CLI.`,\n );\n}\n\nexport function resolveOxlintBin(fromDir: string): string {\n const pkgJson = lookUpwards(fromDir, 'node_modules/oxlint/package.json');\n if (pkgJson) {\n return resolvePath(dirname(pkgJson), 'bin/oxlint');\n }\n const selfPkgJson = resolveFromSelf('oxlint/package.json');\n if (selfPkgJson) {\n return resolvePath(dirname(selfPkgJson), 'bin/oxlint');\n }\n throw new Error(\n `Failed to resolve oxlint from ${fromDir}. Install oxlint as a dependency of your project.`,\n );\n}\n","const STDERR_TAIL_LIMIT = 2000;\n\nexport class OxlintSpawnFailed extends Error {\n override name = 'OxlintSpawnFailed' as const;\n\n constructor(exitCode: number | null, stderr: string) {\n const tail = stderr.slice(-STDERR_TAIL_LIMIT);\n super(`oxlint subprocess exited with code ${exitCode}: ${tail}`);\n }\n}\n\nexport class OxlintOutputTooLarge extends Error {\n override name = 'OxlintOutputTooLarge' as const;\n\n constructor(maxBytes: number) {\n super(`oxlint subprocess output exceeded ${maxBytes} bytes`);\n }\n}\n","import { spawn } from 'node:child_process';\nimport { OxlintOutputTooLarge, OxlintSpawnFailed } from './errors.js';\nimport type {\n OxlintRawDiagnostic,\n OxlintRunOptions,\n OxlintRunResult,\n} from './types.js';\n\nexport const OXLINT_SPAWN_TIMEOUT_MS = 60_000;\nexport const OXLINT_MAX_OUTPUT_BYTES = 32 * 1024 * 1024;\n\ninterface OxlintJsonReport {\n diagnostics?: OxlintRawDiagnostic[];\n}\n\nfunction sanitizedEnv(): NodeJS.ProcessEnv {\n const env: NodeJS.ProcessEnv = { ...process.env };\n delete env.NODE_OPTIONS;\n for (const key of Object.keys(env)) {\n if (key.startsWith('npm_config_')) delete env[key];\n }\n return env;\n}\n\nexport async function runOxlint(\n opts: OxlintRunOptions,\n): Promise<OxlintRunResult> {\n return new Promise<OxlintRunResult>((resolve, reject) => {\n const args = ['-c', opts.configPath, '--format', 'json', opts.targetPath];\n const child = spawn(opts.oxlintBin, args, {\n cwd: opts.rootDir,\n stdio: ['ignore', 'pipe', 'pipe'],\n env: sanitizedEnv(),\n });\n const stdoutChunks: Buffer[] = [];\n const stderrChunks: Buffer[] = [];\n let stdoutBytes = 0;\n let settled = false;\n let timer: NodeJS.Timeout | undefined;\n const timeoutMs = opts.timeoutMs ?? OXLINT_SPAWN_TIMEOUT_MS;\n const maxOutputBytes = opts.maxOutputBytes ?? OXLINT_MAX_OUTPUT_BYTES;\n const finish = (fn: () => void): void => {\n if (settled) return;\n settled = true;\n if (timer) clearTimeout(timer);\n fn();\n };\n if (timeoutMs > 0) {\n timer = setTimeout(() => {\n child.kill('SIGKILL');\n finish(() =>\n reject(new Error(`oxlint subprocess timed out after ${timeoutMs}ms`)),\n );\n }, timeoutMs);\n }\n child.stdout.on('data', (chunk: Buffer) => {\n stdoutBytes += chunk.length;\n if (stdoutBytes > maxOutputBytes) {\n child.kill('SIGKILL');\n finish(() => reject(new OxlintOutputTooLarge(maxOutputBytes)));\n return;\n }\n stdoutChunks.push(chunk);\n });\n child.stderr.on('data', (chunk: Buffer) => stderrChunks.push(chunk));\n child.on('error', (err) => {\n finish(() => reject(err));\n });\n child.on('close', (exitCode) => {\n finish(() => {\n const stdout = Buffer.concat(stdoutChunks).toString('utf8');\n const stderr = Buffer.concat(stderrChunks).toString('utf8');\n const diagnostics = parseOxlintJsonStream(stdout);\n if (exitCode !== 0 && exitCode !== null && diagnostics.length === 0) {\n reject(new OxlintSpawnFailed(exitCode, stderr));\n return;\n }\n resolve({ diagnostics, stderr, exitCode });\n });\n });\n });\n}\n\nfunction parseOxlintJsonStream(stdout: string): OxlintRawDiagnostic[] {\n const trimmed = stdout.trim();\n if (!trimmed) return [];\n try {\n const parsed = JSON.parse(trimmed) as\n | OxlintJsonReport\n | OxlintRawDiagnostic[];\n if (Array.isArray(parsed)) return parsed;\n if (parsed.diagnostics) return parsed.diagnostics;\n } catch {\n return parseNdjson(trimmed);\n }\n return [];\n}\n\nfunction parseNdjson(text: string): OxlintRawDiagnostic[] {\n const out: OxlintRawDiagnostic[] = [];\n for (const line of text.split('\\n')) {\n const t = line.trim();\n if (!t) continue;\n try {\n const obj = JSON.parse(t) as OxlintRawDiagnostic;\n if (obj && typeof obj === 'object' && 'message' in obj) out.push(obj);\n } catch {\n // skip non-json line\n }\n }\n return out;\n}\n","import type { Diagnostic, Severity } from '../types.js';\nimport { toCanonicalDiagnostics } from './diagnostic.js';\nimport { generateOxlintConfig } from './generate-config.js';\nimport {\n resolveOxlintBin,\n resolveVueDoctorPluginPath,\n} from './resolve-plugin.js';\nimport { runOxlint } from './spawn.js';\n\nexport interface ScriptPassOptions {\n rootDir: string;\n targetPath: string;\n ruleOverrides?: Record<string, Severity | 'off'>;\n timeoutMs?: number;\n}\n\nexport interface ScriptPassResult {\n diagnostics: Diagnostic[];\n stderr: string;\n exitCode: number | null;\n}\n\nexport async function runScriptPass(\n opts: ScriptPassOptions,\n): Promise<ScriptPassResult> {\n const pluginPath = resolveVueDoctorPluginPath(opts.rootDir);\n const oxlintBin = resolveOxlintBin(opts.rootDir);\n const { configPath, cleanup } = await generateOxlintConfig({\n pluginPath,\n ruleOverrides: opts.ruleOverrides,\n rootDir: opts.rootDir,\n });\n try {\n const raw = await runOxlint({\n rootDir: opts.rootDir,\n targetPath: opts.targetPath,\n configPath,\n oxlintBin,\n timeoutMs: opts.timeoutMs,\n });\n return {\n diagnostics: toCanonicalDiagnostics(raw.diagnostics, opts.rootDir),\n stderr: raw.stderr,\n exitCode: raw.exitCode,\n };\n } finally {\n await cleanup();\n }\n}\n","import type { Diagnostic } from './types.js';\n\nconst SEVERITY_WEIGHTS = { error: 5, warn: 2, info: 0.5 } as const;\n\nexport interface ScoreBreakdownEntry {\n ruleId: string;\n occurrences: number;\n weightPerOccurrence: number;\n penalty: number;\n}\n\nexport interface ScoreResult {\n score: number;\n passed: boolean;\n threshold: number;\n totalFindings: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n breakdown: ScoreBreakdownEntry[];\n}\n\nexport interface ScoreConfig {\n rules?: Record<string, { weight?: number }>;\n threshold?: number;\n}\n\nexport function scoreDiagnostics(\n diagnostics: Diagnostic[],\n config?: ScoreConfig,\n): ScoreResult {\n const threshold = config?.threshold ?? 0;\n\n let errorCount = 0;\n let warnCount = 0;\n let infoCount = 0;\n\n const byRule = new Map<string, Diagnostic[]>();\n for (const d of diagnostics) {\n if (d.severity === 'error') errorCount += 1;\n else if (d.severity === 'warn') warnCount += 1;\n else infoCount += 1;\n\n const list = byRule.get(d.ruleId);\n if (list) list.push(d);\n else byRule.set(d.ruleId, [d]);\n }\n\n const sortedRuleIds = [...byRule.keys()].sort();\n const breakdown: ScoreBreakdownEntry[] = [];\n let penalty = 0;\n\n for (const ruleId of sortedRuleIds) {\n const list = byRule.get(ruleId)!;\n const weight =\n config?.rules?.[ruleId]?.weight ??\n SEVERITY_WEIGHTS[list[0].severity as keyof typeof SEVERITY_WEIGHTS];\n let rulePenalty = 0;\n for (let i = 0; i < list.length; i++) {\n rulePenalty += weight * (i === 0 ? 1 : 1 / Math.sqrt(i + 1));\n }\n penalty += rulePenalty;\n breakdown.push({\n ruleId,\n occurrences: list.length,\n weightPerOccurrence: weight,\n penalty: rulePenalty,\n });\n }\n\n breakdown.sort((a, b) => b.penalty - a.penalty);\n\n const score = Math.max(0, Math.round(100 - penalty));\n\n return {\n score,\n passed: score >= threshold,\n threshold,\n totalFindings: diagnostics.length,\n errorCount,\n warnCount,\n infoCount,\n breakdown,\n };\n}\n","import { readFile } from 'node:fs/promises';\nimport { parse, type SFCDescriptor } from '@vue/compiler-sfc';\n\nconst cache = new Map<string, SFCDescriptor | null>();\n\nexport async function parseSfcDescriptor(\n absPath: string,\n): Promise<SFCDescriptor | null> {\n if (cache.has(absPath)) return cache.get(absPath) ?? null;\n let source: string;\n try {\n source = await readFile(absPath, 'utf8');\n } catch {\n cache.set(absPath, null);\n return null;\n }\n const { descriptor, errors } = parse(source, { filename: absPath });\n if (errors.length > 0) {\n cache.set(absPath, null);\n return null;\n }\n cache.set(absPath, descriptor);\n return descriptor;\n}\n\nexport function clearSfcDescriptorCache(): void {\n cache.clear();\n}\n","import { parseSync } from 'oxc-parser';\nimport type { Diagnostic } from '../../types.js';\nimport type { SfcRuleContext, SfcRuleResult } from './types.js';\n\ntype Program = ReturnType<typeof parseSync>['program'];\ntype Node = Program['body'][number];\ntype ExportDefault = Extract<Node, { type: 'ExportDefaultDeclaration' }>;\ntype Declaration = ExportDefault['declaration'];\ntype ObjectExpr = Extract<Declaration, { type: 'ObjectExpression' }>;\ntype CallExpr = Extract<Declaration, { type: 'CallExpression' }>;\ntype Expression = CallExpr['callee'];\n\nconst RULE_ID = 'vue-doctor/sfc/no-mixed-options-and-composition-api';\n\nconst MESSAGE =\n 'Mixed Options API in a <script setup> SFC. Move data/methods/computed/watch/lifecycle into <script setup> Composition API; keep <script> only for options like name/inheritAttrs. See https://vuejs.org/api/sfc-script-setup.html#usage-alongside-normal-script';\n\nconst RECOMMENDATION =\n 'Move this option into the <script setup> block using the Composition API, or keep <script> only for options-only config such as name or inheritAttrs.';\n\nconst DISALLOWED = new Set<string>([\n 'data',\n 'methods',\n 'computed',\n 'watch',\n 'props',\n 'emits',\n 'provide',\n 'inject',\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeUnmount',\n 'unmounted',\n 'activated',\n 'deactivated',\n 'errorCaptured',\n 'serverPrefetch',\n]);\n\nfunction resolveDefineComponentCall(call: CallExpr): ObjectExpr | null {\n if (call.callee.type !== 'Identifier') return null;\n if (call.callee.name !== 'defineComponent') return null;\n const first = call.arguments[0];\n if (!first || first.type !== 'ObjectExpression') return null;\n return first;\n}\n\nfunction findBindingInit(body: Node[], name: string): Expression | null {\n for (const stmt of body) {\n if (stmt.type !== 'VariableDeclaration') continue;\n for (const declarator of stmt.declarations) {\n if (declarator.id.type !== 'Identifier') continue;\n if (declarator.id.name !== name) continue;\n return declarator.init;\n }\n }\n return null;\n}\n\nfunction resolveOptionsObject(program: Program): ObjectExpr | null {\n const exported = program.body.find(\n (node): node is ExportDefault => node.type === 'ExportDefaultDeclaration',\n );\n if (!exported) return null;\n const declaration = exported.declaration;\n if (declaration.type === 'ObjectExpression') return declaration;\n if (declaration.type === 'CallExpression') {\n return resolveDefineComponentCall(declaration);\n }\n if (declaration.type === 'Identifier') {\n const init = findBindingInit(program.body, declaration.name);\n if (init && init.type === 'CallExpression') {\n return resolveDefineComponentCall(init);\n }\n return null;\n }\n return null;\n}\n\nfunction locate(\n content: string,\n offset: number,\n startLine: number,\n startColumn: number,\n): { line: number; column: number } {\n let line = startLine;\n let lastNewline = -1;\n for (let i = 0; i < offset; i += 1) {\n if (content.charCodeAt(i) === 10) {\n line += 1;\n lastNewline = i;\n }\n }\n const column =\n lastNewline === -1 ? startColumn + offset : offset - lastNewline;\n return { line, column };\n}\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n const { script, scriptSetup } = ctx.descriptor;\n if (!script || !scriptSetup) return { diagnostics: [] };\n\n const lang = script.lang === 'ts' ? 'ts' : 'js';\n const { program } = parseSync(`script.${lang}`, script.content, {\n sourceType: 'module',\n lang,\n });\n\n const options = resolveOptionsObject(program);\n if (!options) return { diagnostics: [] };\n\n const diagnostics: Diagnostic[] = [];\n for (const property of options.properties) {\n if (property.type !== 'Property') continue;\n if (property.key.type !== 'Identifier') continue;\n if (!DISALLOWED.has(property.key.name)) continue;\n const { line, column } = locate(\n script.content,\n property.start,\n script.loc.start.line,\n script.loc.start.column,\n );\n diagnostics.push({\n file: ctx.file,\n line,\n column,\n ruleId: RULE_ID,\n severity: 'error',\n message: MESSAGE,\n source: 'sfc',\n recommendation: RECOMMENDATION,\n });\n }\n return { diagnostics };\n}\n","import { check as noMixedOptionsAndCompositionApi } from './no-mixed-options-and-composition-api.js';\nimport type { SfcRule } from './types.js';\n\nexport const SFC_RULES: SfcRule[] = [\n {\n id: 'vue-doctor/sfc/no-mixed-options-and-composition-api',\n check: noMixedOptionsAndCompositionApi,\n },\n];\n","import type { Diagnostic, Severity } from '../types.js';\nimport { parseSfcDescriptor } from './parse-sfc-descriptor.js';\nimport { SFC_RULES } from './rules/index.js';\n\nexport interface SfcPassOptions {\n files: string[];\n ruleOverrides?: Record<string, Severity | 'off'>;\n}\n\nexport async function runSfcPass(opts: SfcPassOptions): Promise<Diagnostic[]> {\n const all: Diagnostic[] = [];\n for (const file of opts.files) {\n if (!file.endsWith('.vue')) continue;\n const descriptor = await parseSfcDescriptor(file);\n if (!descriptor) continue;\n for (const rule of SFC_RULES) {\n const override = opts.ruleOverrides?.[rule.id];\n if (override === 'off') continue;\n const { diagnostics } = rule.check({ file, descriptor });\n for (const d of diagnostics) {\n all.push(override ? { ...d, severity: override } : d);\n }\n }\n }\n return all;\n}\n","import { readFile } from 'node:fs/promises';\nimport { parse, type SFCDescriptor } from '@vue/compiler-sfc';\n\nconst cache = new Map<string, SFCDescriptor | null>();\n\nexport async function parseSfc(absPath: string): Promise<SFCDescriptor | null> {\n if (cache.has(absPath)) return cache.get(absPath) ?? null;\n let source: string;\n try {\n source = await readFile(absPath, 'utf8');\n } catch {\n cache.set(absPath, null);\n return null;\n }\n const { descriptor, errors } = parse(source, { filename: absPath });\n if (errors.length > 0 || !descriptor.template) {\n cache.set(absPath, null);\n return null;\n }\n cache.set(absPath, descriptor);\n return descriptor;\n}\n\nexport function clearSfcCache(): void {\n cache.clear();\n}\n","import type {\n AttributeNode,\n DirectiveNode,\n ElementNode,\n} from '@vue/compiler-core';\n\nconst NODE_DIRECTIVE = 7;\n\nexport function findDirective(\n el: ElementNode,\n name: string,\n): DirectiveNode | undefined {\n for (const prop of el.props) {\n if (prop.type === NODE_DIRECTIVE && prop.name === name)\n return prop as DirectiveNode;\n }\n return undefined;\n}\n\nexport function findBindAttr(\n el: ElementNode,\n attrName: string,\n): DirectiveNode | undefined {\n for (const prop of el.props) {\n if (prop.type !== NODE_DIRECTIVE) continue;\n const dir = prop as DirectiveNode;\n if (dir.name !== 'bind') continue;\n const arg = dir.arg as { content?: string } | undefined;\n if (arg?.content === attrName) return dir;\n }\n return undefined;\n}\n\nexport function findStaticAttr(\n el: ElementNode,\n attrName: string,\n): AttributeNode | undefined {\n for (const prop of el.props) {\n if (prop.type === 6 && (prop as AttributeNode).name === attrName) {\n return prop as AttributeNode;\n }\n }\n return undefined;\n}\n","import type {\n ElementNode,\n RootNode,\n TemplateChildNode,\n} from '@vue/compiler-core';\n\nconst NODE_ELEMENT = 1;\n\nexport function isElementNode(\n node: { type: number } | undefined | null,\n): node is ElementNode {\n return node !== null && node !== undefined && node.type === NODE_ELEMENT;\n}\n\nexport type ElementVisitor = (node: ElementNode) => void;\n\nexport function walkElements(root: RootNode, visit: ElementVisitor): void {\n const stack: TemplateChildNode[] = [...root.children];\n while (stack.length > 0) {\n const node = stack.pop();\n if (!node) continue;\n if (isElementNode(node)) {\n visit(node);\n if (node.children) {\n for (const child of node.children) stack.push(child);\n }\n }\n }\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport {\n findBindAttr,\n findDirective,\n findStaticAttr,\n} from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n const vFor = findDirective(el, 'for');\n if (!vFor) return;\n const hasKey = findBindAttr(el, 'key') ?? findStaticAttr(el, 'key');\n if (hasKey) return;\n diagnostics.push({\n file: ctx.file,\n line: el.loc.start.line,\n column: el.loc.start.column,\n endLine: el.loc.end.line,\n endColumn: el.loc.end.column,\n ruleId: 'vue-doctor/template/v-for-has-key',\n severity: 'error',\n message: `<${el.tag}> uses v-for without :key. Vue cannot efficiently diff this list across renders.`,\n source: 'template',\n recommendation:\n 'Add :key with a stable, unique identifier from the iterated item.',\n });\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { findDirective } from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n const vIf = findDirective(el, 'if');\n const vFor = findDirective(el, 'for');\n if (!vIf || !vFor) return;\n diagnostics.push({\n file: ctx.file,\n line: el.loc.start.line,\n column: el.loc.start.column,\n endLine: el.loc.end.line,\n endColumn: el.loc.end.column,\n ruleId: 'vue-doctor/template/v-if-v-for-precedence',\n severity: 'error',\n message: `<${el.tag}> uses v-if and v-for on the same element. In Vue 3, v-if binds tighter than v-for, so the condition cannot reference loop variables.`,\n source: 'template',\n recommendation:\n 'Move the v-if to a <template v-for> wrapper or to a parent element, or filter the iterated source in a computed.',\n });\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport { babelParse } from '@vue/compiler-sfc';\nimport type { Diagnostic } from '../../types.js';\nimport { findDirective } from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst ARRAY_LITERAL_THRESHOLD = 100;\n\nfunction findLargeArrayBindings(script: string): Map<string, number> {\n const bindings = new Map<string, number>();\n try {\n const ast = babelParse(script, { sourceType: 'module' });\n for (const node of ast.program.body) {\n if (node.type !== 'VariableDeclaration') continue;\n if (node.kind !== 'const' && node.kind !== 'let') continue;\n for (const decl of node.declarations) {\n if (decl.id.type !== 'Identifier') continue;\n const init = decl.init;\n if (!init || init.type !== 'ArrayExpression') continue;\n if (!init.elements || init.elements.length <= ARRAY_LITERAL_THRESHOLD)\n continue;\n bindings.set(decl.id.name, init.elements.length);\n }\n }\n } catch {\n // ignore parse errors\n }\n return bindings;\n}\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n\n const largeArrays =\n ctx.script && ctx.script.length > 0\n ? findLargeArrayBindings(ctx.script)\n : new Map<string, number>();\n\n walkElements(ctx.template, (el: ElementNode) => {\n const vFor = findDirective(el, 'for');\n if (!vFor) return;\n\n const vMemo = findDirective(el, 'memo');\n if (vMemo) return;\n\n const source = vFor.forParseResult?.source;\n if (!source) return;\n\n const sourceName = source.content;\n const largeArraySize = largeArrays.get(sourceName);\n if (\n largeArraySize !== undefined &&\n largeArraySize > ARRAY_LITERAL_THRESHOLD\n ) {\n diagnostics.push({\n file: ctx.file,\n line: el.loc.start.line,\n column: el.loc.start.column,\n endLine: el.loc.end.line,\n endColumn: el.loc.end.column,\n ruleId: 'vue-doctor/template/v-memo-on-large-list',\n severity: 'warn',\n message: `<${el.tag}> uses v-for over a large dataset (array literal with ${largeArraySize} items) without v-memo. Vue cannot skip diffing this list on every render.`,\n source: 'template',\n recommendation:\n 'Add v-memo with a meaningful memoization key so Vue can skip re-rendering unchanged items.',\n });\n }\n });\n\n return { diagnostics };\n}\n","import type {\n ElementNode,\n RootNode,\n TemplateChildNode,\n} from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst NODE_DIRECTIVE = 7;\n\nfunction checkElement(\n el: ElementNode,\n inVForSubtree: boolean,\n ctx: TemplateRuleContext,\n diagnostics: Diagnostic[],\n): void {\n const isVFor = el.props.some(\n (p) => p.type === NODE_DIRECTIVE && (p as { name?: string }).name === 'for',\n );\n\n const effectiveInVFor = inVForSubtree || isVFor;\n\n if (effectiveInVFor) {\n for (const prop of el.props) {\n if (prop.type !== NODE_DIRECTIVE) continue;\n const dir = prop as {\n name?: string;\n arg?: { content?: string } | null;\n exp?: { ast?: { type?: string } | null } | null;\n loc: {\n start: { line: number; column: number };\n end: { line: number; column: number };\n };\n };\n if (dir.name !== 'bind') continue;\n\n const attrName = dir.arg?.content;\n if (!attrName || attrName === 'key') continue;\n\n const astType = dir.exp?.ast?.type;\n if (astType !== 'ObjectExpression' && astType !== 'ArrayExpression')\n continue;\n\n diagnostics.push({\n file: ctx.file,\n line: dir.loc.start.line,\n column: dir.loc.start.column,\n endLine: dir.loc.end.line,\n endColumn: dir.loc.end.column,\n ruleId: 'vue-doctor/template/no-inline-object-prop-in-list',\n severity: 'warn',\n message: `<${el.tag}> has an inline ${attrName} prop with an object or array literal inside a v-for subtree. Inline objects and arrays create new references on every render, defeating v-for's ability to reuse DOM nodes.`,\n source: 'template',\n recommendation:\n 'Move the object or array to a computed property or a module-level constant so the reference remains stable across renders.',\n });\n }\n }\n\n for (const child of el.children) {\n if (child.type === 1) {\n checkElement(child as ElementNode, effectiveInVFor, ctx, diagnostics);\n }\n }\n}\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n\n function walk(node: TemplateChildNode, inVForSubtree: boolean): void {\n if (node.type === 1) {\n checkElement(node as ElementNode, inVForSubtree, ctx, diagnostics);\n } else if (node.type === 0) {\n const root = node as RootNode;\n for (const child of root.children) {\n walk(child, inVForSubtree);\n }\n }\n }\n\n walk(ctx.template as unknown as TemplateChildNode, false);\n return { diagnostics };\n}\n","import type {\n ElementNode,\n RootNode,\n TemplateChildNode,\n} from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst NODE_ELEMENT = 1;\nconst NODE_INTERPOLATION = 5;\nconst NODE_DIRECTIVE = 7;\n\ninterface ExprNode {\n type?: string;\n computed?: boolean;\n name?: string;\n object?: ExprNode;\n property?: ExprNode;\n}\n\ninterface Loc {\n start: { line: number; column: number };\n end: { line: number; column: number };\n}\n\ninterface BindDirective {\n name?: string;\n exp?: { ast?: unknown } | null;\n loc: Loc;\n}\n\ninterface InterpolationNode {\n content: { ast?: unknown };\n loc: Loc;\n}\n\nfunction isValueDeref(node: ExprNode): boolean {\n if (node.type !== 'MemberExpression' || node.computed === true) return false;\n const { object, property } = node as {\n object: ExprNode;\n property: ExprNode;\n };\n return object.type === 'Identifier' && property.name === 'value';\n}\n\nfunction containsValueDeref(value: unknown): boolean {\n if (value === null || typeof value !== 'object') return false;\n if (Array.isArray(value)) {\n return value.some((item) => containsValueDeref(item));\n }\n const node = value as ExprNode;\n return (\n isValueDeref(node) ||\n Object.values(node).some((child) => containsValueDeref(child))\n );\n}\n\nfunction pushDiagnostic(\n el: ElementNode,\n loc: Loc,\n ctx: TemplateRuleContext,\n diagnostics: Diagnostic[],\n): void {\n diagnostics.push({\n file: ctx.file,\n line: loc.start.line,\n column: loc.start.column,\n endLine: loc.end.line,\n endColumn: loc.end.column,\n ruleId: 'vue-doctor/template/no-computed-getter-in-template-loop',\n severity: 'warn',\n message: `<${el.tag}> reads a ref or computed via .value inside a v-for subtree. The getter re-runs on every item and every render, which is easy to hoist out of the loop.`,\n source: 'template',\n recommendation:\n 'Read .value once into a computed property or a local binding outside the loop so the getter runs a single time per render.',\n });\n}\n\nfunction checkElement(\n el: ElementNode,\n inVForSubtree: boolean,\n ctx: TemplateRuleContext,\n diagnostics: Diagnostic[],\n): void {\n const isVFor = el.props.some(\n (p) => p.type === NODE_DIRECTIVE && (p as { name?: string }).name === 'for',\n );\n\n const effectiveInVFor = inVForSubtree || isVFor;\n\n if (effectiveInVFor) {\n for (const prop of el.props) {\n if (prop.type !== NODE_DIRECTIVE) continue;\n const dir = prop as BindDirective;\n if (dir.name !== 'bind') continue;\n if (containsValueDeref(dir.exp?.ast)) {\n pushDiagnostic(el, dir.loc, ctx, diagnostics);\n }\n }\n\n for (const child of el.children) {\n if (child.type === NODE_INTERPOLATION) {\n const interp = child as unknown as InterpolationNode;\n if (containsValueDeref(interp.content.ast)) {\n pushDiagnostic(el, interp.loc, ctx, diagnostics);\n }\n }\n }\n }\n\n for (const child of el.children) {\n if (child.type === NODE_ELEMENT) {\n checkElement(child as ElementNode, effectiveInVFor, ctx, diagnostics);\n }\n }\n}\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n\n function walk(node: TemplateChildNode, inVForSubtree: boolean): void {\n if (node.type === NODE_ELEMENT) {\n checkElement(node as ElementNode, inVForSubtree, ctx, diagnostics);\n } else if (node.type === 0) {\n const root = node as RootNode;\n for (const child of root.children) {\n walk(child, inVForSubtree);\n }\n }\n }\n\n walk(ctx.template as unknown as TemplateChildNode, false);\n return { diagnostics };\n}\n","import type {\n ElementNode,\n RootNode,\n TemplateChildNode,\n} from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst NODE_ELEMENT = 1;\nconst NODE_DIRECTIVE = 7;\n\ninterface SpreadDirective {\n name?: string;\n arg?: unknown;\n exp?: { ast?: unknown } | null;\n loc: {\n start: { line: number; column: number };\n end: { line: number; column: number };\n };\n}\n\nfunction isIdentifierSpread(dir: SpreadDirective): boolean {\n return dir.name === 'bind' && dir.arg === undefined && dir.exp?.ast === null;\n}\n\nfunction checkElement(\n el: ElementNode,\n inVForSubtree: boolean,\n ctx: TemplateRuleContext,\n diagnostics: Diagnostic[],\n): void {\n const isVFor = el.props.some(\n (p) => p.type === NODE_DIRECTIVE && (p as { name?: string }).name === 'for',\n );\n\n const effectiveInVFor = inVForSubtree || isVFor;\n\n if (effectiveInVFor) {\n for (const prop of el.props) {\n if (prop.type !== NODE_DIRECTIVE) continue;\n const dir = prop as SpreadDirective;\n if (!isIdentifierSpread(dir)) continue;\n diagnostics.push({\n file: ctx.file,\n line: dir.loc.start.line,\n column: dir.loc.start.column,\n endLine: dir.loc.end.line,\n endColumn: dir.loc.end.column,\n ruleId: 'vue-doctor/template/avoid-deep-v-bind-spread-in-list',\n severity: 'info',\n message: `<${el.tag}> spreads a whole object via v-bind inside a v-for subtree. Spreading a reactive object binds every property per item, which can churn props and defeat patching on large lists.`,\n source: 'template',\n recommendation:\n 'Bind only the props each item needs explicitly, or hoist a stable per-item object so Vue can patch instead of re-binding the full spread.',\n });\n }\n }\n\n for (const child of el.children) {\n if (child.type === NODE_ELEMENT) {\n checkElement(child as ElementNode, effectiveInVFor, ctx, diagnostics);\n }\n }\n}\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n\n function walk(node: TemplateChildNode, inVForSubtree: boolean): void {\n if (node.type === NODE_ELEMENT) {\n checkElement(node as ElementNode, inVForSubtree, ctx, diagnostics);\n } else if (node.type === 0) {\n const root = node as RootNode;\n for (const child of root.children) {\n walk(child, inVForSubtree);\n }\n }\n }\n\n walk(ctx.template as unknown as TemplateChildNode, false);\n return { diagnostics };\n}\n","import { check as vForHasKey } from './v-for-has-key.js';\nimport { check as vIfVForPrecedence } from './v-if-v-for-precedence.js';\nimport { check as vMemoOnLargeList } from './v-memo-on-large-list.js';\nimport { check as noInlineObjectPropInList } from './no-inline-object-prop-in-list.js';\nimport { check as noComputedGetterInTemplateLoop } from './no-computed-getter-in-template-loop.js';\nimport { check as avoidDeepVBindSpreadInList } from './avoid-deep-v-bind-spread-in-list.js';\nimport type { TemplateRule } from './types.js';\n\nexport const TEMPLATE_RULES: TemplateRule[] = [\n { id: 'vue-doctor/template/v-for-has-key', check: vForHasKey },\n { id: 'vue-doctor/template/v-if-v-for-precedence', check: vIfVForPrecedence },\n { id: 'vue-doctor/template/v-memo-on-large-list', check: vMemoOnLargeList },\n {\n id: 'vue-doctor/template/no-inline-object-prop-in-list',\n check: noInlineObjectPropInList,\n },\n {\n id: 'vue-doctor/template/no-computed-getter-in-template-loop',\n check: noComputedGetterInTemplateLoop,\n },\n {\n id: 'vue-doctor/template/avoid-deep-v-bind-spread-in-list',\n check: avoidDeepVBindSpreadInList,\n },\n];\n","import type { Diagnostic, Severity } from '../types.js';\nimport { parseSfc } from './parse-sfc.js';\nimport { TEMPLATE_RULES } from './rules/index.js';\n\nexport interface TemplatePassOptions {\n files: string[];\n ruleOverrides?: Record<string, Severity | 'off'>;\n}\n\nexport async function runTemplatePass(\n opts: TemplatePassOptions,\n): Promise<Diagnostic[]> {\n const all: Diagnostic[] = [];\n for (const file of opts.files) {\n if (!file.endsWith('.vue')) continue;\n const descriptor = await parseSfc(file);\n if (!descriptor?.template?.ast) continue;\n for (const rule of TEMPLATE_RULES) {\n const override = opts.ruleOverrides?.[rule.id];\n if (override === 'off') continue;\n const { diagnostics } = rule.check({\n file,\n template: descriptor.template.ast,\n script: descriptor.scriptSetup?.content ?? descriptor.script?.content,\n });\n for (const d of diagnostics) {\n all.push(override ? { ...d, severity: override } : d);\n }\n }\n }\n return all;\n}\n","import { resolve } from 'node:path';\nimport { performance } from 'node:perf_hooks';\nimport { checkBuildQuality } from './check-build-quality.js';\nimport { checkDeadCode } from './check-dead-code.js';\nimport { checkDeps } from './check-deps.js';\nimport { dedupeDeadCodeAgainstLint } from './dead-code/dedupe.js';\nimport { applyInlineDisables } from './disables/index.js';\nimport { attachCodeSnippets } from './code-snippet.js';\nimport { detectProject } from './detect-project.js';\nimport { listSourceFiles } from './file-scan.js';\nimport { mergeDiagnostics } from './merge-diagnostics.js';\nimport { runScriptPass } from './oxlint/run.js';\nimport type { ProjectInfoLite } from './reporters/types.js';\nimport { scoreDiagnostics } from './score.js';\nimport { runSfcPass } from './sfc/run.js';\nimport { runTemplatePass } from './template/run.js';\nimport type {\n AuditConfig,\n AuditReport,\n Diagnostic,\n AuditTimings,\n} from './types.js';\n\nconst DEFAULT_INCLUDE = [\n '**/*.vue',\n '**/*.ts',\n '**/*.tsx',\n '**/*.js',\n '**/*.jsx',\n];\nconst DEFAULT_EXCLUDE = [\n 'node_modules',\n 'dist',\n '.nuxt',\n '.output',\n 'coverage',\n];\n\nfunction countRuleCounts(diagnostics: Diagnostic[]): Record<string, number> {\n const counts: Record<string, number> = {};\n for (const d of diagnostics) {\n counts[d.ruleId] = (counts[d.ruleId] ?? 0) + 1;\n }\n return counts;\n}\n\nexport async function audit(config: AuditConfig = {}): Promise<AuditReport> {\n const rootDir = resolve(config.rootDir ?? process.cwd());\n const include = config.include ?? DEFAULT_INCLUDE;\n const exclude = config.exclude ?? DEFAULT_EXCLUDE;\n const failOn = config.failOn ?? 'error';\n const threshold = config.threshold ?? 0;\n const lintEnabled = config.lint !== false;\n\n const files = await listSourceFiles({ rootDir, include, exclude });\n\n const overallStart = performance.now();\n\n const templateStart = performance.now();\n const templateDiagnostics = lintEnabled\n ? await runTemplatePass({ files, ruleOverrides: config.rules })\n : [];\n const templateElapsed = performance.now() - templateStart;\n\n const sfcStart = performance.now();\n const sfcDiagnostics = lintEnabled\n ? await runSfcPass({ files, ruleOverrides: config.rules })\n : [];\n const sfcElapsed = performance.now() - sfcStart;\n\n let scriptDiagnostics: Diagnostic[] = [];\n let oxlintStderr = '';\n const scriptStart = performance.now();\n if (lintEnabled) {\n try {\n const result = await runScriptPass({\n rootDir,\n targetPath: rootDir,\n ruleOverrides: config.rules,\n });\n scriptDiagnostics = result.diagnostics;\n oxlintStderr = result.stderr;\n } catch (err) {\n oxlintStderr = err instanceof Error ? err.message : String(err);\n if (process.env.DOCTOR_DEBUG) {\n process.stderr.write(\n `[doctor-core] script pass failed: ${oxlintStderr}\\n`,\n );\n }\n }\n }\n const scriptElapsed = performance.now() - scriptStart;\n\n const project = await detectProject(rootDir);\n\n let deadCodeDiagnostics: Diagnostic[] = [];\n let deadCodeElapsed = 0;\n const deadCodeEnabled = config.deadCode !== false;\n if (deadCodeEnabled) {\n const deadCodeStart = performance.now();\n try {\n const { loadDoctorConfig } = await import('./config/load.js');\n const doctorConfig = await loadDoctorConfig(rootDir);\n const raw = await checkDeadCode({\n projectInfo: project,\n doctorConfig,\n enabled: true,\n });\n const deduplicated = dedupeDeadCodeAgainstLint(raw, [\n ...templateDiagnostics,\n ...sfcDiagnostics,\n ...scriptDiagnostics,\n ]);\n deadCodeDiagnostics = deduplicated.filter(\n (d) => config.rules?.[d.ruleId] !== 'off',\n );\n } catch {\n // knip failed — diagnostics remain empty for this pass\n }\n deadCodeElapsed = performance.now() - deadCodeStart;\n }\n\n let buildQualityDiagnostics: Diagnostic[] = [];\n try {\n const raw = await checkBuildQuality(project);\n buildQualityDiagnostics = raw\n .filter((d) => config.rules?.[d.ruleId] !== 'off')\n .map((d) => {\n const override = config.rules?.[d.ruleId];\n return override ? { ...d, severity: override } : d;\n });\n } catch {\n // build-quality pass failed — diagnostics remain empty for this pass\n }\n\n let depsDiagnostics: Diagnostic[] = [];\n try {\n const raw = await checkDeps(project);\n depsDiagnostics = raw\n .filter((d) => config.rules?.[d.ruleId] !== 'off')\n .map((d) => {\n const override = config.rules?.[d.ruleId];\n return override ? { ...d, severity: override } : d;\n });\n } catch {\n // deps pass failed — diagnostics remain empty for this pass\n }\n\n const elapsedMs = performance.now() - overallStart;\n\n const timings: AuditTimings = {\n template: templateElapsed,\n sfc: sfcElapsed,\n script: scriptElapsed,\n deadCode: deadCodeElapsed,\n total: elapsedMs,\n };\n\n const merged = mergeDiagnostics(\n templateDiagnostics,\n sfcDiagnostics,\n scriptDiagnostics,\n deadCodeDiagnostics,\n buildQualityDiagnostics,\n depsDiagnostics,\n );\n let afterDisables = applyInlineDisables(merged, {\n respect: config.respectInlineDisables !== false,\n });\n if (config.scopeFiles) {\n const scope = new Set(config.scopeFiles.map((f) => resolve(rootDir, f)));\n afterDisables = afterDisables.filter((d) =>\n scope.has(resolve(rootDir, d.file)),\n );\n }\n const diagnostics = await attachCodeSnippets(afterDisables);\n const scored = scoreDiagnostics(diagnostics, { threshold });\n\n const ruleCounts = countRuleCounts(diagnostics);\n\n const projectInfo: ProjectInfoLite = {\n framework: project.framework,\n vueVersion: project.vueVersion,\n nuxtVersion: project.nuxtVersion,\n capabilities: [...project.capabilities].sort(),\n rootDirectory: project.rootDirectory,\n };\n\n let exitCode: 0 | 1 | 2 = 0;\n if (\n oxlintStderr &&\n scriptDiagnostics.length === 0 &&\n oxlintStderr.includes('Failed')\n ) {\n exitCode = 2;\n } else if (failOn !== 'none') {\n const tripping =\n failOn === 'warn'\n ? scored.errorCount + scored.warnCount\n : scored.errorCount;\n if (tripping > 0) exitCode = 1;\n }\n\n return {\n rootDir,\n filesScanned: files.length,\n diagnostics,\n score: scored.score,\n errorCount: scored.errorCount,\n warnCount: scored.warnCount,\n infoCount: scored.infoCount,\n exitCode,\n scoreResult: scored,\n projectInfo,\n elapsedMs,\n timings,\n ruleCounts,\n };\n}\n","import type { DoctorUserConfig } from './types.js';\n\nexport function defineConfig<T extends DoctorUserConfig>(config: T): T {\n return config;\n}\n","import type { ResolvedDoctorConfig } from './types.js';\nimport type { Severity } from '../types.js';\n\nexport interface CliOverrides {\n include?: string[];\n exclude?: string[];\n failOn?: 'error' | 'warn' | 'none';\n threshold?: number;\n rules?: Record<string, Severity | 'off'>;\n}\n\nexport function mergeCliOverrides(\n resolved: ResolvedDoctorConfig,\n cli: CliOverrides,\n): ResolvedDoctorConfig {\n const rules = { ...resolved.rules };\n\n if (cli.rules) {\n for (const [key, value] of Object.entries(cli.rules)) {\n if (value === 'off') {\n delete rules[key];\n } else {\n rules[key] = value;\n }\n }\n }\n\n return {\n rootDir: resolved.rootDir,\n include: cli.include ?? resolved.include,\n exclude: cli.exclude ?? resolved.exclude,\n failOn: cli.failOn ?? resolved.failOn,\n threshold: cli.threshold ?? resolved.threshold,\n rules,\n source: resolved.source,\n configFile: resolved.configFile,\n };\n}\n","import { execFile } from 'node:child_process';\nimport { resolve } from 'node:path';\nimport { promisify } from 'node:util';\n\nconst execFileAsync = promisify(execFile);\n\nexport type GitScopeMode = 'diff' | 'staged';\n\nconst SOURCE_EXTENSIONS = ['.vue', '.ts', '.tsx', '.js', '.jsx'];\n\nfunction isSourceFile(path: string): boolean {\n return SOURCE_EXTENSIONS.some((ext) => path.endsWith(ext));\n}\n\nexport interface GitScopeOptions {\n rootDir: string;\n mode: GitScopeMode;\n}\n\nasync function gitLines(rootDir: string, args: string[]): Promise<string[]> {\n const { stdout } = await execFileAsync('git', args, { cwd: rootDir });\n return stdout\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0);\n}\n\nexport async function listChangedFiles(\n options: GitScopeOptions,\n): Promise<string[]> {\n const { rootDir, mode } = options;\n\n let relPaths: string[];\n if (mode === 'staged') {\n relPaths = await gitLines(rootDir, [\n 'diff',\n '--name-only',\n '--cached',\n '--diff-filter=ACMR',\n ]);\n } else {\n const tracked = await gitLines(rootDir, [\n 'diff',\n '--name-only',\n 'HEAD',\n '--diff-filter=ACMR',\n ]);\n const untracked = await gitLines(rootDir, [\n 'ls-files',\n '--others',\n '--exclude-standard',\n ]);\n relPaths = [...tracked, ...untracked];\n }\n\n const absolute = relPaths\n .filter(isSourceFile)\n .map((rel) => resolve(rootDir, rel));\n return [...new Set(absolute)].sort();\n}\n","export function docsUrl(ruleId: string): string {\n return `https://docs.doctor.geoql.in/rules/${ruleId}`;\n}\n","import { relative } from 'node:path';\nimport type { ScoreBreakdownEntry, ScoreResult } from '../score.js';\nimport type { Diagnostic, Severity } from '../types.js';\nimport { docsUrl } from './docs-url.js';\nimport type { ReporterInput, ReporterOptions } from './types.js';\n\nconst CODE_WIDTH = 80;\nconst WHY_WIDTH = 70;\nconst SEVERITY_WIDTH = 6;\nconst CONTINUATION_INDENT = ' '.repeat(10);\n\nexport interface Theme {\n severity: (severity: Severity) => string;\n scoreValue: (score: number) => string;\n}\n\nfunction relativize(file: string, rootDirectory: string): string {\n return relative(rootDirectory, file).replaceAll('\\\\', '/');\n}\n\nexport function compareStrings(a: string, b: string): number {\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n}\n\nfunction truncateCode(code: string): string {\n if (code.length <= CODE_WIDTH) return code;\n return `${code.slice(0, CODE_WIDTH - 1)}…`;\n}\n\nfunction wrapText(text: string, width: number): string[] {\n const words = text.trim().split(/\\s+/);\n const lines: string[] = [];\n let current = '';\n for (const word of words) {\n if (current === '') {\n current = word;\n } else if (`${current} ${word}`.length <= width) {\n current = `${current} ${word}`;\n } else {\n lines.push(current);\n current = word;\n }\n }\n if (current !== '') lines.push(current);\n return lines;\n}\n\nfunction formatWhy(message: string): string {\n return wrapText(message, WHY_WIDTH).join(`\\n${CONTINUATION_INDENT}`);\n}\n\nfunction severityTag(severity: Severity, theme: Theme): string {\n const padding = ' '.repeat(SEVERITY_WIDTH - severity.length);\n return `${theme.severity(severity)}${padding}`;\n}\n\nfunction sortDiagnostics(\n diagnostics: readonly Diagnostic[],\n rootDirectory: string,\n): Diagnostic[] {\n return [...diagnostics].sort((a, b) => {\n const byFile = compareStrings(\n relativize(a.file, rootDirectory),\n relativize(b.file, rootDirectory),\n );\n if (byFile !== 0) return byFile;\n if (a.line !== b.line) return a.line - b.line;\n if (a.column !== b.column) return a.column - b.column;\n return compareStrings(a.ruleId, b.ruleId);\n });\n}\n\nfunction diagnosticBlock(\n index: number,\n diagnostic: Diagnostic,\n rootDirectory: string,\n theme: Theme,\n): string {\n const tag = severityTag(diagnostic.severity, theme);\n const location = `${relativize(diagnostic.file, rootDirectory)}:${diagnostic.line}:${diagnostic.column}`;\n const code = truncateCode(diagnostic.codeSnippet ?? '');\n const fix = diagnostic.recommendation ?? '(no automated fix)';\n const why = formatWhy(diagnostic.message);\n return [\n `[${index}] ${tag} ${diagnostic.ruleId}`,\n ` file: ${location}`,\n ` code: ${code}`,\n ` fix: ${fix}`,\n ` why: ${why}`,\n ` docs: ${docsUrl(diagnostic.ruleId)}`,\n ].join('\\n');\n}\n\nfunction findingsLine(score: ScoreResult): string {\n if (score.totalFindings === 0) return 'FINDINGS: 0 (clean)';\n return `FINDINGS: ${score.totalFindings} (${score.errorCount} error, ${score.warnCount} warn, ${score.infoCount} info)`;\n}\n\nfunction nextSteps(breakdown: readonly ScoreBreakdownEntry[]): string {\n const top = breakdown.slice(0, 3);\n const lines = top.map(\n (entry) =>\n ` −${Math.round(entry.penalty)} pts ${entry.occurrences}× ${entry.ruleId}`,\n );\n lines.push(\n ` Run \\`vue-doctor explain ${breakdown[0]!.ruleId}\\` for full context.`,\n );\n return ['NEXT STEPS:', ...lines].join('\\n');\n}\n\nexport function render(\n input: ReporterInput,\n options: ReporterOptions | undefined,\n theme: Theme,\n): string {\n if (options?.quiet) {\n return `SCORE: ${theme.scoreValue(input.score.score)}/100 (threshold: ${input.score.threshold})\\n`;\n }\n\n const seconds = (input.elapsedMs / 1000).toFixed(1);\n const segments: string[] = [\n `${input.toolName} v${input.toolVersion}`,\n `analyzed ${input.analyzedFileCount} files in ${seconds}s`,\n '',\n `SCORE: ${theme.scoreValue(input.score.score)}/100 (threshold: ${input.score.threshold})`,\n '',\n findingsLine(input.score),\n ];\n\n const sorted = sortDiagnostics(input.diagnostics, input.rootDirectory);\n sorted.forEach((diagnostic, i) => {\n segments.push('');\n segments.push(\n diagnosticBlock(i + 1, diagnostic, input.rootDirectory, theme),\n );\n });\n\n if (input.score.breakdown.length > 0) {\n segments.push('');\n segments.push(nextSteps(input.score.breakdown));\n }\n\n return `${segments.join('\\n')}\\n`;\n}\n","import { render, type Theme } from './render.js';\nimport type { ReporterInput, ReporterOptions } from './types.js';\n\nconst plainTheme: Theme = {\n severity: (severity) => severity,\n scoreValue: (score) => String(score),\n};\n\nexport function agentReport(\n input: ReporterInput,\n options?: ReporterOptions,\n): string {\n return render(input, options, plainTheme);\n}\n","import { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { docsUrl } from './reporters/docs-url.js';\nimport { RULE_REGISTRY } from './rule-registry.js';\nimport type { RegisteredRule } from './rule-registry.js';\n\nexport interface RuleDoc {\n readonly id: string;\n readonly title: string;\n readonly severity: string;\n readonly category: string;\n readonly recommended: boolean;\n readonly source: string;\n readonly helpUri: string;\n readonly description: string;\n readonly hasOverride: boolean;\n}\n\nfunction autoDescription(rule: RegisteredRule): string {\n const presetNote = rule.recommended\n ? 'Active in the `recommended` preset.'\n : 'Off by default in `recommended`; enable via `--rule <id>:warn` or in `doctor.config.ts`.';\n return `\\`${rule.id}\\` is a ${rule.severity}-severity ${rule.category} rule from ${rule.source}. ${presetNote}\\n\\nSee ${docsUrl(rule.id)} for details when the docs site lands.`;\n}\n\nfunction resolveDocsRoot(): string {\n const here = dirname(fileURLToPath(import.meta.url));\n return resolve(here, '..', 'docs', 'rules');\n}\n\nfunction safeReadOverride(ruleId: string, docsRoot: string): string | null {\n const safeName = `${ruleId.replace(/\\//g, '__')}.md`;\n const candidate = join(docsRoot, safeName);\n if (!existsSync(candidate)) return null;\n return readFileSync(candidate, 'utf-8');\n}\n\nexport interface LoadRuleDocOptions {\n readonly docsRoot?: string;\n}\n\nexport function loadRuleDoc(\n ruleId: string,\n options: LoadRuleDocOptions = {},\n): RuleDoc | null {\n const rule = RULE_REGISTRY.find((r) => r.id === ruleId);\n if (!rule) return null;\n const docsRoot = options.docsRoot ?? resolveDocsRoot();\n const override = safeReadOverride(ruleId, docsRoot);\n const description = override ?? autoDescription(rule);\n return {\n id: rule.id,\n title: rule.id,\n severity: rule.severity,\n category: rule.category,\n recommended: rule.recommended,\n source: rule.source,\n helpUri: docsUrl(rule.id),\n description,\n hasOverride: override !== null,\n };\n}\n\nexport function loadAllRuleDocs(options: LoadRuleDocOptions = {}): RuleDoc[] {\n return RULE_REGISTRY.map((rule) => loadRuleDoc(rule.id, options) as RuleDoc);\n}\n","import { loadRuleDoc } from '../rule-docs.js';\nimport { RULE_REGISTRY } from '../rule-registry.js';\nimport type { Diagnostic, Severity } from '../types.js';\nimport { docsUrl } from './docs-url.js';\nimport type { ReporterInput } from './types.js';\n\nconst SARIF_SCHEMA =\n 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json' as const;\nconst INFORMATION_URI = 'https://github.com/geoql/doctor';\n\ntype SarifLevel = 'error' | 'warning' | 'note';\n\ninterface SarifReportingDescriptor {\n id: string;\n name: string;\n shortDescription: { text: string };\n fullDescription: { text: string };\n helpUri: string;\n defaultConfiguration: { level: SarifLevel };\n properties: { category: string };\n}\n\ninterface SarifLocation {\n physicalLocation: {\n artifactLocation: { uri: string; uriBaseId: '%SRCROOT%' };\n region: {\n startLine: number;\n startColumn: number;\n endLine?: number;\n endColumn?: number;\n };\n };\n}\n\ninterface SarifResult {\n ruleId: string;\n level: SarifLevel;\n message: { text: string };\n locations: SarifLocation[];\n partialFingerprints: { primaryLocationLineHash: string };\n}\n\ninterface SarifLog {\n $schema: typeof SARIF_SCHEMA;\n version: '2.1.0';\n runs: [\n {\n tool: {\n driver: {\n name: string;\n version: string;\n informationUri: string;\n rules: SarifReportingDescriptor[];\n };\n };\n results: SarifResult[];\n },\n ];\n}\n\nfunction toSarifLevel(severity: Severity): SarifLevel {\n if (severity === 'error') return 'error';\n if (severity === 'warn') return 'warning';\n return 'note';\n}\n\nfunction toRelativeUri(filePath: string, rootDirectory: string): string {\n const normalizedRoot = rootDirectory.endsWith('/')\n ? rootDirectory\n : `${rootDirectory}/`;\n if (filePath.startsWith(normalizedRoot)) {\n return filePath.slice(normalizedRoot.length);\n }\n return filePath;\n}\n\nfunction toSarifResult(diag: Diagnostic, rootDirectory: string): SarifResult {\n const region: SarifLocation['physicalLocation']['region'] = {\n startLine: diag.line,\n startColumn: diag.column,\n };\n if (diag.endLine !== undefined) region.endLine = diag.endLine;\n if (diag.endColumn !== undefined) region.endColumn = diag.endColumn;\n const uri = toRelativeUri(diag.file, rootDirectory);\n return {\n ruleId: diag.ruleId,\n level: toSarifLevel(diag.severity),\n message: { text: diag.message },\n locations: [\n {\n physicalLocation: {\n artifactLocation: { uri, uriBaseId: '%SRCROOT%' },\n region,\n },\n },\n ],\n partialFingerprints: {\n primaryLocationLineHash: `${uri}:${diag.line}:${diag.ruleId}`,\n },\n };\n}\n\nfunction collectRuleIds(diagnostics: Diagnostic[]): Set<string> {\n const ids = new Set<string>();\n for (const d of diagnostics) ids.add(d.ruleId);\n return ids;\n}\n\nfunction toRuleDescriptor(ruleId: string): SarifReportingDescriptor {\n const registered = RULE_REGISTRY.find((r) => r.id === ruleId);\n const severity: Severity = registered?.severity ?? 'warn';\n const category = registered?.category ?? 'doctor-owned';\n const name = ruleId.includes('/')\n ? ruleId.split('/').slice(1).join('/')\n : ruleId;\n const doc = loadRuleDoc(ruleId);\n const fullDescription = doc?.description ?? ruleId;\n return {\n id: ruleId,\n name,\n shortDescription: { text: ruleId },\n fullDescription: { text: fullDescription },\n helpUri: docsUrl(ruleId),\n defaultConfiguration: { level: toSarifLevel(severity) },\n properties: { category },\n };\n}\n\nexport function sarifReport(input: ReporterInput): string {\n const ids = collectRuleIds(input.diagnostics);\n const rules = [...ids].sort().map(toRuleDescriptor);\n const results = input.diagnostics.map((d) =>\n toSarifResult(d, input.rootDirectory),\n );\n const log: SarifLog = {\n $schema: SARIF_SCHEMA,\n version: '2.1.0',\n runs: [\n {\n tool: {\n driver: {\n name: input.toolName,\n version: input.toolVersion,\n informationUri: INFORMATION_URI,\n rules,\n },\n },\n results,\n },\n ],\n };\n return `${JSON.stringify(log, null, 2)}\\n`;\n}\n","import { docsUrl } from './docs-url.js';\nimport type { ReporterInput } from './types.js';\nimport type { Diagnostic, Severity } from '../types.js';\n\nconst SEVERITY_LABEL: Record<Severity, string> = {\n error: 'Error',\n warn: 'Warn',\n info: 'Info',\n};\n\nfunction escapeHtml(s: string): string {\n return s\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\nfunction relativize(file: string, rootDir: string): string {\n return file.startsWith(`${rootDir}/`) ? file.slice(rootDir.length + 1) : file;\n}\n\nfunction renderDiagnosticRow(d: Diagnostic, rootDir: string): string {\n const loc = `${escapeHtml(relativize(d.file, rootDir))}:${d.line}:${d.column}`;\n const recommendation = d.recommendation\n ? `<div class=\"rec\"><strong>Fix:</strong> ${escapeHtml(d.recommendation)}</div>`\n : '';\n return [\n `<details class=\"finding sev-${d.severity}\">`,\n ` <summary>`,\n ` <span class=\"sev\">${SEVERITY_LABEL[d.severity]}</span>`,\n ` <code class=\"rule\">${escapeHtml(d.ruleId)}</code>`,\n ` <span class=\"loc\">${loc}</span>`,\n ` <span class=\"msg\">${escapeHtml(d.message)}</span>`,\n ` </summary>`,\n ` <div class=\"body\">`,\n recommendation,\n ` <div class=\"docs\"><a href=\"${escapeHtml(docsUrl(d.ruleId))}\" target=\"_blank\" rel=\"noopener\">Rule docs</a></div>`,\n ` </div>`,\n `</details>`,\n ].join('\\n');\n}\n\nconst STYLES = `\n* { box-sizing: border-box; margin: 0; padding: 0; }\nbody { font: 14px/1.5 system-ui, -apple-system, sans-serif; background: #0f0f0f; color: #e5e5e5; padding: 2rem; }\nheader { border-bottom: 1px solid #2a2a2a; padding-bottom: 1.5rem; margin-bottom: 1.5rem; }\nh1 { font-size: 1.25rem; font-weight: 500; color: #fafafa; }\n.meta { color: #888; margin-top: 0.5rem; font-size: 0.85rem; }\n.score-row { display: flex; gap: 2rem; margin-top: 1rem; align-items: baseline; }\n.score-row .score { font-size: 3rem; font-weight: 200; color: #fafafa; }\n.score-row .score.pass { color: #4ade80; }\n.score-row .score.fail { color: #f87171; }\n.score-row .breakdown { color: #aaa; font-size: 0.9rem; }\n.finding { border: 1px solid #2a2a2a; border-radius: 6px; margin-bottom: 0.5rem; background: #1a1a1a; overflow: hidden; }\n.finding summary { padding: 0.75rem 1rem; cursor: pointer; display: grid; grid-template-columns: 4rem 14rem 14rem 1fr; gap: 0.75rem; align-items: baseline; font-size: 0.85rem; list-style: none; }\n.finding summary::-webkit-details-marker { display: none; }\n.sev { font-size: 0.7rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }\n.sev-error .sev { color: #f87171; }\n.sev-warn .sev { color: #fbbf24; }\n.sev-info .sev { color: #60a5fa; }\n.rule { color: #aaa; font-family: ui-monospace, monospace; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.loc { color: #888; font-family: ui-monospace, monospace; font-size: 0.8rem; }\n.msg { color: #d4d4d4; }\n.body { padding: 0 1rem 1rem; border-top: 1px solid #2a2a2a; color: #ccc; font-size: 0.85rem; }\n.rec { margin-top: 0.75rem; }\n.docs { margin-top: 0.5rem; }\n.docs a { color: #60a5fa; text-decoration: none; }\n.docs a:hover { text-decoration: underline; }\n.empty { color: #888; padding: 2rem 0; text-align: center; }\n`;\n\nexport function htmlReport(input: ReporterInput): string {\n const score = input.score.score;\n const pass = input.score.passed;\n const rows = input.diagnostics\n .map((d) => renderDiagnosticRow(d, input.rootDirectory))\n .join('\\n');\n const body =\n input.diagnostics.length === 0\n ? `<p class=\"empty\">No findings. Clean run.</p>`\n : rows;\n const findingsLabel = `${input.diagnostics.length} finding${input.diagnostics.length === 1 ? '' : 's'}`;\n const meta = `${input.toolName} v${input.toolVersion} · ${input.analyzedFileCount} file${input.analyzedFileCount === 1 ? '' : 's'} · ${input.elapsedMs.toFixed(0)}ms`;\n return `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"UTF-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n<title>${escapeHtml(input.toolName)} — Report</title>\n<style>${STYLES}</style>\n</head>\n<body>\n<header>\n <h1>${escapeHtml(input.toolName)} report</h1>\n <div class=\"meta\">${escapeHtml(meta)} · ${escapeHtml(input.rootDirectory)}</div>\n <div class=\"score-row\">\n <div class=\"score ${pass ? 'pass' : 'fail'}\">${score}<span style=\"font-size:1.5rem;color:#888\">/100</span></div>\n <div class=\"breakdown\">${findingsLabel} · ${input.score.errorCount} error · ${input.score.warnCount} warn · ${input.score.infoCount} info</div>\n </div>\n</header>\n<main>\n${body}\n</main>\n</body>\n</html>\n`;\n}\n","import { relative } from 'node:path';\nimport type { Severity } from '../types.js';\nimport type { ReporterInput } from './types.js';\n\nexport const DOCTOR_REPORT_SCHEMA_VERSION = '1';\n\nexport interface DoctorReportDiagnostic {\n file: string;\n line: number;\n column: number;\n endLine?: number;\n endColumn?: number;\n ruleId: string;\n severity: Severity;\n message: string;\n source: string;\n recommendation?: string;\n}\n\nexport interface DoctorReportBreakdownEntry {\n ruleId: string;\n occurrences: number;\n weightPerOccurrence: number;\n penalty: number;\n}\n\nexport interface DoctorReport {\n schemaVersion: string;\n tool: { name: string; version: string };\n projectInfo: {\n framework: string;\n vueVersion: string | null;\n nuxtVersion: string | null;\n capabilities: string[];\n rootDirectory: string;\n };\n score: {\n value: number;\n threshold: number;\n passed: boolean;\n bySeverity: { error: number; warn: number; info: number };\n breakdown: DoctorReportBreakdownEntry[];\n };\n diagnostics: DoctorReportDiagnostic[];\n timing: { elapsedMs: number; analyzedFileCount: number };\n}\n\nexport function buildDoctorReport(input: ReporterInput): DoctorReport {\n return {\n schemaVersion: DOCTOR_REPORT_SCHEMA_VERSION,\n tool: { name: input.toolName, version: input.toolVersion },\n projectInfo: {\n framework: input.projectInfo.framework,\n vueVersion: input.projectInfo.vueVersion,\n nuxtVersion: input.projectInfo.nuxtVersion,\n capabilities: [...input.projectInfo.capabilities].sort(),\n rootDirectory: input.projectInfo.rootDirectory,\n },\n score: {\n value: input.score.score,\n threshold: input.score.threshold,\n passed: input.score.passed,\n bySeverity: {\n error: input.score.errorCount,\n warn: input.score.warnCount,\n info: input.score.infoCount,\n },\n breakdown: input.score.breakdown.map((entry) => ({\n ruleId: entry.ruleId,\n occurrences: entry.occurrences,\n weightPerOccurrence: entry.weightPerOccurrence,\n penalty: entry.penalty,\n })),\n },\n diagnostics: input.diagnostics.map((d) => ({\n file: relative(input.rootDirectory, d.file).replaceAll('\\\\', '/'),\n line: d.line,\n column: d.column,\n endLine: d.endLine,\n endColumn: d.endColumn,\n ruleId: d.ruleId,\n severity: d.severity,\n message: d.message,\n source: d.source,\n recommendation: d.recommendation,\n })),\n timing: {\n elapsedMs: input.elapsedMs,\n analyzedFileCount: input.analyzedFileCount,\n },\n };\n}\n\nexport function jsonReport(input: ReporterInput): string {\n return JSON.stringify(buildDoctorReport(input), null, 2);\n}\n","import { buildDoctorReport } from './json.js';\nimport type { ReporterInput } from './types.js';\n\nexport function jsonCompactReport(input: ReporterInput): string {\n return `${JSON.stringify(buildDoctorReport(input))}\\n`;\n}\n","import process from 'node:process';\nimport pc from 'picocolors';\nimport { agentReport } from './agent.js';\nimport { render, type Theme } from './render.js';\nimport type { ReporterInput, ReporterOptions } from './types.js';\n\nconst colors = pc.createColors(true);\n\nconst colorTheme: Theme = {\n severity: (severity) => {\n if (severity === 'error') return colors.red(severity);\n if (severity === 'warn') return colors.yellow(severity);\n return colors.cyan(severity);\n },\n scoreValue: (score) => {\n if (score <= 50) return colors.red(String(score));\n if (score <= 79) return colors.yellow(String(score));\n return colors.green(String(score));\n },\n};\n\nexport function prettyReport(\n input: ReporterInput,\n options?: ReporterOptions,\n): string {\n const noColor = options?.color === false || Boolean(process.env.NO_COLOR);\n if (noColor) return agentReport(input, options);\n return render(input, options, colorTheme);\n}\n","import type { AuditReport } from '../types.js';\nimport type { ConfigSource } from '../config/types.js';\n\nexport interface VerboseTraceOptions {\n configSource?: ConfigSource;\n}\n\nfunction formatMs(ms: number): string {\n return `${ms.toFixed(1)}ms`;\n}\n\nexport function renderVerboseTrace(\n report: AuditReport,\n options: VerboseTraceOptions,\n): string {\n const lines: string[] = [];\n lines.push('TIMINGS');\n lines.push(` template: ${formatMs(report.timings.template)}`);\n lines.push(` sfc: ${formatMs(report.timings.sfc)}`);\n lines.push(` script: ${formatMs(report.timings.script)}`);\n lines.push(` deadCode: ${formatMs(report.timings.deadCode)}`);\n lines.push(` total: ${formatMs(report.timings.total)}`);\n\n const ruleKeys = Object.keys(report.ruleCounts);\n if (ruleKeys.length > 0) {\n lines.push('RULE COUNTS');\n for (const ruleId of ruleKeys.sort()) {\n lines.push(` ${ruleId}: ${report.ruleCounts[ruleId]}`);\n }\n }\n\n if (options.configSource) {\n lines.push('CONFIG');\n lines.push(` source: ${options.configSource}`);\n }\n\n return lines.join('\\n');\n}\n","import { agentReport } from './agent.js';\nimport { htmlReport } from './html.js';\nimport { jsonCompactReport } from './json-compact.js';\nimport { jsonReport } from './json.js';\nimport { prettyReport } from './pretty.js';\nimport { sarifReport } from './sarif.js';\nimport { renderVerboseTrace, type VerboseTraceOptions } from './verbose.js';\nimport type { ReporterInput, ReporterOptions } from './types.js';\n\nexport type ReporterFormat =\n | 'agent'\n | 'pretty'\n | 'json'\n | 'json-compact'\n | 'sarif'\n | 'html';\n\nexport { renderVerboseTrace, type VerboseTraceOptions };\n\nexport function format(\n input: ReporterInput,\n kind: ReporterFormat = 'agent',\n options?: ReporterOptions,\n): string {\n if (kind === 'pretty') return prettyReport(input, options);\n if (kind === 'json') return jsonReport(input);\n if (kind === 'json-compact') return jsonCompactReport(input);\n if (kind === 'sarif') return sarifReport(input);\n if (kind === 'html') return htmlReport(input);\n return agentReport(input, options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,SAAS,eAAe,OAAuB;CAC7C,OAAO,MACJ,QAAQ,MAAM,MAAM,CACpB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACrB,QAAQ,MAAM,MAAM,CACpB,QAAQ,MAAM,MAAM;;AAGzB,SAAS,WAAW,OAAuB;CACzC,OAAO,MAAM,QAAQ,MAAM,MAAM,CAAC,QAAQ,OAAO,MAAM,CAAC,QAAQ,OAAO,MAAM;;AAG/E,SAAgB,iBAAiB,YAAgC;CAQ/D,OAAO,KAPO,WAAW,aAA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