@geoql/doctor-core 1.1.1 → 1.2.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 +111 -31
- package/dist/index.js +1743 -114
- package/dist/index.js.map +1 -1
- package/package.json +17 -12
- package/schema.json +443 -0
- package/dist/load-yXDi-5ti.js +0 -782
- package/dist/load-yXDi-5ti.js.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["RULE_ID","DOCS","RULE_ID","DOCS","RULE_ID","DOCS","RULE_ID","RULE_ID","RULE_ID","parseMajorMinor","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","resolvePath","cache","RULE_ID","MESSAGE","RECOMMENDATION","check","NODE_ELEMENT","RULE_ID","MESSAGE","RECOMMENDATION","check","RULE_ID","MESSAGE","RECOMMENDATION","check","check","noMixedOptionsAndCompositionApi","useSeoMetaOnPublicPage","ogImageDefined","noMixedAppAndRootLayout","NODE_DIRECTIVE","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/project-info/parse-nuxt-config.ts","../src/nuxt/post-checks/compatibility-date-set.ts","../src/nuxt/post-checks/lang-on-html.ts","../src/nuxt/post-checks/nitro-cloudflare-preset.ts","../src/nuxt/post-checks/no-modules-incompatible-with-nuxt-4.ts","../src/nuxt/post-checks/no-node-only-modules.ts","../src/nuxt/post-checks/nuxt-major-current.ts","../src/nuxt/post-checks/og-image-via-satori.ts","../src/nuxt/post-checks/preset-defined-for-deploy-target.ts","../src/nuxt/post-checks/recommended-modules-installed.ts","../src/nuxt/post-checks/runtime-config-typed.ts","../src/nuxt/post-checks/uses-app-directory.ts","../src/check-nuxt-project.ts","../src/disables/parse-directives.ts","../src/disables/apply.ts","../src/code-snippet.ts","../src/project-info/fs-checks.ts","../src/project-info/path-exists.ts","../src/project-info/find-monorepo-root.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/nuxt/file-role.ts","../src/template/walk.ts","../src/sfc/rules/nuxt/no-mixed-app-and-root-layout.ts","../src/sfc/rules/nuxt/og-image-defined.ts","../src/sfc/rules/nuxt/use-seo-meta-on-public-page.ts","../src/sfc/rules/index.ts","../src/sfc/run.ts","../src/nuxt/cross-file/run.ts","../src/template/parse-sfc.ts","../src/template/directive-helpers.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/init/index.ts","../src/git-scope.ts","../src/project-info/list-workspace-packages.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/pr-comment.ts","../src/reporters/pretty.ts","../src/reporters/verbose.ts","../src/reporters/index.ts","../src/audit-filter.ts","../src/push.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 name?: string;\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 ignoreWorkspaces: string[];\n compilers?: Record<string, true>;\n}\n\n// Demo/playground sub-workspaces are dev-only surface, not the published\n// library. `example/` is the Vue-library demo convention; `playground/` is the\n// Nuxt-module convention. knip auto-discovers them as workspaces and tries to\n// load their vite.config.ts / nuxt.config.ts — which fails (\"Cannot find module\n// 'vite'\") in a bare CI checkout with no node_modules, leaking to stderr.\n// `ignoreWorkspaces` is the ONLY knip mechanism that skips a workspace BEFORE\n// its config files are loaded (`ignore` globs filter results too late; a\n// `workspaces` map only ADDS to auto-discovery, never replaces it).\nconst DEMO_WORKSPACES = ['example', 'playground'];\n\nexport function buildKnipConfig(\n projectInfo: ProjectInfo,\n doctorConfig: ResolvedDoctorConfig,\n): KnipConfig {\n const isNuxt = projectInfo.framework === 'nuxt';\n\n // Files registered by build-time plugins (unplugin-auto-import,\n // unplugin-vue-components, file-based routing/layouts) have no explicit import,\n // so knip flags them as unused. Treat their convention dirs as entry points\n // when the project actually uses those plugins, otherwise the dead-code pass\n // reports hundreds of false positives (see issue #85).\n const usesConventionResolution =\n projectInfo.hasAutoImports ||\n projectInfo.hasComponentsAutoImport ||\n projectInfo.hasVueRouter;\n\n const entry = isNuxt\n ? [\n 'app/**/*.vue',\n 'app/**/*.ts',\n 'server/**/*.ts',\n 'nuxt.config.{ts,js,mjs}',\n ]\n : [\n 'src/main.{ts,js}',\n 'src/App.vue',\n 'index.html',\n 'vite.config.{ts,js}',\n ...(usesConventionResolution\n ? [\n 'src/pages/**/*.vue',\n 'src/layouts/**/*.vue',\n 'src/components/**/*.vue',\n 'src/composables/**/*.ts',\n 'src/stores/**/*.ts',\n ]\n : []),\n ];\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 ignoreWorkspaces: [...DEMO_WORKSPACES],\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 { mkdir, writeFile } from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport type { Diagnostic } from './types.js';\nimport type { KnipConfig } from './dead-code/build-knip-config.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\nasync function writeKnipConfig(\n rootDir: string,\n config: KnipConfig,\n): Promise<string> {\n const cacheDir = join(rootDir, 'node_modules', '.cache', 'doctor');\n await mkdir(cacheDir, { recursive: true });\n const configPath = join(cacheDir, 'knip.json');\n const knipJson: Record<string, unknown> = {\n entry: config.entry,\n project: config.project,\n ignore: config.ignoreFiles,\n ignoreDependencies: config.ignoreDependencies,\n ignoreWorkspaces: config.ignoreWorkspaces,\n };\n if (config.compilers) knipJson.compilers = config.compilers;\n await writeFile(configPath, JSON.stringify(knipJson, null, 2), 'utf8');\n return configPath;\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 // knip's createOptions IGNORES entry/project passed as options (its Options\n // type has no such fields). The only programmatic way to inject them is via a\n // config file referenced through args.config — so synthesize one on disk and\n // point knip at it. Without this, knip falls back to its default entry globs\n // ({index,cli,main}) and reports auto-imported/file-routed files as unused.\n const configPath = await writeKnipConfig(\n options.projectInfo.rootDirectory,\n config,\n );\n\n const knipOptions = await createOptions({\n cwd: options.projectInfo.rootDirectory,\n args: { config: configPath },\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","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { parseSync } from 'oxc-parser';\n\nexport interface NuxtConfigInfo {\n compatibilityVersion?: number;\n compatibilityDate?: string;\n nitroPreset?: string;\n modules?: string[];\n importsAutoImport?: boolean;\n hasRuntimeConfig?: boolean;\n htmlLang?: string;\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\nfunction readHtmlLang(value: AstNode): string | undefined {\n if (value.type !== 'ObjectExpression') return undefined;\n const head = findEntry(value, 'head');\n if (head?.type !== 'ObjectExpression') return undefined;\n const htmlAttrs = findEntry(head, 'htmlAttrs');\n if (htmlAttrs?.type !== 'ObjectExpression') return undefined;\n const lang = findEntry(htmlAttrs, 'lang');\n return lang ? stringLiteral(lang) : 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 === 'compatibilityDate') {\n const date = stringLiteral(value);\n if (date !== undefined) info.compatibilityDate = date;\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 } else if (key === 'runtimeConfig') {\n info.hasRuntimeConfig = true;\n } else if (key === 'app') {\n const lang = readHtmlLang(value);\n if (lang !== undefined) info.htmlLang = lang;\n }\n }\n return info;\n}\n","import type { NuxtConfigInfo } from '../../project-info/parse-nuxt-config.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/nitro/compatibilityDate-set';\n\nexport function checkCompatibilityDateSet(\n projectInfo: ProjectInfo,\n nuxtConfig: NuxtConfigInfo | null,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (nuxtConfig?.compatibilityDate !== undefined) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'error',\n message:\n 'No compatibilityDate is set. Nuxt 4 and Nitro require a compatibilityDate to pin deployment behaviour.',\n recommendation:\n \"Add compatibilityDate: 'YYYY-MM-DD' to defineNuxtConfig in nuxt.config.\",\n },\n ];\n}\n","import type { NuxtConfigInfo } from '../../project-info/parse-nuxt-config.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/seo/lang-on-html';\n\nexport function checkLangOnHtml(\n projectInfo: ProjectInfo,\n nuxtConfig: NuxtConfigInfo | null,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (nuxtConfig?.htmlLang !== undefined) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'warn',\n message:\n 'No lang attribute is set on the html element. Screen readers and search engines rely on it.',\n recommendation:\n \"Set app.head.htmlAttrs.lang (e.g. 'en') in defineNuxtConfig.\",\n },\n ];\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/cloudflare/nitro-cloudflare-preset';\n\nconst CLOUDFLARE_PRESETS = new Set([\n 'cloudflare-pages',\n 'cloudflare-module',\n 'cloudflare',\n]);\n\nexport function checkNitroCloudflarePreset(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) return [];\n if (projectInfo.nitroPreset === null) return [];\n if (CLOUDFLARE_PRESETS.has(projectInfo.nitroPreset)) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'warn',\n message: `A wrangler config is present but the Nitro preset is '${projectInfo.nitroPreset}', not a Cloudflare preset.`,\n recommendation:\n \"Set nitro.preset to 'cloudflare-module' (or 'cloudflare-pages') to deploy on Cloudflare.\",\n },\n ];\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/modules-deps/no-modules-incompatible-with-nuxt-4';\n\nconst INCOMPATIBLE_MODULES = new Set([\n '@nuxtjs/composition-api',\n '@nuxt/bridge',\n 'nuxt-property-decorator',\n]);\n\nexport async function checkNoModulesIncompatibleWithNuxt4(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\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 (INCOMPATIBLE_MODULES.has(key) && !offenders.includes(key)) {\n offenders.push(key);\n }\n }\n\n return offenders.map((name, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'warn',\n message: `${name} is incompatible with Nuxt 4 and is no longer maintained.`,\n recommendation: `Remove ${name} and adopt the Nuxt 4 native equivalent.`,\n }));\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/cloudflare/no-node-only-modules';\n\n// Modules that rely on native bindings or the Node runtime and do not work on\n// the Cloudflare Workers runtime without a compatible replacement.\nconst NODE_ONLY_MODULES = new Set(['fs-extra', 'sharp']);\n\nexport async function checkNoNodeOnlyModules(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) 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 (NODE_ONLY_MODULES.has(key) && !offenders.includes(key)) {\n offenders.push(key);\n }\n }\n\n return offenders.map((name, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'warn',\n message: `${name} is a Node-only module and does not run on the Cloudflare Workers runtime.`,\n recommendation: `Replace ${name} with a Workers-compatible alternative or move it to a build-only step.`,\n }));\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/structure/nuxt-major-current';\n\nconst DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR = 4;\nconst DOCTOR_BUNDLED_NUXT_FLOOR_MINOR = 4;\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 checkNuxtMajorCurrent(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.nuxtVersion === null) return [];\n\n const parsed = parseMajorMinor(projectInfo.nuxtVersion);\n if (parsed === null) return [];\n\n if (parsed.major !== DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR) return [];\n if (parsed.minor >= DOCTOR_BUNDLED_NUXT_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: `Nuxt ${projectInfo.nuxtVersion} is older than the doctor-bundled floor (^${DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR}.${DOCTOR_BUNDLED_NUXT_FLOOR_MINOR}.0). Newer minors ship rule-relevant fixes and Nitro improvements.`,\n recommendation: `Bump \"nuxt\" to ^${DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR}.${DOCTOR_BUNDLED_NUXT_FLOOR_MINOR}.0 or later in package.json.`,\n },\n ];\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/cloudflare/og-image-via-satori';\n\nconst OG_IMAGE_MODULES = ['@nuxtjs/og-image', 'nuxt-og-image'];\n\nexport async function checkOgImageViaSatori(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) return [];\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n\n const installed = new Set([\n ...Object.keys(deps.dependencies),\n ...Object.keys(deps.devDependencies),\n ]);\n if (OG_IMAGE_MODULES.some((name) => installed.has(name))) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'info',\n message:\n 'Running on Cloudflare with no OG image module installed; dynamic social images are unconfigured.',\n recommendation:\n 'Add @nuxtjs/og-image to generate Satori-based OG images that run on Cloudflare Workers.',\n },\n ];\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/nitro/preset-defined-for-deploy-target';\n\nexport function checkPresetDefinedForDeployTarget(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) return [];\n if (projectInfo.nitroPreset !== null) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'warn',\n message:\n 'A wrangler config is present but no Nitro preset is defined for the deploy target.',\n recommendation:\n \"Set nitro.preset in nuxt.config (e.g. 'cloudflare-module') to match your deploy target.\",\n },\n ];\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/modules-deps/recommended-modules-installed';\n\ninterface RecommendedGroup {\n readonly label: string;\n readonly candidates: readonly string[];\n}\n\nconst RECOMMENDED_GROUPS: readonly RecommendedGroup[] = [\n { label: '@nuxt/image', candidates: ['@nuxt/image'] },\n { label: '@nuxtjs/seo', candidates: ['@nuxtjs/seo', '@nuxtjs/sitemap'] },\n { label: '@nuxt/fonts', candidates: ['@nuxt/fonts'] },\n];\n\nexport async function checkRecommendedModulesInstalled(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n\n const installed = new Set([\n ...Object.keys(deps.dependencies),\n ...Object.keys(deps.devDependencies),\n ]);\n\n const missing = RECOMMENDED_GROUPS.filter(\n (group) => !group.candidates.some((name) => installed.has(name)),\n );\n\n return missing.map((group, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'info',\n message: `Recommended Nuxt 4 module ${group.label} is not installed.`,\n recommendation: `Add ${group.label} to dependencies to improve image, SEO, or font handling.`,\n }));\n}\n","import { readFile, readdir } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { NuxtConfigInfo } from '../../project-info/parse-nuxt-config.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/nitro/runtime-config-typed';\n\nasync function hasRuntimeConfigAugmentation(dir: string): Promise<boolean> {\n const entries = await readdir(dir);\n for (const name of entries) {\n if (!name.endsWith('.d.ts')) continue;\n const source = await readFile(join(dir, name), 'utf8');\n if (source.includes('RuntimeConfig')) return true;\n }\n return false;\n}\n\nexport async function checkRuntimeConfigTyped(\n projectInfo: ProjectInfo,\n nuxtConfig: NuxtConfigInfo | null,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (nuxtConfig?.hasRuntimeConfig !== true) return [];\n\n if (await hasRuntimeConfigAugmentation(projectInfo.rootDirectory)) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'info',\n message:\n 'runtimeConfig is defined but no RuntimeConfig type augmentation was found, so runtime config access is untyped.',\n recommendation:\n \"Augment 'nuxt/schema' with a RuntimeConfig interface in a .d.ts file to type useRuntimeConfig().\",\n },\n ];\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/structure/uses-app-directory';\n\nexport function checkUsesAppDirectory(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.hasAppDir) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'warn',\n message:\n 'No app/ directory found. Nuxt 4 expects source under app/ (app/pages, app/components, app/app.vue).',\n recommendation:\n 'Create an app/ directory and move pages, components, layouts, and app.vue into it.',\n },\n ];\n}\n","import { parseNuxtConfig } from './project-info/parse-nuxt-config.js';\nimport { checkCompatibilityDateSet } from './nuxt/post-checks/compatibility-date-set.js';\nimport { checkLangOnHtml } from './nuxt/post-checks/lang-on-html.js';\nimport { checkNitroCloudflarePreset } from './nuxt/post-checks/nitro-cloudflare-preset.js';\nimport { checkNoModulesIncompatibleWithNuxt4 } from './nuxt/post-checks/no-modules-incompatible-with-nuxt-4.js';\nimport { checkNoNodeOnlyModules } from './nuxt/post-checks/no-node-only-modules.js';\nimport { checkNuxtMajorCurrent } from './nuxt/post-checks/nuxt-major-current.js';\nimport { checkOgImageViaSatori } from './nuxt/post-checks/og-image-via-satori.js';\nimport { checkPresetDefinedForDeployTarget } from './nuxt/post-checks/preset-defined-for-deploy-target.js';\nimport { checkRecommendedModulesInstalled } from './nuxt/post-checks/recommended-modules-installed.js';\nimport { checkRuntimeConfigTyped } from './nuxt/post-checks/runtime-config-typed.js';\nimport type { NuxtPostCheckIssue } from './nuxt/post-checks/types.js';\nimport { checkUsesAppDirectory } from './nuxt/post-checks/uses-app-directory.js';\nimport type { Diagnostic } from './types.js';\nimport type { ProjectInfo } from './types/project-info.js';\n\nexport async function checkNuxtProject(\n projectInfo: ProjectInfo,\n): Promise<Diagnostic[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.framework !== 'nuxt') return [];\n\n const nuxtConfig = await parseNuxtConfig(projectInfo.rootDirectory);\n\n const results = await Promise.all([\n Promise.resolve(checkUsesAppDirectory(projectInfo)),\n Promise.resolve(checkNuxtMajorCurrent(projectInfo)),\n checkNoModulesIncompatibleWithNuxt4(projectInfo),\n checkRecommendedModulesInstalled(projectInfo),\n Promise.resolve(checkCompatibilityDateSet(projectInfo, nuxtConfig)),\n Promise.resolve(checkPresetDefinedForDeployTarget(projectInfo)),\n checkRuntimeConfigTyped(projectInfo, nuxtConfig),\n Promise.resolve(checkLangOnHtml(projectInfo, nuxtConfig)),\n Promise.resolve(checkNitroCloudflarePreset(projectInfo)),\n checkOgImageViaSatori(projectInfo),\n checkNoNodeOnlyModules(projectInfo),\n ]);\n\n const issues: NuxtPostCheckIssue[] = 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","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 { existsSync, statSync } from 'node:fs';\nimport { join } from 'node:path';\n\n/**\n * Synchronously reports whether `target` exists and is a directory. Missing\n * paths and non-directory entries both return false rather than throwing.\n */\nexport function directoryExists(target: string): boolean {\n try {\n return statSync(target).isDirectory();\n } catch {\n return false;\n }\n}\n\n/**\n * Returns the absolute path of the first existing candidate file (resolved\n * against `dir`), or null when none of the candidates exist.\n */\nexport function resolveExistingFile(\n dir: string,\n candidates: readonly string[],\n): string | null {\n for (const name of candidates) {\n const full = join(dir, name);\n if (existsSync(full)) return full;\n }\n return null;\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 { 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 {\n directoryExists,\n resolveExistingFile,\n} from './project-info/fs-checks.js';\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 isNuxtMajor4: boolean;\n hasNuxtConfig: boolean;\n hasAppDir: boolean;\n hasServerDir: boolean;\n hasPagesDir: 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 if (input.isNuxtMajor4) caps.add('nuxt4');\n\n if (input.hasNuxtConfig) caps.add('nuxt-config');\n if (input.hasAppDir) caps.add('app-dir');\n if (input.hasServerDir) caps.add('server-dir');\n if (input.hasPagesDir) caps.add('pages-dir');\n if (input.hasWrangler) caps.add('wrangler');\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 wranglerConfigPath = resolveExistingFile(rootDirectory, [\n 'wrangler.toml',\n 'wrangler.jsonc',\n 'wrangler.json',\n ]);\n const hasWranglerConfig = wranglerConfigPath !== null;\n\n const nuxtConfigPath = resolveExistingFile(rootDirectory, [\n 'nuxt.config.ts',\n 'nuxt.config.js',\n 'nuxt.config.mjs',\n ]);\n\n const appDirPath = join(rootDirectory, 'app');\n const hasAppDir = directoryExists(appDirPath);\n const hasServerDir = directoryExists(join(rootDirectory, 'server'));\n const hasPagesDir =\n (hasAppDir && directoryExists(join(appDirPath, 'pages'))) ||\n directoryExists(join(rootDirectory, 'pages'));\n\n const isNuxtMajor4 = nuxtVersion !== null && major(nuxtVersion) >= 4;\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: hasWranglerConfig,\n isNuxtMajor4,\n hasNuxtConfig: nuxtConfigPath !== null,\n hasAppDir,\n hasServerDir,\n hasPagesDir,\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 nuxtConfigPath,\n hasAppDir,\n appDirPath: hasAppDir ? appDirPath : null,\n hasServerDir,\n hasPagesDir,\n hasWranglerConfig,\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 pluginPaths: string[];\n ruleOverrides?: Record<string, Severity | 'off'>;\n rootDir?: string;\n framework?: 'vue' | 'nuxt';\n}\n\nexport interface GeneratedConfig {\n configPath: string;\n cleanup: () => Promise<void>;\n}\n\nconst VUE_DEFAULT_RULES: Record<string, Severity> = {\n 'vue/no-export-in-script-setup': 'error',\n 'vue/require-typed-ref': 'warn',\n 'vue/no-arrow-functions-in-watch': 'error',\n 'vue/no-deprecated-data-object-declaration': 'error',\n 'vue/no-deprecated-events-api': 'error',\n 'vue/no-deprecated-destroyed-lifecycle': 'error',\n 'vue/no-deprecated-model-definition': 'error',\n 'vue/no-deprecated-delete-set': 'error',\n 'vue/no-deprecated-vue-config-keycodes': 'error',\n 'vue/no-lifecycle-after-await': 'error',\n 'vue/no-this-in-before-route-enter': 'error',\n 'vue/return-in-computed-property': 'error',\n 'vue/valid-define-emits': 'error',\n 'vue/valid-define-props': 'error',\n 'vue/no-required-prop-with-default': 'warn',\n 'vue/prefer-import-from-vue': 'warn',\n 'vue/no-import-compiler-macros': 'warn',\n 'vue/no-multiple-slot-args': 'warn',\n 'vue/require-default-export': 'warn',\n 'vue-doctor/no-em-dash-in-string': 'warn',\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\nconst NUXT_PLUGIN_RULES: Record<string, Severity> = {\n 'nuxt-doctor/ai-slop/no-process-client-server': 'error',\n 'nuxt-doctor/ai-slop/no-explicit-imports-of-auto-imported': 'warn',\n 'nuxt-doctor/ai-slop/no-useState-for-server-data': 'warn',\n 'nuxt-doctor/ai-slop/no-fetch-in-setup': 'warn',\n 'nuxt-doctor/data-fetching/useAsyncData-key-required-in-loop': 'error',\n 'nuxt-doctor/server-routes/defineEventHandler-typed': 'warn',\n 'nuxt-doctor/server-routes/validate-body-with-h3-v2': 'warn',\n 'nuxt-doctor/server-routes/createError-on-failure': 'warn',\n 'nuxt-doctor/hydration/no-document-in-setup': 'error',\n 'nuxt-doctor/hydration/clientOnly-for-browser-apis': 'error',\n};\n\n// Only these ids are real oxlint-plugin/built-in rules. Other doctor rules run\n// in separate passes; emitting their ids here makes oxlint exit non-zero\n// (\"rule not found\"), silently killing the whole script pass — so the rules\n// block is filtered to this allowlist.\nconst VUE_OXLINT_RULE_IDS: ReadonlySet<string> = new Set([\n 'vue/no-export-in-script-setup',\n 'vue/require-typed-ref',\n 'vue/no-arrow-functions-in-watch',\n 'vue/no-deprecated-data-object-declaration',\n 'vue/no-deprecated-events-api',\n 'vue/no-deprecated-destroyed-lifecycle',\n 'vue/no-deprecated-model-definition',\n 'vue/no-deprecated-delete-set',\n 'vue/no-deprecated-vue-config-keycodes',\n 'vue/no-lifecycle-after-await',\n 'vue/no-this-in-before-route-enter',\n 'vue/return-in-computed-property',\n 'vue/valid-define-emits',\n 'vue/valid-define-props',\n 'vue/no-required-prop-with-default',\n 'vue/prefer-import-from-vue',\n 'vue/no-import-compiler-macros',\n 'vue/no-multiple-slot-args',\n 'vue/require-default-export',\n 'vue/define-emits-declaration',\n 'vue/define-props-declaration',\n 'vue/define-props-destructuring',\n 'vue/max-props',\n 'vue-doctor/no-em-dash-in-string',\n 'vue-doctor/no-destructure-props-without-to-refs',\n 'vue-doctor/no-destructure-reactive-without-to-refs',\n 'vue-doctor/no-non-null-assertion-on-ref-value',\n 'vue-doctor/no-imports-from-vue-when-auto-imported',\n 'vue-doctor/reactivity/watch-without-cleanup',\n 'vue-doctor/reactivity/prefer-shallowRef-for-large-data',\n 'vue-doctor/reactivity/prefer-readonly-for-injected',\n 'vue-doctor/composition/prefer-script-setup-for-new-files',\n 'vue-doctor/composition/defineProps-typed',\n 'vue-doctor/performance/prefer-defineAsyncComponent-on-route',\n]);\n\nconst NUXT_OXLINT_RULE_IDS: ReadonlySet<string> = new Set(\n Object.keys(NUXT_PLUGIN_RULES),\n);\n\nfunction oxlintRuleAllowlist(framework: 'vue' | 'nuxt'): ReadonlySet<string> {\n if (framework !== 'nuxt') return VUE_OXLINT_RULE_IDS;\n return new Set([...VUE_OXLINT_RULE_IDS, ...NUXT_OXLINT_RULE_IDS]);\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 framework = input.framework === 'nuxt' ? 'nuxt' : 'vue';\n const allowlist = oxlintRuleAllowlist(framework);\n let defaults: Record<string, Severity> = { ...VUE_DEFAULT_RULES };\n if (framework === 'nuxt') {\n defaults = { ...defaults, ...NUXT_PLUGIN_RULES };\n }\n const merged: Record<string, Severity> = { ...defaults };\n if (input.ruleOverrides) {\n for (const [id, sev] of Object.entries(input.ruleOverrides)) {\n // Only oxlint-plugin rule ids belong in the oxlint config. Overrides for\n // rules handled by other doctor-core passes are ignored here (they are\n // applied in their own pass), preventing oxlint \"rule not found\" exits.\n if (!allowlist.has(id)) continue;\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.pluginPaths,\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 throwVueResolveError(fromDir);\n}\n\nexport function resolveNuxtDoctorPluginPath(fromDir: string): string {\n const pkgJson = lookUpwards(\n fromDir,\n 'node_modules/@geoql/oxlint-plugin-nuxt-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-nuxt-doctor');\n if (selfMain) return selfMain;\n return throwNuxtResolveError(fromDir);\n}\n\nfunction throwVueResolveError(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\nfunction throwNuxtResolveError(fromDir: string): never {\n throw new Error(\n `Failed to resolve @geoql/oxlint-plugin-nuxt-doctor from ${fromDir}. Install it as a dependency of your project or use the bundled @geoql/nuxt-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'];\n if (opts.fix) args.push('--fix');\n args.push(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 resolveNuxtDoctorPluginPath,\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 framework?: 'vue' | 'nuxt';\n fix?: boolean;\n fixExcludes?: string[];\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 vuePluginPath = resolveVueDoctorPluginPath(opts.rootDir);\n const oxlintBin = resolveOxlintBin(opts.rootDir);\n let pluginPaths: string[];\n if (opts.framework === 'nuxt') {\n const nuxtPluginPath = resolveNuxtDoctorPluginPath(opts.rootDir);\n pluginPaths = [nuxtPluginPath, vuePluginPath];\n } else {\n pluginPaths = [vuePluginPath];\n }\n const { configPath, cleanup } = await generateOxlintConfig({\n pluginPaths,\n ruleOverrides: opts.ruleOverrides,\n rootDir: opts.rootDir,\n framework: opts.framework,\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 fix: opts.fix,\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","const PAGE_DIR = /^(?:app\\/)?pages\\//;\nconst LAYOUT_DIR = /^(?:app\\/)?layouts\\//;\n\nfunction normalize(relPath: string): string {\n return relPath.replace(/\\\\/g, '/').replace(/^\\.\\//, '');\n}\n\n/**\n * True when the path points at a Nuxt page component — a `.vue` file under\n * `pages/` (Nuxt 3 layout) or `app/pages/` (Nuxt 4 layout) at the project root.\n */\nexport function isNuxtPageFile(relPath: string): boolean {\n const path = normalize(relPath);\n return PAGE_DIR.test(path) && path.endsWith('.vue');\n}\n\n/**\n * True when the path points at a Nitro server file — a `.ts` file under the\n * project-root `server/` directory.\n */\nexport function isNuxtServerFile(relPath: string): boolean {\n const path = normalize(relPath);\n return path.startsWith('server/') && path.endsWith('.ts');\n}\n\n/**\n * True when the path points at a Nuxt layout component — a `.vue` file under\n * `layouts/` (Nuxt 3 layout) or `app/layouts/` (Nuxt 4 layout) at the project\n * root.\n */\nexport function isNuxtLayoutFile(relPath: string): boolean {\n const path = normalize(relPath);\n return LAYOUT_DIR.test(path) && path.endsWith('.vue');\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 { isNuxtLayoutFile } from '../../../nuxt/file-role.js';\nimport { walkElements } from '../../../template/walk.js';\nimport type { SfcRuleContext, SfcRuleResult } from '../types.js';\n\nconst RULE_ID = 'nuxt-doctor/ai-slop/no-mixed-app-and-root-layout';\n\nconst MESSAGE =\n 'Layout file renders<NuxtLayout> inside itself. This creates a nested layout chain where the root layout renders itself as a slot. Use<slot /> directly and let the page content flow through.';\n\nconst RECOMMENDATION =\n 'Replace <NuxtLayout> in this layout file with <slot />. The layout slot is already provided by the parent layout wrapper.';\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n if (!isNuxtLayoutFile(ctx.relativePath)) return { diagnostics: [] };\n const { template } = ctx.descriptor;\n if (!template || !template.ast) return { diagnostics: [] };\n let foundNuxtLayout = false;\n let nuxtLayoutNode: ElementNode | undefined;\n walkElements(template.ast, (el: ElementNode) => {\n if (el.tag === 'NuxtLayout') {\n foundNuxtLayout = true;\n nuxtLayoutNode = el;\n }\n });\n if (!foundNuxtLayout) return { diagnostics: [] };\n const node = nuxtLayoutNode!;\n const diagnostics: Diagnostic[] = [\n {\n file: ctx.file,\n line: node.loc.start.line,\n column: node.loc.start.column,\n endLine: node.loc.end.line,\n endColumn: node.loc.end.column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: MESSAGE,\n source: 'sfc',\n recommendation: RECOMMENDATION,\n },\n ];\n return { diagnostics };\n}\n","import { readFileSync } from 'node:fs';\nimport { parseSync } from 'oxc-parser';\nimport type { Diagnostic } from '../../../types.js';\nimport { isNuxtPageFile } from '../../../nuxt/file-role.js';\nimport type { SfcRuleContext, SfcRuleResult } from '../types.js';\n\nconst RULE_ID = 'nuxt-doctor/seo/og-image-defined';\n\nconst MESSAGE =\n 'Page uses SEO meta but has no og:image property. Open Graph images improve social sharing previews. Add an og:image value or install @nuxtjs/og-image for automatic OG images.';\n\nconst RECOMMENDATION =\n 'Add ogImage: \"/path/to/image.png\" to useSeoMeta / useHead, or install @nuxtjs/og-image.';\n\nfunction hasOgImageInCall(\n program: ReturnType<typeof parseSync>['program'],\n): boolean {\n for (const stmt of program.body) {\n if (stmt.type !== 'ExpressionStatement') continue;\n const call = stmt.expression;\n if (call.type !== 'CallExpression') continue;\n if (call.callee.type !== 'Identifier') continue;\n const name = call.callee.name;\n if (name !== 'useSeoMeta' && name !== 'useHead') continue;\n const firstArg = call.arguments[0];\n if (!firstArg || firstArg.type !== 'ObjectExpression') continue;\n for (const prop of firstArg.properties) {\n if (prop.type !== 'Property') continue;\n if (prop.key.type === 'Identifier' && prop.key.name === 'ogImage')\n return true;\n if (prop.key.type === 'Literal' && prop.key.value === 'og:image')\n return true;\n }\n }\n return false;\n}\n\nfunction hasOgImageDep(packageJsonPath: string): boolean {\n try {\n const raw = readFileSync(packageJsonPath, 'utf8');\n const pkg = JSON.parse(raw);\n const deps = { ...pkg.dependencies, ...pkg.devDependencies };\n return '@nuxtjs/og-image' in deps || 'nuxt-og-image' in deps;\n } catch {\n return false;\n }\n}\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n if (!isNuxtPageFile(ctx.relativePath)) return { diagnostics: [] };\n const { scriptSetup } = ctx.descriptor;\n if (!scriptSetup) return { diagnostics: [] };\n const lang = scriptSetup.lang === 'ts' ? 'ts' : 'js';\n const { program } = parseSync(`script.${lang}`, scriptSetup.content, {\n sourceType: 'module',\n lang,\n });\n if (hasOgImageInCall(program)) return { diagnostics: [] };\n if (ctx.projectInfo.packageJsonPath === null) return { diagnostics: [] };\n if (hasOgImageDep(ctx.projectInfo.packageJsonPath))\n return { diagnostics: [] };\n const { line, column } = scriptSetup.loc.start;\n const diagnostics: Diagnostic[] = [\n {\n file: ctx.file,\n line,\n column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: MESSAGE,\n source: 'sfc',\n recommendation: RECOMMENDATION,\n },\n ];\n return { diagnostics };\n}\n","import { parseSync } from 'oxc-parser';\nimport type { Diagnostic } from '../../../types.js';\nimport { isNuxtPageFile } from '../../../nuxt/file-role.js';\nimport type { SfcRuleContext, SfcRuleResult } from '../types.js';\n\nconst RULE_ID = 'nuxt-doctor/seo/useSeoMeta-on-public-page';\n\nconst MESSAGE =\n 'Public page component is missing SEO metadata. Add useSeoMeta, useHead, or definePageMeta with a title so search engines can index it properly.';\n\nconst RECOMMENDATION =\n 'Call useSeoMeta({ title: \"...\" }) in<script setup> to define page title and meta tags for search engines and social previews.';\n\nfunction hasTitleInCall(\n program: ReturnType<typeof parseSync>['program'],\n): boolean {\n for (const stmt of program.body) {\n if (stmt.type !== 'ExpressionStatement') continue;\n const call = stmt.expression;\n if (call.type !== 'CallExpression') continue;\n if (call.callee.type !== 'Identifier') continue;\n const name = call.callee.name;\n if (\n name !== 'useSeoMeta' &&\n name !== 'useHead' &&\n name !== 'definePageMeta'\n )\n continue;\n const firstArg = call.arguments[0];\n if (!firstArg || firstArg.type !== 'ObjectExpression') continue;\n for (const prop of firstArg.properties) {\n if (prop.type !== 'Property') continue;\n if (prop.key.type === 'Identifier' && prop.key.name === 'title')\n return true;\n if (prop.key.type === 'Literal' && prop.key.value === 'title')\n return true;\n }\n }\n return false;\n}\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n if (!isNuxtPageFile(ctx.relativePath)) return { diagnostics: [] };\n const { scriptSetup } = ctx.descriptor;\n if (!scriptSetup) return { diagnostics: [] };\n const lang = scriptSetup.lang === 'ts' ? 'ts' : 'js';\n const { program } = parseSync(`script.${lang}`, scriptSetup.content, {\n sourceType: 'module',\n lang,\n });\n if (hasTitleInCall(program)) return { diagnostics: [] };\n const { line, column } = scriptSetup.loc.start;\n const diagnostics: Diagnostic[] = [\n {\n file: ctx.file,\n line,\n column,\n ruleId: RULE_ID,\n severity: 'warn',\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 { check as noMixedAppAndRootLayout } from './nuxt/no-mixed-app-and-root-layout.js';\nimport { check as ogImageDefined } from './nuxt/og-image-defined.js';\nimport { check as useSeoMetaOnPublicPage } from './nuxt/use-seo-meta-on-public-page.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 id: 'nuxt-doctor/seo/useSeoMeta-on-public-page',\n check: useSeoMetaOnPublicPage,\n },\n {\n id: 'nuxt-doctor/seo/og-image-defined',\n check: ogImageDefined,\n },\n {\n id: 'nuxt-doctor/ai-slop/no-mixed-app-and-root-layout',\n check: noMixedAppAndRootLayout,\n },\n];\n","import { relative } from 'node:path';\nimport type { Diagnostic, Severity } from '../types.js';\nimport type { ProjectInfo } from '../types/project-info.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 projectInfo?: ProjectInfo;\n}\n\nexport async function runSfcPass(opts: SfcPassOptions): Promise<Diagnostic[]> {\n const all: Diagnostic[] = [];\n const { projectInfo } = opts;\n const rootDir = projectInfo?.rootDirectory ?? process.cwd();\n for (const file of opts.files) {\n if (!file.endsWith('.vue')) continue;\n const descriptor = await parseSfcDescriptor(file);\n if (!descriptor) continue;\n const relativePath = relative(rootDir, file).replace(/\\\\/g, '/');\n for (const rule of SFC_RULES) {\n const override = opts.ruleOverrides?.[rule.id];\n if (override === 'off') continue;\n const { diagnostics } = rule.check({\n file,\n descriptor,\n rootDirectory: rootDir,\n relativePath,\n projectInfo,\n });\n for (const d of diagnostics) {\n all.push(override ? { ...d, severity: override } : d);\n }\n }\n }\n return all;\n}\n","import { parseSync } from 'oxc-parser';\nimport { relative } from 'node:path';\nimport type { Diagnostic } from '../../types.js';\nimport { isNuxtPageFile } from '../file-role.js';\nimport { parseSfcDescriptor } from '../../sfc/parse-sfc-descriptor.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\n\nexport interface CrossFilePassOptions {\n files: string[];\n projectInfo: ProjectInfo;\n}\n\nexport interface ParsedPageScript {\n file: string;\n relativePath: string;\n keys: string[];\n scriptSetupContent: string;\n scriptSetupLang: 'ts' | 'js';\n scriptSetupLine: number;\n}\n\nfunction extractDataFetchingKeys(content: string, lang: 'ts' | 'js'): string[] {\n const keys: string[] = [];\n try {\n const { program } = parseSync(`script.${lang}`, content, {\n sourceType: 'module',\n lang,\n });\n for (const stmt of program.body) {\n if (stmt.type === 'VariableDeclaration') {\n for (const decl of stmt.declarations) {\n const call = unwrapAwait(decl.init);\n if (call?.type !== 'CallExpression') continue;\n extractKeyFromCall(call, keys);\n }\n } else if (stmt.type === 'ExpressionStatement') {\n const expr = unwrapAwait(stmt.expression);\n if (expr?.type === 'CallExpression') {\n extractKeyFromCall(expr, keys);\n }\n }\n }\n } catch {}\n return keys;\n}\n\ntype MaybeNode = { type: string; argument?: MaybeNode } | null | undefined;\n\nfunction unwrapAwait<T extends MaybeNode>(node: T): MaybeNode {\n if (node?.type === 'AwaitExpression') return node.argument;\n return node;\n}\n\nfunction extractKeyFromCall(\n call: Record<string, unknown>,\n keys: string[],\n): void {\n if (call.callee.type !== 'Identifier') return;\n const fnName = call.callee.name;\n if (fnName !== 'useAsyncData' && fnName !== 'useFetch') return;\n const keyArg = call.arguments[0];\n if (keyArg?.type === 'Literal' && typeof keyArg.value === 'string') {\n keys.push(keyArg.value);\n } else if (keyArg?.type === 'TemplateLiteral' && keyArg.quasis.length === 1) {\n const val = keyArg.quasis[0]?.value?.raw;\n if (val) keys.push(val);\n }\n if (fnName === 'useFetch' && call.arguments.length >= 2) {\n const optsArg = call.arguments[1];\n if (optsArg?.type === 'ObjectExpression') {\n for (const prop of optsArg.properties) {\n if (\n prop.type === 'Property' &&\n prop.key.type === 'Identifier' &&\n prop.key.name === 'key' &&\n prop.value.type === 'Literal' &&\n typeof prop.value.value === 'string'\n ) {\n keys.push(prop.value.value);\n }\n }\n }\n }\n}\n\nexport async function runCrossFilePass(\n opts: CrossFilePassOptions,\n): Promise<Diagnostic[]> {\n const { files, projectInfo } = opts;\n if (projectInfo.framework !== 'nuxt') return [];\n const rootDir = projectInfo.rootDirectory;\n const pageFiles = files.filter((f) =>\n isNuxtPageFile(relative(rootDir, f).replace(/\\\\/g, '/')),\n );\n if (pageFiles.length === 0) return [];\n const parsed: ParsedPageScript[] = [];\n for (const file of pageFiles) {\n const descriptor = await parseSfcDescriptor(file);\n if (!descriptor) continue;\n const { scriptSetup } = descriptor;\n if (!scriptSetup) continue;\n parsed.push({\n file,\n relativePath: relative(rootDir, file).replace(/\\\\/g, '/'),\n keys: extractDataFetchingKeys(\n scriptSetup.content,\n scriptSetup.lang === 'ts' ? 'ts' : 'js',\n ),\n scriptSetupContent: scriptSetup.content,\n scriptSetupLang: scriptSetup.lang === 'ts' ? 'ts' : 'js',\n scriptSetupLine: scriptSetup.loc.start.line,\n });\n }\n return runCrossFileRules(parsed);\n}\n\nfunction runCrossFileRules(pages: ParsedPageScript[]): Diagnostic[] {\n const all: Diagnostic[] = [];\n all.push(...ruleNoSharedKeyAcrossPages(pages));\n all.push(...ruleSsrSafeOnMountedOnlyForClient(pages));\n return all;\n}\n\nfunction ruleNoSharedKeyAcrossPages(pages: ParsedPageScript[]): Diagnostic[] {\n const keyToFiles = new Map<string, string[]>();\n for (const page of pages) {\n for (const key of page.keys) {\n const existing = keyToFiles.get(key) ?? [];\n if (!existing.includes(page.file)) existing.push(page.file);\n keyToFiles.set(key, existing);\n }\n }\n const diags: Diagnostic[] = [];\n for (const [key, files] of keyToFiles) {\n if (files.length < 2) continue;\n for (const file of files) {\n diags.push({\n file,\n line: 1,\n column: 1,\n ruleId: 'nuxt-doctor/data-fetching/no-shared-key-across-pages',\n severity: 'warn',\n message: `Data fetching key \"${key}\" is shared across ${files.length} different page files. This causes cache collisions in useAsyncData/useFetch. Use a unique key per page.`,\n source: 'cross-file',\n recommendation: `Rename the key to something page-specific, e.g. \"page-${key}\" or \"users-${key}\".`,\n });\n }\n }\n return diags;\n}\n\nconst BROWSER_GLOBALS = new Set([\n 'window',\n 'document',\n 'navigator',\n 'localStorage',\n 'sessionStorage',\n 'location',\n 'history',\n 'fetch',\n 'XMLHttpRequest',\n 'matchMedia',\n 'IntersectionObserver',\n 'MutationObserver',\n 'indexedDB',\n 'webkit',\n 'moz',\n 'onmessage',\n]);\n\nfunction ruleSsrSafeOnMountedOnlyForClient(\n pages: ParsedPageScript[],\n): Diagnostic[] {\n const diags: Diagnostic[] = [];\n for (const page of pages) {\n const { program } = parseSync(\n `script.${page.scriptSetupLang}`,\n page.scriptSetupContent,\n { sourceType: 'module', lang: page.scriptSetupLang },\n );\n for (const stmt of program.body) {\n if (stmt.type === 'VariableDeclaration') {\n for (const decl of stmt.declarations) {\n const init = decl.init;\n if (!init) continue;\n if (init.type === 'CallExpression') {\n const call = init;\n if (isSkippedReactiveCall(call)) continue;\n checkCallForBrowserGlobal(call, page, diags);\n } else if (init.type === 'MemberExpression') {\n checkMemberForBrowserGlobal(init, page, diags);\n }\n }\n } else if (stmt.type === 'ExpressionStatement') {\n const expr = stmt.expression;\n if (expr.type === 'CallExpression') {\n if (isSkippedReactiveCall(expr)) continue;\n checkCallForBrowserGlobal(expr, page, diags);\n } else if (expr.type === 'MemberExpression') {\n checkMemberForBrowserGlobal(expr, page, diags);\n }\n }\n }\n }\n return diags;\n}\n\nconst CLIENT_SAFE_WRAPPERS = new Set(['onMounted', 'watchEffect', 'watch']);\n\nfunction isSkippedReactiveCall(call: {\n callee: { type: string; name?: string };\n}): boolean {\n if (call.callee.type !== 'Identifier') return false;\n return CLIENT_SAFE_WRAPPERS.has(call.callee.name as string);\n}\n\nfunction checkCallForBrowserGlobal(\n call: Record<string, unknown>,\n page: ParsedPageScript,\n diags: Diagnostic[],\n) {\n const callee = call.callee as Record<string, unknown>;\n if (callee.type !== 'MemberExpression') return;\n const obj = callee.object as Record<string, unknown>;\n if (obj.type !== 'Identifier' || !BROWSER_GLOBALS.has(obj.name as string))\n return;\n diags.push({\n file: page.file,\n line: page.scriptSetupLine,\n column: 1,\n ruleId: 'nuxt-doctor/data-fetching/ssr-safe-onMounted-only-for-client',\n severity: 'warn',\n message: `Browser global \"${obj.name}\" is accessed at setup top-level outside onMounted. This causes SSR/hydration mismatches. Move browser-only code inside onMounted or a client-only plugin.`,\n source: 'cross-file',\n recommendation: `Wrap \"${obj.name}\" access in onMounted(() => { /* code */ }) or use defineNuxtPlugin to run only on the client.`,\n });\n}\n\nfunction checkMemberForBrowserGlobal(\n mem: Record<string, unknown>,\n page: ParsedPageScript,\n diags: Diagnostic[],\n) {\n const obj = mem.object as Record<string, unknown>;\n if (obj.type !== 'Identifier' || !BROWSER_GLOBALS.has(obj.name as string))\n return;\n diags.push({\n file: page.file,\n line: page.scriptSetupLine,\n column: 1,\n ruleId: 'nuxt-doctor/data-fetching/ssr-safe-onMounted-only-for-client',\n severity: 'warn',\n message: `Browser global \"${obj.name}\" is accessed at setup top-level outside onMounted. This causes SSR/hydration mismatches. Move browser-only code inside onMounted or a client-only plugin.`,\n source: 'cross-file',\n recommendation: `Wrap \"${obj.name}\" access in onMounted(() => { /* code */ }) or use defineNuxtPlugin to run only on the client.`,\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 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 { 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 { checkNuxtProject } from './check-nuxt-project.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 { runCrossFilePass } from './nuxt/cross-file/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 project = await detectProject(rootDir);\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({\n files,\n ruleOverrides: config.rules,\n projectInfo: project,\n })\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 framework: project.framework === 'nuxt' ? 'nuxt' : 'vue',\n fix: config.fix === true && config.scopeFiles === undefined,\n fixExcludes: config.fixExcludes,\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 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 (err) {\n // knip failed — diagnostics remain empty for this pass. Surface it under\n // DOCTOR_DEBUG (matching the script pass) so a degraded dead-code run is\n // never silently disguised as a clean pass.\n if (process.env.DOCTOR_DEBUG) {\n process.stderr.write(\n `[doctor-core] dead-code pass failed: ${String(err)}\\n`,\n );\n }\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 let nuxtProjectDiagnostics: Diagnostic[] = [];\n if (project.framework === 'nuxt') {\n try {\n const raw = await checkNuxtProject(project);\n nuxtProjectDiagnostics = 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 // nuxt-project pass failed — diagnostics remain empty for this pass\n }\n }\n\n let crossFileDiagnostics: Diagnostic[] = [];\n if (project.framework === 'nuxt') {\n try {\n const raw = await runCrossFilePass({ files, projectInfo: project });\n crossFileDiagnostics = 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 // cross-file pass failed — diagnostics remain empty for this pass\n }\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 nuxtProjectDiagnostics,\n crossFileDiagnostics,\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 fixExcludes?: string[];\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 ...((cli.fixExcludes ?? resolved.fixExcludes)\n ? { fixExcludes: cli.fixExcludes ?? resolved.fixExcludes }\n : {}),\n };\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { detectProject } from '../detect-project.js';\nimport { listSourceFiles } from '../file-scan.js';\nimport { pathExists } from '../project-info/path-exists.js';\nimport type { DoctorUserConfig } from '../config/types.js';\nimport type { ProjectInfo } from '../types/project-info.js';\n\nexport type InitConfigFormat = 'ts' | 'json' | 'package-json';\nexport type InitPreset = 'recommended' | 'strict' | 'minimal';\n\nexport interface RawInitAnswers {\n target?: InitConfigFormat;\n preset?: InitPreset;\n threshold?: number;\n exclude?: string;\n}\n\nexport interface ResolvedInitAnswers {\n configFormat: InitConfigFormat;\n preset: InitPreset;\n threshold: number | undefined;\n exclude: string[] | undefined;\n}\n\nexport interface InitOptions {\n dir: string;\n configFormat: InitConfigFormat;\n preset: InitPreset;\n threshold: number | undefined;\n exclude: string[] | undefined;\n binName: string;\n}\n\nexport interface InitFileWrite {\n path: string;\n content: string;\n}\n\nexport interface InitPlan {\n writes: InitFileWrite[];\n conflict: boolean;\n conflictPath: string | null;\n}\n\nexport function parseExcludeList(\n raw: string | undefined,\n): string[] | undefined {\n if (!raw) return undefined;\n const parts = raw\n .split(',')\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n return parts.length > 0 ? parts : undefined;\n}\n\nexport function normalizeInitAnswers(raw: RawInitAnswers): ResolvedInitAnswers {\n return {\n configFormat: raw.target ?? 'ts',\n preset: raw.preset ?? 'recommended',\n threshold: typeof raw.threshold === 'number' ? raw.threshold : undefined,\n exclude: parseExcludeList(raw.exclude),\n };\n}\n\nfunction frameworkLabel(project: ProjectInfo): string {\n if (project.framework === 'nuxt') {\n return `Nuxt ${project.nuxtVersion ?? 'unknown'}`;\n }\n if (project.framework === 'vue') {\n return `Vue ${project.vueVersion ?? 'unknown'}`;\n }\n return 'unknown project';\n}\n\nexport function renderDetectSummary(\n project: ProjectInfo,\n sfcCount: number,\n): string {\n const ts = project.capabilities.has('typescript') ? ' · TS' : '';\n const noun = sfcCount === 1 ? 'SFC' : 'SFCs';\n return `detected: ${frameworkLabel(project)}${ts} · ${sfcCount} ${noun}`;\n}\n\nexport async function detectSummary(dir: string): Promise<string> {\n const project = await detectProject(dir);\n const sfcs = await listSourceFiles({\n rootDir: dir,\n include: ['**/*.vue'],\n exclude: ['**/node_modules/**'],\n });\n return renderDetectSummary(project, sfcs.length);\n}\n\nfunction buildUserConfig(options: InitOptions): DoctorUserConfig {\n const config: DoctorUserConfig = { preset: options.preset };\n if (options.threshold !== undefined) config.threshold = options.threshold;\n if (options.exclude && options.exclude.length > 0) {\n config.exclude = options.exclude;\n }\n return config;\n}\n\nfunction renderTsConfig(options: InitOptions): string {\n const config = buildUserConfig(options);\n const lines = [\n \"import { defineConfig } from '@geoql/doctor-core';\",\n '',\n 'export default defineConfig({',\n ` preset: '${config.preset}',`,\n ];\n if (config.threshold !== undefined) {\n lines.push(` threshold: ${config.threshold},`);\n }\n if (config.exclude) {\n const globs = config.exclude.map((glob) => `'${glob}'`).join(', ');\n lines.push(` exclude: [${globs}],`);\n }\n lines.push('});');\n return `${lines.join('\\n')}\\n`;\n}\n\nfunction renderJsonConfig(options: InitOptions): string {\n return `${JSON.stringify(buildUserConfig(options), null, 2)}\\n`;\n}\n\ninterface MutablePackageJson {\n scripts?: Record<string, string>;\n doctor?: DoctorUserConfig;\n [key: string]: unknown;\n}\n\nasync function readPackageJsonRaw(\n path: string,\n): Promise<MutablePackageJson | null> {\n try {\n return JSON.parse(await readFile(path, 'utf8')) as MutablePackageJson;\n } catch {\n return null;\n }\n}\n\nexport async function planInit(options: InitOptions): Promise<InitPlan> {\n const writes: InitFileWrite[] = [];\n const packageJsonPath = join(options.dir, 'package.json');\n const existingPkg = await readPackageJsonRaw(packageJsonPath);\n const pkg: MutablePackageJson = { ...(existingPkg ?? {}) };\n\n let conflict = false;\n let conflictPath: string | null = null;\n\n if (options.configFormat === 'package-json') {\n if (pkg.doctor !== undefined) {\n conflict = true;\n conflictPath = packageJsonPath;\n }\n pkg.doctor = buildUserConfig(options);\n } else {\n const fileName =\n options.configFormat === 'ts' ? 'doctor.config.ts' : 'doctor.config.json';\n const configPath = join(options.dir, fileName);\n if (await pathExists(configPath)) {\n conflict = true;\n conflictPath = configPath;\n }\n const content =\n options.configFormat === 'ts'\n ? renderTsConfig(options)\n : renderJsonConfig(options);\n writes.push({ path: configPath, content });\n }\n\n pkg.scripts = { ...(pkg.scripts ?? {}), 'doctor:check': options.binName };\n writes.push({\n path: packageJsonPath,\n content: `${JSON.stringify(pkg, null, 2)}\\n`,\n });\n\n return { writes, conflict, conflictPath };\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","import { readFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { glob } from 'tinyglobby';\nimport { findMonorepoRoot } from './find-monorepo-root.js';\nimport { readPackageJson } from './read-package-json.js';\n\nexport interface WorkspacePackage {\n name: string;\n dir: string;\n}\n\nfunction parsePackageGlobs(yaml: string): string[] {\n const globs: string[] = [];\n let inPackages = false;\n for (const raw of yaml.split('\\n')) {\n if (!inPackages) {\n if (/^packages:/.test(raw)) inPackages = true;\n continue;\n }\n const item = raw.match(/^\\s*-\\s*(.+?)\\s*$/);\n if (item) {\n globs.push(item[1].replace(/^['\"]|['\"]$/g, ''));\n continue;\n }\n if (raw.trim() === '') continue;\n break;\n }\n return globs;\n}\n\nexport async function listWorkspacePackages(\n rootDir: string,\n): Promise<WorkspacePackage[]> {\n const { root, kind } = await findMonorepoRoot(rootDir);\n if (kind !== 'pnpm') return [];\n\n const yaml = await readFile(join(root, 'pnpm-workspace.yaml'), 'utf8');\n const globs = parsePackageGlobs(yaml);\n const manifests = await glob(\n globs.map((g) => `${g}/package.json`),\n { cwd: root, absolute: true, onlyFiles: true, dot: false },\n );\n\n const packages: WorkspacePackage[] = [];\n for (const manifest of manifests) {\n const dir = dirname(manifest);\n const pkg = await readPackageJson(dir);\n if (pkg?.name) packages.push({ name: pkg.name, dir });\n }\n packages.sort((a, b) => a.name.localeCompare(b.name));\n return packages;\n}\n","export function docsUrl(ruleId: string): string {\n return `https://docs.the-doctor.report/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 { relative } from 'node:path';\nimport type { Diagnostic } from '../types.js';\nimport { compareStrings } from './render.js';\nimport type { ReporterInput } from './types.js';\n\nconst DOCS_BASE = 'https://docs.the-doctor.report/rules/';\nconst MAX_PER_SECTION = 5;\n\nfunction binName(toolName: string): string {\n return toolName.replace('@geoql/', '');\n}\n\nfunction relativeLocation(diag: Diagnostic, rootDirectory: string): string {\n const file = relative(rootDirectory, diag.file).replaceAll('\\\\', '/');\n return `${file}:${diag.line}`;\n}\n\nfunction findingLine(diag: Diagnostic, rootDirectory: string): string {\n return `- \\`${relativeLocation(diag, rootDirectory)}\\` ${diag.ruleId} — ${diag.message}`;\n}\n\nfunction sortBySeverityFilter(\n diagnostics: readonly Diagnostic[],\n severity: Diagnostic['severity'],\n rootDirectory: string,\n): Diagnostic[] {\n return diagnostics\n .filter((d) => d.severity === severity)\n .sort((a, b) => {\n const byFile = compareStrings(\n relative(rootDirectory, a.file).replaceAll('\\\\', '/'),\n relative(rootDirectory, b.file).replaceAll('\\\\', '/'),\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 section(\n title: string,\n diagnostics: Diagnostic[],\n rootDirectory: string,\n): string[] {\n if (diagnostics.length === 0) return [];\n const lines = ['', `### ${title}`];\n for (const d of diagnostics.slice(0, MAX_PER_SECTION)) {\n lines.push(findingLine(d, rootDirectory));\n }\n return lines;\n}\n\nexport function prCommentReport(input: ReporterInput): string {\n const score = input.score.score;\n const header = `## 🛡 ${input.toolName} — Score: ${score}`;\n const errors = sortBySeverityFilter(\n input.diagnostics,\n 'error',\n input.rootDirectory,\n );\n const warnings = sortBySeverityFilter(\n input.diagnostics,\n 'warn',\n input.rootDirectory,\n );\n const actionable = errors.length + warnings.length;\n\n if (actionable === 0) {\n return `${header}\\n\\n✓ No actionable findings. Score: ${score}\\n`;\n }\n\n const topRule = (errors[0] ?? warnings[0]).ruleId;\n const lines: string[] = [\n header,\n '',\n `**${actionable} findings** (${errors.length} errors, ${warnings.length} warnings)`,\n ...section('Errors', errors, input.rootDirectory),\n ...section('Warnings', warnings, input.rootDirectory),\n '',\n '---',\n `[View the docs](${DOCS_BASE}) · Run \\`${binName(input.toolName)} explain ${topRule}\\` for details.`,\n ];\n\n return `${lines.join('\\n')}\\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 { prCommentReport } from './pr-comment.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 | 'pr-comment';\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 if (kind === 'pr-comment') return prCommentReport(input);\n return agentReport(input, options);\n}\n","import { scoreDiagnostics } from './score.js';\nimport type { AuditReport, Diagnostic } from './types.js';\n\n/**\n * Filter `report.diagnostics` to a known set of allowed rule ids, then\n * recompute `score`, `errorCount`, `warnCount`, `infoCount`, `scoreResult`,\n * `ruleCounts`, and `exitCode` from the filtered array.\n *\n * Why: the CLI layer calls `audit()` and then applies its own\n * `allowedRuleIds` filter to drop suppressed (`off`) and preset-excluded\n * (`info` rules not in `recommended`) diagnostics. The audit's own\n * `score`/`counts` are computed BEFORE the CLI filter, so they still\n * include the suppressed findings. That desync surfaces to consumers\n * (the SaaS `--push` payload, the dashboard's counts-but-no-findings bug)\n * and to the `score` itself (suppressed findings still penalize).\n *\n * Invariant enforced here:\n * report.errorCount + report.warnCount + report.infoCount === report.diagnostics.length\n * report.scoreResult.totalFindings === report.diagnostics.length\n *\n * `exitCode=2` (oxlint crash) is preserved verbatim; `exitCode=1` is\n * recomputed from the surviving counts + the `failOn` gate.\n */\nexport function filterReportByRules(\n report: AuditReport,\n allowedRuleIds: ReadonlySet<string>,\n failOn: 'error' | 'warn' | 'none' = 'error',\n oxlintStderr?: string,\n): AuditReport {\n const filtered: Diagnostic[] = [];\n for (const d of report.diagnostics) {\n if (allowedRuleIds.has(d.ruleId)) filtered.push(d);\n }\n\n const threshold = report.scoreResult.threshold;\n const scoreResult = scoreDiagnostics(filtered, { threshold });\n\n const ruleCounts: Record<string, number> = {};\n for (const d of filtered) {\n ruleCounts[d.ruleId] = (ruleCounts[d.ruleId] ?? 0) + 1;\n }\n\n let exitCode: 0 | 1 | 2 = report.exitCode;\n if (exitCode !== 2) {\n if (failOn === 'none') {\n exitCode = 0;\n } else {\n const tripping =\n failOn === 'warn'\n ? scoreResult.errorCount + scoreResult.warnCount\n : scoreResult.errorCount;\n exitCode = tripping > 0 ? 1 : 0;\n }\n }\n // When the audit reported an oxlint-crash exit=2 it usually also set\n // scoreResult.keepResultFromOxlint — not applicable here, the helper\n // just preserves exit=2 unchanged when stderr indicates the crash.\n // (The oxlintStderr parameter is kept for forward-compatibility: the\n // CLI passes the same stderr it saw and we don't second-guess exit=2.)\n void oxlintStderr;\n\n return {\n ...report,\n diagnostics: filtered,\n score: scoreResult.score,\n errorCount: scoreResult.errorCount,\n warnCount: scoreResult.warnCount,\n infoCount: scoreResult.infoCount,\n scoreResult,\n ruleCounts,\n exitCode,\n };\n}\n","import { isAbsolute, relative } from 'node:path';\nimport { RULE_REGISTRY } from './rule-registry.js';\nimport type { Diagnostic, Severity } from './types.js';\n\n/**\n * The 6 fields the SaaS receives for each finding.\n * Everything else (message, codeSnippet, recommendation, etc.) is privacy-sensitive\n * and MUST be stripped before transmission.\n */\nexport interface PushedFinding {\n file: string;\n line: number;\n col: number;\n ruleId: string;\n severity: Severity;\n category: string;\n}\n\nexport interface PushPayloadInput {\n project: string;\n score: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n findings: PushedFinding[];\n}\n\nexport interface PushPayload extends PushPayloadInput {\n commitSha?: string;\n branch?: string;\n prNumber?: number;\n}\n\nexport interface PushOptions {\n project: string;\n score: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n diagnostics: Diagnostic[];\n /** Project root used to relativize absolute finding file paths. */\n rootDir?: string;\n url: string;\n apiKey: string;\n fetchImpl?: typeof fetch;\n /** Overrides for the request timeout (ms). Defaults to 5000. Test-only. */\n timeoutMs?: number;\n}\n\nexport type PushResult =\n | { ok: true; status?: number; error?: undefined }\n | { ok: false; status?: number; error: string };\n\nconst PUSH_TIMEOUT_MS = 5000;\n\nconst categoryByRuleId: ReadonlyMap<string, string> = new Map(\n RULE_REGISTRY.map((r) => [r.id, r.category]),\n);\n\nfunction lookupCategory(ruleId: string): string {\n return categoryByRuleId.get(ruleId) ?? 'unknown';\n}\n\nfunction toRepoRelative(file: string, rootDir: string | undefined): string {\n if (!rootDir || !isAbsolute(file)) return file;\n const rel = relative(rootDir, file);\n // Paths outside rootDir would relativize to ../../… which is more\n // confusing (and more revealing) than the original — keep those as-is.\n if (rel.startsWith('..')) return file;\n return rel;\n}\n\n/**\n * Strip a list of Diagnostics down to the 6 allowed push fields.\n * Privacy boundary: this function is the single point of enforcement.\n * If you add a new privacy-sensitive field to Diagnostic, add it to the deny list here.\n *\n * Absolute file paths are relativized against rootDir so dashboards show\n * `src/Foo.vue` rather than the CI runner's `/home/runner/work/<repo>/…`.\n */\nexport function stripFindings(\n diagnostics: Diagnostic[],\n rootDir?: string,\n): PushedFinding[] {\n const out: PushedFinding[] = new Array(diagnostics.length);\n for (let i = 0; i < diagnostics.length; i++) {\n const d = diagnostics[i]!;\n out[i] = {\n file: toRepoRelative(d.file, rootDir),\n line: d.line,\n col: d.column,\n ruleId: d.ruleId,\n severity: d.severity,\n category: lookupCategory(d.ruleId),\n };\n }\n return out;\n}\n\nfunction readOptionalEnv(name: string): string | undefined {\n const v = process.env[name];\n return v === undefined || v === '' ? undefined : v;\n}\n\nfunction readPrNumber(): number | undefined {\n const raw = readOptionalEnv('GITHUB_PR_NUMBER');\n if (raw === undefined) return undefined;\n const n = Number(raw);\n return Number.isFinite(n) ? n : undefined;\n}\n\n/**\n * Build the top-level POST body. CI fields (commitSha, branch, prNumber) are\n * included ONLY when the matching GITHUB_* env var is set.\n */\nexport function buildPushPayload(input: PushPayloadInput): PushPayload {\n const payload: PushPayload = {\n project: input.project,\n score: input.score,\n errorCount: input.errorCount,\n warnCount: input.warnCount,\n infoCount: input.infoCount,\n findings: input.findings,\n };\n const commitSha = readOptionalEnv('GITHUB_SHA');\n const branch = readOptionalEnv('GITHUB_REF_NAME');\n const prNumber = readPrNumber();\n if (commitSha !== undefined) payload.commitSha = commitSha;\n if (branch !== undefined) payload.branch = branch;\n if (prNumber !== undefined) payload.prNumber = prNumber;\n return payload;\n}\n\n/**\n * Strip + POST findings to a SaaS endpoint. Never throws — returns\n * `{ ok: false, error }` on any HTTP / network failure so the audit's\n * exit code is not affected by SaaS downtime.\n */\nexport async function pushFindings(opts: PushOptions): Promise<PushResult> {\n const findings = stripFindings(opts.diagnostics, opts.rootDir);\n const payload = buildPushPayload({\n project: opts.project,\n score: opts.score,\n errorCount: opts.errorCount,\n warnCount: opts.warnCount,\n infoCount: opts.infoCount,\n findings,\n });\n\n const fetchImpl: typeof fetch = opts.fetchImpl ?? fetch;\n const controller = new AbortController();\n const timeoutMs = opts.timeoutMs ?? PUSH_TIMEOUT_MS;\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n timer.unref?.();\n\n try {\n const res = await fetchImpl(opts.url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': opts.apiKey,\n },\n body: JSON.stringify(payload),\n signal: controller.signal,\n });\n clearTimeout(timer);\n if (res.ok) {\n return { ok: true, status: res.status };\n }\n return {\n ok: false,\n status: res.status,\n error: `HTTP ${res.status} ${res.statusText}`.trim(),\n };\n } catch (err) {\n clearTimeout(timer);\n const message = err instanceof Error ? err.message : String(err);\n return { ok: false, error: message };\n }\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,aAAa,UAAU,UAAU,UAOxC,GANJ;EACZ,QAAQ,eAAe,WAAW,KAAK;EACvC,QAAQ,WAAW;EACnB,O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GAAM,QAAQ,IAAI;GAAQ;EAEzC,OAAO;GACL,IAAI;GACJ,QAAQ,IAAI;GACZ,OAAO,QAAQ,IAAI,OAAO,GAAG,IAAI,aAAa,MAAM;GACrD;UACM,KAAK;EACZ,aAAa,MAAM;EAEnB,OAAO;GAAE,IAAI;GAAO,OADJ,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;GAC5B"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["RULE_ID","DOCS","RULE_ID","DOCS","RULE_ID","DOCS","RULE_ID","RULE_ID","RULE_ID","parseMajorMinor","CONFIG_FILES","readConfigSource","objectEntries","findEntry","extractConfigObject","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","RULE_ID","resolvePath","cache","RULE_ID","MESSAGE","RECOMMENDATION","check","NODE_ELEMENT","RULE_ID","MESSAGE","RECOMMENDATION","check","RULE_ID","MESSAGE","RECOMMENDATION","check","RULE_ID","MESSAGE","RECOMMENDATION","check","noMixedOptionsAndCompositionApi","useSeoMetaOnPublicPage","ogImageDefined","noMixedAppAndRootLayout","NODE_DIRECTIVE","check","check","check","NODE_DIRECTIVE","checkElement","check","NODE_ELEMENT","NODE_DIRECTIVE","checkElement","check","NODE_DIRECTIVE","check","check","unquote","check","NODE_ATTRIBUTE","check","check","RULE_ID","MESSAGE","RECOMMENDATION","check","check","check","check","check","vForHasKey","vIfVForPrecedence","vMemoOnLargeList","noInlineObjectPropInList","noComputedGetterInTemplateLoop","avoidDeepVBindSpreadInList","noVHtml","noTargetBlankWithoutRel","noJavascriptUri","noArbitraryTailwindValues","noRawHexColor","noDefaultTailwindPalette","noImportantUtility","noHardcodedInlineStyle","noMissingAlt","noAbsurdZIndex","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/project-info/parse-nuxt-config.ts","../src/nuxt/post-checks/compatibility-date-set.ts","../src/nuxt/post-checks/lang-on-html.ts","../src/nuxt/post-checks/nitro-cloudflare-preset.ts","../src/nuxt/post-checks/no-modules-incompatible-with-nuxt-4.ts","../src/nuxt/post-checks/no-node-only-modules.ts","../src/nuxt/post-checks/no-secret-in-public-runtime-config.ts","../src/nuxt/post-checks/nuxt-major-current.ts","../src/nuxt/post-checks/og-image-via-satori.ts","../src/nuxt/post-checks/preset-defined-for-deploy-target.ts","../src/nuxt/post-checks/recommended-modules-installed.ts","../src/nuxt/post-checks/runtime-config-typed.ts","../src/nuxt/post-checks/uses-app-directory.ts","../src/check-nuxt-project.ts","../src/disables/parse-directives.ts","../src/disables/apply.ts","../src/code-snippet.ts","../src/project-info/fs-checks.ts","../src/project-info/path-exists.ts","../src/project-info/find-monorepo-root.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/nuxt/file-role.ts","../src/template/walk.ts","../src/sfc/rules/nuxt/no-mixed-app-and-root-layout.ts","../src/sfc/rules/nuxt/og-image-defined.ts","../src/sfc/rules/nuxt/use-seo-meta-on-public-page.ts","../src/sfc/rules/index.ts","../src/sfc/run.ts","../src/nuxt/cross-file/run.ts","../src/template/parse-sfc.ts","../src/template/directive-helpers.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/no-v-html.ts","../src/template/rules/no-target-blank-without-rel.ts","../src/template/rules/no-javascript-uri.ts","../src/template/class-attr-helpers.ts","../src/template/rules/no-arbitrary-tailwind-values.ts","../src/template/rules/no-raw-hex-color.ts","../src/template/rules/no-default-tailwind-palette.ts","../src/template/rules/no-important-utility.ts","../src/template/rules/no-hardcoded-inline-style.ts","../src/template/rules/no-missing-alt.ts","../src/template/rules/no-absurd-z-index.ts","../src/template/rules/index.ts","../src/template/run.ts","../src/audit.ts","../src/config/built-in.ts","../src/config/errors.ts","../src/config/define-config.ts","../src/rule-registry.ts","../src/config/presets.ts","../src/config/schema.ts","../src/config/validate.ts","../src/config/load.ts","../src/config/merge-cli-overrides.ts","../src/init/index.ts","../src/git-scope.ts","../src/project-info/list-workspace-packages.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/pr-comment.ts","../src/reporters/pretty.ts","../src/reporters/verbose.ts","../src/reporters/index.ts","../src/rule-prompt.ts","../src/audit-filter.ts","../src/push.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 name?: string;\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 ignoreWorkspaces: string[];\n compilers?: Record<string, true>;\n}\n\n// Demo/playground sub-workspaces are dev-only surface, not the published\n// library. `example/` is the Vue-library demo convention; `playground/` is the\n// Nuxt-module convention. knip auto-discovers them as workspaces and tries to\n// load their vite.config.ts / nuxt.config.ts — which fails (\"Cannot find module\n// 'vite'\") in a bare CI checkout with no node_modules, leaking to stderr.\n// `ignoreWorkspaces` is the ONLY knip mechanism that skips a workspace BEFORE\n// its config files are loaded (`ignore` globs filter results too late; a\n// `workspaces` map only ADDS to auto-discovery, never replaces it).\nconst DEMO_WORKSPACES = ['example', 'playground'];\n\nexport function buildKnipConfig(\n projectInfo: ProjectInfo,\n doctorConfig: ResolvedDoctorConfig,\n): KnipConfig {\n const isNuxt = projectInfo.framework === 'nuxt';\n\n // Files registered by build-time plugins (unplugin-auto-import,\n // unplugin-vue-components, file-based routing/layouts) have no explicit import,\n // so knip flags them as unused. Treat their convention dirs as entry points\n // when the project actually uses those plugins, otherwise the dead-code pass\n // reports hundreds of false positives (see issue #85).\n const usesConventionResolution =\n projectInfo.hasAutoImports ||\n projectInfo.hasComponentsAutoImport ||\n projectInfo.hasVueRouter;\n\n const entry = isNuxt\n ? [\n 'app/**/*.vue',\n 'app/**/*.ts',\n 'server/**/*.ts',\n 'nuxt.config.{ts,js,mjs}',\n ]\n : [\n 'src/main.{ts,js}',\n 'src/App.vue',\n 'index.html',\n 'vite.config.{ts,js}',\n ...(usesConventionResolution\n ? [\n 'src/pages/**/*.vue',\n 'src/layouts/**/*.vue',\n 'src/components/**/*.vue',\n 'src/composables/**/*.ts',\n 'src/stores/**/*.ts',\n ]\n : []),\n ];\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 ignoreWorkspaces: [...DEMO_WORKSPACES],\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 { mkdir, writeFile } from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport type { Diagnostic } from './types.js';\nimport type { KnipConfig } from './dead-code/build-knip-config.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\nasync function writeKnipConfig(\n rootDir: string,\n config: KnipConfig,\n): Promise<string> {\n const cacheDir = join(rootDir, 'node_modules', '.cache', 'doctor');\n await mkdir(cacheDir, { recursive: true });\n const configPath = join(cacheDir, 'knip.json');\n const knipJson: Record<string, unknown> = {\n entry: config.entry,\n project: config.project,\n ignore: config.ignoreFiles,\n ignoreDependencies: config.ignoreDependencies,\n ignoreWorkspaces: config.ignoreWorkspaces,\n };\n if (config.compilers) knipJson.compilers = config.compilers;\n await writeFile(configPath, JSON.stringify(knipJson, null, 2), 'utf8');\n return configPath;\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 // knip's createOptions IGNORES entry/project passed as options (its Options\n // type has no such fields). The only programmatic way to inject them is via a\n // config file referenced through args.config — so synthesize one on disk and\n // point knip at it. Without this, knip falls back to its default entry globs\n // ({index,cli,main}) and reports auto-imported/file-routed files as unused.\n const configPath = await writeKnipConfig(\n options.projectInfo.rootDirectory,\n config,\n );\n\n const knipOptions = await createOptions({\n cwd: options.projectInfo.rootDirectory,\n args: { config: configPath },\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","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { parseSync } from 'oxc-parser';\n\nexport interface NuxtConfigInfo {\n compatibilityVersion?: number;\n compatibilityDate?: string;\n nitroPreset?: string;\n modules?: string[];\n importsAutoImport?: boolean;\n hasRuntimeConfig?: boolean;\n htmlLang?: string;\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\nfunction readHtmlLang(value: AstNode): string | undefined {\n if (value.type !== 'ObjectExpression') return undefined;\n const head = findEntry(value, 'head');\n if (head?.type !== 'ObjectExpression') return undefined;\n const htmlAttrs = findEntry(head, 'htmlAttrs');\n if (htmlAttrs?.type !== 'ObjectExpression') return undefined;\n const lang = findEntry(htmlAttrs, 'lang');\n return lang ? stringLiteral(lang) : 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 === 'compatibilityDate') {\n const date = stringLiteral(value);\n if (date !== undefined) info.compatibilityDate = date;\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 } else if (key === 'runtimeConfig') {\n info.hasRuntimeConfig = true;\n } else if (key === 'app') {\n const lang = readHtmlLang(value);\n if (lang !== undefined) info.htmlLang = lang;\n }\n }\n return info;\n}\n","import type { NuxtConfigInfo } from '../../project-info/parse-nuxt-config.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/nitro/compatibilityDate-set';\n\nexport function checkCompatibilityDateSet(\n projectInfo: ProjectInfo,\n nuxtConfig: NuxtConfigInfo | null,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (nuxtConfig?.compatibilityDate !== undefined) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'error',\n message:\n 'No compatibilityDate is set. Nuxt 4 and Nitro require a compatibilityDate to pin deployment behaviour.',\n recommendation:\n \"Add compatibilityDate: 'YYYY-MM-DD' to defineNuxtConfig in nuxt.config.\",\n },\n ];\n}\n","import type { NuxtConfigInfo } from '../../project-info/parse-nuxt-config.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/seo/lang-on-html';\n\nexport function checkLangOnHtml(\n projectInfo: ProjectInfo,\n nuxtConfig: NuxtConfigInfo | null,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (nuxtConfig?.htmlLang !== undefined) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'warn',\n message:\n 'No lang attribute is set on the html element. Screen readers and search engines rely on it.',\n recommendation:\n \"Set app.head.htmlAttrs.lang (e.g. 'en') in defineNuxtConfig.\",\n },\n ];\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/cloudflare/nitro-cloudflare-preset';\n\nconst CLOUDFLARE_PRESETS = new Set([\n 'cloudflare-pages',\n 'cloudflare-module',\n 'cloudflare',\n]);\n\nexport function checkNitroCloudflarePreset(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) return [];\n if (projectInfo.nitroPreset === null) return [];\n if (CLOUDFLARE_PRESETS.has(projectInfo.nitroPreset)) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'warn',\n message: `A wrangler config is present but the Nitro preset is '${projectInfo.nitroPreset}', not a Cloudflare preset.`,\n recommendation:\n \"Set nitro.preset to 'cloudflare-module' (or 'cloudflare-pages') to deploy on Cloudflare.\",\n },\n ];\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/modules-deps/no-modules-incompatible-with-nuxt-4';\n\nconst INCOMPATIBLE_MODULES = new Set([\n '@nuxtjs/composition-api',\n '@nuxt/bridge',\n 'nuxt-property-decorator',\n]);\n\nexport async function checkNoModulesIncompatibleWithNuxt4(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\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 (INCOMPATIBLE_MODULES.has(key) && !offenders.includes(key)) {\n offenders.push(key);\n }\n }\n\n return offenders.map((name, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'warn',\n message: `${name} is incompatible with Nuxt 4 and is no longer maintained.`,\n recommendation: `Remove ${name} and adopt the Nuxt 4 native equivalent.`,\n }));\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/cloudflare/no-node-only-modules';\n\n// Modules that rely on native bindings or the Node runtime and do not work on\n// the Cloudflare Workers runtime without a compatible replacement.\nconst NODE_ONLY_MODULES = new Set(['fs-extra', 'sharp']);\n\nexport async function checkNoNodeOnlyModules(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) 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 (NODE_ONLY_MODULES.has(key) && !offenders.includes(key)) {\n offenders.push(key);\n }\n }\n\n return offenders.map((name, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'warn',\n message: `${name} is a Node-only module and does not run on the Cloudflare Workers runtime.`,\n recommendation: `Replace ${name} with a Workers-compatible alternative or move it to a build-only step.`,\n }));\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { parseSync } from 'oxc-parser';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/security/no-secret-in-public-runtime-config';\n\nconst SECRET_KEY =\n /secret|password|passwd|token|jwt|api[-_]?key|private[-_]?key|bearer|credential/i;\n\nconst CONFIG_FILES = ['nuxt.config.ts', 'nuxt.config.js', 'nuxt.config.mjs'];\n\ninterface AstNode {\n type: string;\n [key: string]: unknown;\n}\n\nfunction offsetToPosition(\n source: string,\n offset: number,\n): { line: number; column: number } {\n let line = 1;\n let lineStart = 0;\n for (let i = 0; i < offset; i++) {\n if (source.charCodeAt(i) === 10) {\n line++;\n lineStart = i + 1;\n }\n }\n return { line, column: offset - lineStart + 1 };\n}\n\nasync function readConfigSource(\n dir: string,\n): Promise<{ source: string; file: string } | null> {\n for (const name of CONFIG_FILES) {\n try {\n const file = join(dir, name);\n return { source: await readFile(file, 'utf8'), file };\n } catch {\n continue;\n }\n }\n return null;\n}\n\nfunction* objectEntries(obj: AstNode): Generator<[string, AstNode, 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, key];\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 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 decl = exported.declaration as AstNode;\n if (decl.type === 'ObjectExpression') return decl;\n if (decl.type !== 'CallExpression') return null;\n const callee = decl.callee as AstNode;\n if (callee.type !== 'Identifier' || callee.name !== 'defineNuxtConfig') {\n return null;\n }\n const arg = (decl.arguments as AstNode[])[0];\n return arg?.type === 'ObjectExpression' ? arg : null;\n}\n\nexport async function checkNoSecretInPublicRuntimeConfig(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const config = await readConfigSource(projectInfo.rootDirectory);\n if (config === null) return [];\n\n const root = extractConfigObject(config.source);\n if (!root) return [];\n\n const runtimeConfig = findEntry(root, 'runtimeConfig');\n if (runtimeConfig?.type !== 'ObjectExpression') return [];\n\n const publicBlock = findEntry(runtimeConfig, 'public');\n if (publicBlock?.type !== 'ObjectExpression') return [];\n\n const issues: NuxtPostCheckIssue[] = [];\n for (const [name, , keyNode] of objectEntries(publicBlock)) {\n if (!SECRET_KEY.test(name)) continue;\n const offset = keyNode.start as number;\n const position = offsetToPosition(config.source, offset);\n issues.push({\n ruleId: RULE_ID,\n file: config.file,\n line: position.line,\n column: position.column,\n severity: 'error',\n message: `runtimeConfig.public.${name} is serialized to the client bundle, exposing the secret. Move it to the private root of runtimeConfig.`,\n recommendation: `Move ${name} out of runtimeConfig.public to the top level of runtimeConfig so it stays server-only.`,\n });\n }\n return issues;\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/structure/nuxt-major-current';\n\nconst DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR = 4;\nconst DOCTOR_BUNDLED_NUXT_FLOOR_MINOR = 4;\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 checkNuxtMajorCurrent(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.nuxtVersion === null) return [];\n\n const parsed = parseMajorMinor(projectInfo.nuxtVersion);\n if (parsed === null) return [];\n\n if (parsed.major !== DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR) return [];\n if (parsed.minor >= DOCTOR_BUNDLED_NUXT_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: `Nuxt ${projectInfo.nuxtVersion} is older than the doctor-bundled floor (^${DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR}.${DOCTOR_BUNDLED_NUXT_FLOOR_MINOR}.0). Newer minors ship rule-relevant fixes and Nitro improvements.`,\n recommendation: `Bump \"nuxt\" to ^${DOCTOR_BUNDLED_NUXT_FLOOR_MAJOR}.${DOCTOR_BUNDLED_NUXT_FLOOR_MINOR}.0 or later in package.json.`,\n },\n ];\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/cloudflare/og-image-via-satori';\n\nconst OG_IMAGE_MODULES = ['@nuxtjs/og-image', 'nuxt-og-image'];\n\nexport async function checkOgImageViaSatori(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) return [];\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n\n const installed = new Set([\n ...Object.keys(deps.dependencies),\n ...Object.keys(deps.devDependencies),\n ]);\n if (OG_IMAGE_MODULES.some((name) => installed.has(name))) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'info',\n message:\n 'Running on Cloudflare with no OG image module installed; dynamic social images are unconfigured.',\n recommendation:\n 'Add @nuxtjs/og-image to generate Satori-based OG images that run on Cloudflare Workers.',\n },\n ];\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/nitro/preset-defined-for-deploy-target';\n\nexport function checkPresetDefinedForDeployTarget(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (!projectInfo.hasWranglerConfig) return [];\n if (projectInfo.nitroPreset !== null) return [];\n\n const file = projectInfo.nuxtConfigPath ?? projectInfo.packageJsonPath;\n\n return [\n {\n ruleId: RULE_ID,\n file,\n line: 1,\n column: 1,\n severity: 'warn',\n message:\n 'A wrangler config is present but no Nitro preset is defined for the deploy target.',\n recommendation:\n \"Set nitro.preset in nuxt.config (e.g. 'cloudflare-module') to match your deploy target.\",\n },\n ];\n}\n","import { readDeps } from '../../build-quality/read-deps.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/modules-deps/recommended-modules-installed';\n\ninterface RecommendedGroup {\n readonly label: string;\n readonly candidates: readonly string[];\n}\n\nconst RECOMMENDED_GROUPS: readonly RecommendedGroup[] = [\n { label: '@nuxt/image', candidates: ['@nuxt/image'] },\n { label: '@nuxtjs/seo', candidates: ['@nuxtjs/seo', '@nuxtjs/sitemap'] },\n { label: '@nuxt/fonts', candidates: ['@nuxt/fonts'] },\n];\n\nexport async function checkRecommendedModulesInstalled(\n projectInfo: ProjectInfo,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n\n const deps = await readDeps(projectInfo.packageJsonPath);\n if (deps === null) return [];\n\n const installed = new Set([\n ...Object.keys(deps.dependencies),\n ...Object.keys(deps.devDependencies),\n ]);\n\n const missing = RECOMMENDED_GROUPS.filter(\n (group) => !group.candidates.some((name) => installed.has(name)),\n );\n\n return missing.map((group, index) => ({\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath as string,\n line: index + 1,\n column: 1,\n severity: 'info',\n message: `Recommended Nuxt 4 module ${group.label} is not installed.`,\n recommendation: `Add ${group.label} to dependencies to improve image, SEO, or font handling.`,\n }));\n}\n","import { readFile, readdir } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport type { NuxtConfigInfo } from '../../project-info/parse-nuxt-config.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/nitro/runtime-config-typed';\n\nasync function hasRuntimeConfigAugmentation(dir: string): Promise<boolean> {\n const entries = await readdir(dir);\n for (const name of entries) {\n if (!name.endsWith('.d.ts')) continue;\n const source = await readFile(join(dir, name), 'utf8');\n if (source.includes('RuntimeConfig')) return true;\n }\n return false;\n}\n\nexport async function checkRuntimeConfigTyped(\n projectInfo: ProjectInfo,\n nuxtConfig: NuxtConfigInfo | null,\n): Promise<NuxtPostCheckIssue[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (nuxtConfig?.hasRuntimeConfig !== true) return [];\n\n if (await hasRuntimeConfigAugmentation(projectInfo.rootDirectory)) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'info',\n message:\n 'runtimeConfig is defined but no RuntimeConfig type augmentation was found, so runtime config access is untyped.',\n recommendation:\n \"Augment 'nuxt/schema' with a RuntimeConfig interface in a .d.ts file to type useRuntimeConfig().\",\n },\n ];\n}\n","import type { ProjectInfo } from '../../types/project-info.js';\nimport type { NuxtPostCheckIssue } from './types.js';\n\nconst RULE_ID = 'nuxt-doctor/structure/uses-app-directory';\n\nexport function checkUsesAppDirectory(\n projectInfo: ProjectInfo,\n): NuxtPostCheckIssue[] {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.hasAppDir) return [];\n\n return [\n {\n ruleId: RULE_ID,\n file: projectInfo.packageJsonPath,\n line: 1,\n column: 1,\n severity: 'warn',\n message:\n 'No app/ directory found. Nuxt 4 expects source under app/ (app/pages, app/components, app/app.vue).',\n recommendation:\n 'Create an app/ directory and move pages, components, layouts, and app.vue into it.',\n },\n ];\n}\n","import { parseNuxtConfig } from './project-info/parse-nuxt-config.js';\nimport { checkCompatibilityDateSet } from './nuxt/post-checks/compatibility-date-set.js';\nimport { checkLangOnHtml } from './nuxt/post-checks/lang-on-html.js';\nimport { checkNitroCloudflarePreset } from './nuxt/post-checks/nitro-cloudflare-preset.js';\nimport { checkNoModulesIncompatibleWithNuxt4 } from './nuxt/post-checks/no-modules-incompatible-with-nuxt-4.js';\nimport { checkNoNodeOnlyModules } from './nuxt/post-checks/no-node-only-modules.js';\nimport { checkNoSecretInPublicRuntimeConfig } from './nuxt/post-checks/no-secret-in-public-runtime-config.js';\nimport { checkNuxtMajorCurrent } from './nuxt/post-checks/nuxt-major-current.js';\nimport { checkOgImageViaSatori } from './nuxt/post-checks/og-image-via-satori.js';\nimport { checkPresetDefinedForDeployTarget } from './nuxt/post-checks/preset-defined-for-deploy-target.js';\nimport { checkRecommendedModulesInstalled } from './nuxt/post-checks/recommended-modules-installed.js';\nimport { checkRuntimeConfigTyped } from './nuxt/post-checks/runtime-config-typed.js';\nimport type { NuxtPostCheckIssue } from './nuxt/post-checks/types.js';\nimport { checkUsesAppDirectory } from './nuxt/post-checks/uses-app-directory.js';\nimport type { Diagnostic } from './types.js';\nimport type { ProjectInfo } from './types/project-info.js';\n\nexport async function checkNuxtProject(\n projectInfo: ProjectInfo,\n): Promise<Diagnostic[]> {\n if (projectInfo.packageJsonPath === null) return [];\n if (projectInfo.framework !== 'nuxt') return [];\n\n const nuxtConfig = await parseNuxtConfig(projectInfo.rootDirectory);\n\n const results = await Promise.all([\n Promise.resolve(checkUsesAppDirectory(projectInfo)),\n Promise.resolve(checkNuxtMajorCurrent(projectInfo)),\n checkNoModulesIncompatibleWithNuxt4(projectInfo),\n checkRecommendedModulesInstalled(projectInfo),\n Promise.resolve(checkCompatibilityDateSet(projectInfo, nuxtConfig)),\n Promise.resolve(checkPresetDefinedForDeployTarget(projectInfo)),\n checkRuntimeConfigTyped(projectInfo, nuxtConfig),\n Promise.resolve(checkLangOnHtml(projectInfo, nuxtConfig)),\n Promise.resolve(checkNitroCloudflarePreset(projectInfo)),\n checkOgImageViaSatori(projectInfo),\n checkNoNodeOnlyModules(projectInfo),\n checkNoSecretInPublicRuntimeConfig(projectInfo),\n ]);\n\n const issues: NuxtPostCheckIssue[] = 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","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 { existsSync, statSync } from 'node:fs';\nimport { join } from 'node:path';\n\n/**\n * Synchronously reports whether `target` exists and is a directory. Missing\n * paths and non-directory entries both return false rather than throwing.\n */\nexport function directoryExists(target: string): boolean {\n try {\n return statSync(target).isDirectory();\n } catch {\n return false;\n }\n}\n\n/**\n * Returns the absolute path of the first existing candidate file (resolved\n * against `dir`), or null when none of the candidates exist.\n */\nexport function resolveExistingFile(\n dir: string,\n candidates: readonly string[],\n): string | null {\n for (const name of candidates) {\n const full = join(dir, name);\n if (existsSync(full)) return full;\n }\n return null;\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 { 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 {\n directoryExists,\n resolveExistingFile,\n} from './project-info/fs-checks.js';\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 isNuxtMajor4: boolean;\n hasNuxtConfig: boolean;\n hasAppDir: boolean;\n hasServerDir: boolean;\n hasPagesDir: 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 if (input.isNuxtMajor4) caps.add('nuxt4');\n\n if (input.hasNuxtConfig) caps.add('nuxt-config');\n if (input.hasAppDir) caps.add('app-dir');\n if (input.hasServerDir) caps.add('server-dir');\n if (input.hasPagesDir) caps.add('pages-dir');\n if (input.hasWrangler) caps.add('wrangler');\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 wranglerConfigPath = resolveExistingFile(rootDirectory, [\n 'wrangler.toml',\n 'wrangler.jsonc',\n 'wrangler.json',\n ]);\n const hasWranglerConfig = wranglerConfigPath !== null;\n\n const nuxtConfigPath = resolveExistingFile(rootDirectory, [\n 'nuxt.config.ts',\n 'nuxt.config.js',\n 'nuxt.config.mjs',\n ]);\n\n const appDirPath = join(rootDirectory, 'app');\n const hasAppDir = directoryExists(appDirPath);\n const hasServerDir = directoryExists(join(rootDirectory, 'server'));\n const hasPagesDir =\n (hasAppDir && directoryExists(join(appDirPath, 'pages'))) ||\n directoryExists(join(rootDirectory, 'pages'));\n\n const isNuxtMajor4 = nuxtVersion !== null && major(nuxtVersion) >= 4;\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: hasWranglerConfig,\n isNuxtMajor4,\n hasNuxtConfig: nuxtConfigPath !== null,\n hasAppDir,\n hasServerDir,\n hasPagesDir,\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 nuxtConfigPath,\n hasAppDir,\n appDirPath: hasAppDir ? appDirPath : null,\n hasServerDir,\n hasPagesDir,\n hasWranglerConfig,\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 pluginPaths: string[];\n ruleOverrides?: Record<string, Severity | 'off'>;\n rootDir?: string;\n framework?: 'vue' | 'nuxt';\n}\n\nexport interface GeneratedConfig {\n configPath: string;\n cleanup: () => Promise<void>;\n}\n\nconst VUE_DEFAULT_RULES: Record<string, Severity> = {\n 'vue/no-export-in-script-setup': 'error',\n 'vue/require-typed-ref': 'warn',\n 'vue/no-arrow-functions-in-watch': 'error',\n 'vue/no-deprecated-data-object-declaration': 'error',\n 'vue/no-deprecated-events-api': 'error',\n 'vue/no-deprecated-destroyed-lifecycle': 'error',\n 'vue/no-deprecated-model-definition': 'error',\n 'vue/no-deprecated-delete-set': 'error',\n 'vue/no-deprecated-vue-config-keycodes': 'error',\n 'vue/no-lifecycle-after-await': 'error',\n 'vue/no-this-in-before-route-enter': 'error',\n 'vue/return-in-computed-property': 'error',\n 'vue/valid-define-emits': 'error',\n 'vue/valid-define-props': 'error',\n 'vue/no-required-prop-with-default': 'warn',\n 'vue/prefer-import-from-vue': 'warn',\n 'vue/no-import-compiler-macros': 'warn',\n 'vue/no-multiple-slot-args': 'warn',\n 'vue/require-default-export': 'warn',\n 'vue-doctor/no-em-dash-in-string': 'warn',\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 'vue-doctor/security/no-inner-html': 'error',\n 'vue-doctor/security/no-eval-like': 'error',\n 'vue-doctor/security/no-auth-token-in-web-storage': 'warn',\n 'vue-doctor/security/no-secrets-in-source': 'warn',\n};\n\nconst NUXT_PLUGIN_RULES: Record<string, Severity> = {\n 'nuxt-doctor/ai-slop/no-process-client-server': 'error',\n 'nuxt-doctor/ai-slop/no-explicit-imports-of-auto-imported': 'warn',\n 'nuxt-doctor/ai-slop/no-useState-for-server-data': 'warn',\n 'nuxt-doctor/ai-slop/no-fetch-in-setup': 'warn',\n 'nuxt-doctor/data-fetching/useAsyncData-key-required-in-loop': 'error',\n 'nuxt-doctor/server-routes/defineEventHandler-typed': 'warn',\n 'nuxt-doctor/server-routes/validate-body-with-h3-v2': 'warn',\n 'nuxt-doctor/server-routes/createError-on-failure': 'warn',\n 'nuxt-doctor/hydration/no-document-in-setup': 'error',\n 'nuxt-doctor/hydration/clientOnly-for-browser-apis': 'error',\n 'nuxt-doctor/security/no-user-input-in-fetch-url': 'warn',\n};\n\n// Only these ids are real oxlint-plugin/built-in rules. Other doctor rules run\n// in separate passes; emitting their ids here makes oxlint exit non-zero\n// (\"rule not found\"), silently killing the whole script pass — so the rules\n// block is filtered to this allowlist.\nconst VUE_OXLINT_RULE_IDS: ReadonlySet<string> = new Set([\n 'vue/no-export-in-script-setup',\n 'vue/require-typed-ref',\n 'vue/no-arrow-functions-in-watch',\n 'vue/no-deprecated-data-object-declaration',\n 'vue/no-deprecated-events-api',\n 'vue/no-deprecated-destroyed-lifecycle',\n 'vue/no-deprecated-model-definition',\n 'vue/no-deprecated-delete-set',\n 'vue/no-deprecated-vue-config-keycodes',\n 'vue/no-lifecycle-after-await',\n 'vue/no-this-in-before-route-enter',\n 'vue/return-in-computed-property',\n 'vue/valid-define-emits',\n 'vue/valid-define-props',\n 'vue/no-required-prop-with-default',\n 'vue/prefer-import-from-vue',\n 'vue/no-import-compiler-macros',\n 'vue/no-multiple-slot-args',\n 'vue/require-default-export',\n 'vue/define-emits-declaration',\n 'vue/define-props-declaration',\n 'vue/define-props-destructuring',\n 'vue/max-props',\n 'vue-doctor/no-em-dash-in-string',\n 'vue-doctor/no-destructure-props-without-to-refs',\n 'vue-doctor/no-destructure-reactive-without-to-refs',\n 'vue-doctor/no-non-null-assertion-on-ref-value',\n 'vue-doctor/no-imports-from-vue-when-auto-imported',\n 'vue-doctor/reactivity/watch-without-cleanup',\n 'vue-doctor/reactivity/prefer-shallowRef-for-large-data',\n 'vue-doctor/reactivity/prefer-readonly-for-injected',\n 'vue-doctor/composition/prefer-script-setup-for-new-files',\n 'vue-doctor/composition/defineProps-typed',\n 'vue-doctor/performance/prefer-defineAsyncComponent-on-route',\n 'vue-doctor/security/no-inner-html',\n 'vue-doctor/security/no-eval-like',\n 'vue-doctor/security/no-auth-token-in-web-storage',\n 'vue-doctor/security/no-secrets-in-source',\n]);\n\nconst NUXT_OXLINT_RULE_IDS: ReadonlySet<string> = new Set(\n Object.keys(NUXT_PLUGIN_RULES),\n);\n\nfunction oxlintRuleAllowlist(framework: 'vue' | 'nuxt'): ReadonlySet<string> {\n if (framework !== 'nuxt') return VUE_OXLINT_RULE_IDS;\n return new Set([...VUE_OXLINT_RULE_IDS, ...NUXT_OXLINT_RULE_IDS]);\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 framework = input.framework === 'nuxt' ? 'nuxt' : 'vue';\n const allowlist = oxlintRuleAllowlist(framework);\n let defaults: Record<string, Severity> = { ...VUE_DEFAULT_RULES };\n if (framework === 'nuxt') {\n defaults = { ...defaults, ...NUXT_PLUGIN_RULES };\n }\n const merged: Record<string, Severity> = { ...defaults };\n if (input.ruleOverrides) {\n for (const [id, sev] of Object.entries(input.ruleOverrides)) {\n // Only oxlint-plugin rule ids belong in the oxlint config. Overrides for\n // rules handled by other doctor-core passes are ignored here (they are\n // applied in their own pass), preventing oxlint \"rule not found\" exits.\n if (!allowlist.has(id)) continue;\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.pluginPaths,\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 throwVueResolveError(fromDir);\n}\n\nexport function resolveNuxtDoctorPluginPath(fromDir: string): string {\n const pkgJson = lookUpwards(\n fromDir,\n 'node_modules/@geoql/oxlint-plugin-nuxt-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-nuxt-doctor');\n if (selfMain) return selfMain;\n return throwNuxtResolveError(fromDir);\n}\n\nfunction throwVueResolveError(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\nfunction throwNuxtResolveError(fromDir: string): never {\n throw new Error(\n `Failed to resolve @geoql/oxlint-plugin-nuxt-doctor from ${fromDir}. Install it as a dependency of your project or use the bundled @geoql/nuxt-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'];\n if (opts.fix) args.push('--fix');\n args.push(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 resolveNuxtDoctorPluginPath,\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 framework?: 'vue' | 'nuxt';\n fix?: boolean;\n fixExcludes?: string[];\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 vuePluginPath = resolveVueDoctorPluginPath(opts.rootDir);\n const oxlintBin = resolveOxlintBin(opts.rootDir);\n let pluginPaths: string[];\n if (opts.framework === 'nuxt') {\n const nuxtPluginPath = resolveNuxtDoctorPluginPath(opts.rootDir);\n pluginPaths = [nuxtPluginPath, vuePluginPath];\n } else {\n pluginPaths = [vuePluginPath];\n }\n const { configPath, cleanup } = await generateOxlintConfig({\n pluginPaths,\n ruleOverrides: opts.ruleOverrides,\n rootDir: opts.rootDir,\n framework: opts.framework,\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 fix: opts.fix,\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","const PAGE_DIR = /^(?:app\\/)?pages\\//;\nconst LAYOUT_DIR = /^(?:app\\/)?layouts\\//;\n\nfunction normalize(relPath: string): string {\n return relPath.replace(/\\\\/g, '/').replace(/^\\.\\//, '');\n}\n\n/**\n * True when the path points at a Nuxt page component — a `.vue` file under\n * `pages/` (Nuxt 3 layout) or `app/pages/` (Nuxt 4 layout) at the project root.\n */\nexport function isNuxtPageFile(relPath: string): boolean {\n const path = normalize(relPath);\n return PAGE_DIR.test(path) && path.endsWith('.vue');\n}\n\n/**\n * True when the path points at a Nitro server file — a `.ts` file under the\n * project-root `server/` directory.\n */\nexport function isNuxtServerFile(relPath: string): boolean {\n const path = normalize(relPath);\n return path.startsWith('server/') && path.endsWith('.ts');\n}\n\n/**\n * True when the path points at a Nuxt layout component — a `.vue` file under\n * `layouts/` (Nuxt 3 layout) or `app/layouts/` (Nuxt 4 layout) at the project\n * root.\n */\nexport function isNuxtLayoutFile(relPath: string): boolean {\n const path = normalize(relPath);\n return LAYOUT_DIR.test(path) && path.endsWith('.vue');\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 { isNuxtLayoutFile } from '../../../nuxt/file-role.js';\nimport { walkElements } from '../../../template/walk.js';\nimport type { SfcRuleContext, SfcRuleResult } from '../types.js';\n\nconst RULE_ID = 'nuxt-doctor/ai-slop/no-mixed-app-and-root-layout';\n\nconst MESSAGE =\n 'Layout file renders<NuxtLayout> inside itself. This creates a nested layout chain where the root layout renders itself as a slot. Use<slot /> directly and let the page content flow through.';\n\nconst RECOMMENDATION =\n 'Replace <NuxtLayout> in this layout file with <slot />. The layout slot is already provided by the parent layout wrapper.';\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n if (!isNuxtLayoutFile(ctx.relativePath)) return { diagnostics: [] };\n const { template } = ctx.descriptor;\n if (!template || !template.ast) return { diagnostics: [] };\n let foundNuxtLayout = false;\n let nuxtLayoutNode: ElementNode | undefined;\n walkElements(template.ast, (el: ElementNode) => {\n if (el.tag === 'NuxtLayout') {\n foundNuxtLayout = true;\n nuxtLayoutNode = el;\n }\n });\n if (!foundNuxtLayout) return { diagnostics: [] };\n const node = nuxtLayoutNode!;\n const diagnostics: Diagnostic[] = [\n {\n file: ctx.file,\n line: node.loc.start.line,\n column: node.loc.start.column,\n endLine: node.loc.end.line,\n endColumn: node.loc.end.column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: MESSAGE,\n source: 'sfc',\n recommendation: RECOMMENDATION,\n },\n ];\n return { diagnostics };\n}\n","import { readFileSync } from 'node:fs';\nimport { parseSync } from 'oxc-parser';\nimport type { Diagnostic } from '../../../types.js';\nimport { isNuxtPageFile } from '../../../nuxt/file-role.js';\nimport type { SfcRuleContext, SfcRuleResult } from '../types.js';\n\nconst RULE_ID = 'nuxt-doctor/seo/og-image-defined';\n\nconst MESSAGE =\n 'Page uses SEO meta but has no og:image property. Open Graph images improve social sharing previews. Add an og:image value or install @nuxtjs/og-image for automatic OG images.';\n\nconst RECOMMENDATION =\n 'Add ogImage: \"/path/to/image.png\" to useSeoMeta / useHead, or install @nuxtjs/og-image.';\n\nfunction hasOgImageInCall(\n program: ReturnType<typeof parseSync>['program'],\n): boolean {\n for (const stmt of program.body) {\n if (stmt.type !== 'ExpressionStatement') continue;\n const call = stmt.expression;\n if (call.type !== 'CallExpression') continue;\n if (call.callee.type !== 'Identifier') continue;\n const name = call.callee.name;\n if (name !== 'useSeoMeta' && name !== 'useHead') continue;\n const firstArg = call.arguments[0];\n if (!firstArg || firstArg.type !== 'ObjectExpression') continue;\n for (const prop of firstArg.properties) {\n if (prop.type !== 'Property') continue;\n if (prop.key.type === 'Identifier' && prop.key.name === 'ogImage')\n return true;\n if (prop.key.type === 'Literal' && prop.key.value === 'og:image')\n return true;\n }\n }\n return false;\n}\n\nfunction hasOgImageDep(packageJsonPath: string): boolean {\n try {\n const raw = readFileSync(packageJsonPath, 'utf8');\n const pkg = JSON.parse(raw);\n const deps = { ...pkg.dependencies, ...pkg.devDependencies };\n return '@nuxtjs/og-image' in deps || 'nuxt-og-image' in deps;\n } catch {\n return false;\n }\n}\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n if (!isNuxtPageFile(ctx.relativePath)) return { diagnostics: [] };\n const { scriptSetup } = ctx.descriptor;\n if (!scriptSetup) return { diagnostics: [] };\n const lang = scriptSetup.lang === 'ts' ? 'ts' : 'js';\n const { program } = parseSync(`script.${lang}`, scriptSetup.content, {\n sourceType: 'module',\n lang,\n });\n if (hasOgImageInCall(program)) return { diagnostics: [] };\n if (ctx.projectInfo.packageJsonPath === null) return { diagnostics: [] };\n if (hasOgImageDep(ctx.projectInfo.packageJsonPath))\n return { diagnostics: [] };\n const { line, column } = scriptSetup.loc.start;\n const diagnostics: Diagnostic[] = [\n {\n file: ctx.file,\n line,\n column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: MESSAGE,\n source: 'sfc',\n recommendation: RECOMMENDATION,\n },\n ];\n return { diagnostics };\n}\n","import { parseSync } from 'oxc-parser';\nimport type { Diagnostic } from '../../../types.js';\nimport { isNuxtPageFile } from '../../../nuxt/file-role.js';\nimport type { SfcRuleContext, SfcRuleResult } from '../types.js';\n\nconst RULE_ID = 'nuxt-doctor/seo/useSeoMeta-on-public-page';\n\nconst MESSAGE =\n 'Public page component is missing SEO metadata. Add useSeoMeta, useHead, or definePageMeta with a title so search engines can index it properly.';\n\nconst RECOMMENDATION =\n 'Call useSeoMeta({ title: \"...\" }) in<script setup> to define page title and meta tags for search engines and social previews.';\n\nfunction hasTitleInCall(\n program: ReturnType<typeof parseSync>['program'],\n): boolean {\n for (const stmt of program.body) {\n if (stmt.type !== 'ExpressionStatement') continue;\n const call = stmt.expression;\n if (call.type !== 'CallExpression') continue;\n if (call.callee.type !== 'Identifier') continue;\n const name = call.callee.name;\n if (\n name !== 'useSeoMeta' &&\n name !== 'useHead' &&\n name !== 'definePageMeta'\n )\n continue;\n const firstArg = call.arguments[0];\n if (!firstArg || firstArg.type !== 'ObjectExpression') continue;\n for (const prop of firstArg.properties) {\n if (prop.type !== 'Property') continue;\n if (prop.key.type === 'Identifier' && prop.key.name === 'title')\n return true;\n if (prop.key.type === 'Literal' && prop.key.value === 'title')\n return true;\n }\n }\n return false;\n}\n\nexport function check(ctx: SfcRuleContext): SfcRuleResult {\n if (!isNuxtPageFile(ctx.relativePath)) return { diagnostics: [] };\n const { scriptSetup } = ctx.descriptor;\n if (!scriptSetup) return { diagnostics: [] };\n const lang = scriptSetup.lang === 'ts' ? 'ts' : 'js';\n const { program } = parseSync(`script.${lang}`, scriptSetup.content, {\n sourceType: 'module',\n lang,\n });\n if (hasTitleInCall(program)) return { diagnostics: [] };\n const { line, column } = scriptSetup.loc.start;\n const diagnostics: Diagnostic[] = [\n {\n file: ctx.file,\n line,\n column,\n ruleId: RULE_ID,\n severity: 'warn',\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 { check as noMixedAppAndRootLayout } from './nuxt/no-mixed-app-and-root-layout.js';\nimport { check as ogImageDefined } from './nuxt/og-image-defined.js';\nimport { check as useSeoMetaOnPublicPage } from './nuxt/use-seo-meta-on-public-page.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 id: 'nuxt-doctor/seo/useSeoMeta-on-public-page',\n check: useSeoMetaOnPublicPage,\n },\n {\n id: 'nuxt-doctor/seo/og-image-defined',\n check: ogImageDefined,\n },\n {\n id: 'nuxt-doctor/ai-slop/no-mixed-app-and-root-layout',\n check: noMixedAppAndRootLayout,\n },\n];\n","import { relative } from 'node:path';\nimport type { Diagnostic, Severity } from '../types.js';\nimport type { ProjectInfo } from '../types/project-info.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 projectInfo?: ProjectInfo;\n}\n\nexport async function runSfcPass(opts: SfcPassOptions): Promise<Diagnostic[]> {\n const all: Diagnostic[] = [];\n const { projectInfo } = opts;\n const rootDir = projectInfo?.rootDirectory ?? process.cwd();\n for (const file of opts.files) {\n if (!file.endsWith('.vue')) continue;\n const descriptor = await parseSfcDescriptor(file);\n if (!descriptor) continue;\n const relativePath = relative(rootDir, file).replace(/\\\\/g, '/');\n for (const rule of SFC_RULES) {\n const override = opts.ruleOverrides?.[rule.id];\n if (override === 'off') continue;\n const { diagnostics } = rule.check({\n file,\n descriptor,\n rootDirectory: rootDir,\n relativePath,\n projectInfo,\n });\n for (const d of diagnostics) {\n all.push(override ? { ...d, severity: override } : d);\n }\n }\n }\n return all;\n}\n","import { parseSync } from 'oxc-parser';\nimport { relative } from 'node:path';\nimport type { Diagnostic } from '../../types.js';\nimport { isNuxtPageFile } from '../file-role.js';\nimport { parseSfcDescriptor } from '../../sfc/parse-sfc-descriptor.js';\nimport type { ProjectInfo } from '../../types/project-info.js';\n\nexport interface CrossFilePassOptions {\n files: string[];\n projectInfo: ProjectInfo;\n}\n\nexport interface ParsedPageScript {\n file: string;\n relativePath: string;\n keys: string[];\n scriptSetupContent: string;\n scriptSetupLang: 'ts' | 'js';\n scriptSetupLine: number;\n}\n\nfunction extractDataFetchingKeys(content: string, lang: 'ts' | 'js'): string[] {\n const keys: string[] = [];\n try {\n const { program } = parseSync(`script.${lang}`, content, {\n sourceType: 'module',\n lang,\n });\n for (const stmt of program.body) {\n if (stmt.type === 'VariableDeclaration') {\n for (const decl of stmt.declarations) {\n const call = unwrapAwait(decl.init);\n if (call?.type !== 'CallExpression') continue;\n extractKeyFromCall(call, keys);\n }\n } else if (stmt.type === 'ExpressionStatement') {\n const expr = unwrapAwait(stmt.expression);\n if (expr?.type === 'CallExpression') {\n extractKeyFromCall(expr, keys);\n }\n }\n }\n } catch {}\n return keys;\n}\n\ntype MaybeNode = { type: string; argument?: MaybeNode } | null | undefined;\n\nfunction unwrapAwait<T extends MaybeNode>(node: T): MaybeNode {\n if (node?.type === 'AwaitExpression') return node.argument;\n return node;\n}\n\nfunction extractKeyFromCall(\n call: Record<string, unknown>,\n keys: string[],\n): void {\n if (call.callee.type !== 'Identifier') return;\n const fnName = call.callee.name;\n if (fnName !== 'useAsyncData' && fnName !== 'useFetch') return;\n const keyArg = call.arguments[0];\n if (keyArg?.type === 'Literal' && typeof keyArg.value === 'string') {\n keys.push(keyArg.value);\n } else if (keyArg?.type === 'TemplateLiteral' && keyArg.quasis.length === 1) {\n const val = keyArg.quasis[0]?.value?.raw;\n if (val) keys.push(val);\n }\n if (fnName === 'useFetch' && call.arguments.length >= 2) {\n const optsArg = call.arguments[1];\n if (optsArg?.type === 'ObjectExpression') {\n for (const prop of optsArg.properties) {\n if (\n prop.type === 'Property' &&\n prop.key.type === 'Identifier' &&\n prop.key.name === 'key' &&\n prop.value.type === 'Literal' &&\n typeof prop.value.value === 'string'\n ) {\n keys.push(prop.value.value);\n }\n }\n }\n }\n}\n\nexport async function runCrossFilePass(\n opts: CrossFilePassOptions,\n): Promise<Diagnostic[]> {\n const { files, projectInfo } = opts;\n if (projectInfo.framework !== 'nuxt') return [];\n const rootDir = projectInfo.rootDirectory;\n const pageFiles = files.filter((f) =>\n isNuxtPageFile(relative(rootDir, f).replace(/\\\\/g, '/')),\n );\n if (pageFiles.length === 0) return [];\n const parsed: ParsedPageScript[] = [];\n for (const file of pageFiles) {\n const descriptor = await parseSfcDescriptor(file);\n if (!descriptor) continue;\n const { scriptSetup } = descriptor;\n if (!scriptSetup) continue;\n parsed.push({\n file,\n relativePath: relative(rootDir, file).replace(/\\\\/g, '/'),\n keys: extractDataFetchingKeys(\n scriptSetup.content,\n scriptSetup.lang === 'ts' ? 'ts' : 'js',\n ),\n scriptSetupContent: scriptSetup.content,\n scriptSetupLang: scriptSetup.lang === 'ts' ? 'ts' : 'js',\n scriptSetupLine: scriptSetup.loc.start.line,\n });\n }\n return runCrossFileRules(parsed);\n}\n\nfunction runCrossFileRules(pages: ParsedPageScript[]): Diagnostic[] {\n const all: Diagnostic[] = [];\n all.push(...ruleNoSharedKeyAcrossPages(pages));\n all.push(...ruleSsrSafeOnMountedOnlyForClient(pages));\n return all;\n}\n\nfunction ruleNoSharedKeyAcrossPages(pages: ParsedPageScript[]): Diagnostic[] {\n const keyToFiles = new Map<string, string[]>();\n for (const page of pages) {\n for (const key of page.keys) {\n const existing = keyToFiles.get(key) ?? [];\n if (!existing.includes(page.file)) existing.push(page.file);\n keyToFiles.set(key, existing);\n }\n }\n const diags: Diagnostic[] = [];\n for (const [key, files] of keyToFiles) {\n if (files.length < 2) continue;\n for (const file of files) {\n diags.push({\n file,\n line: 1,\n column: 1,\n ruleId: 'nuxt-doctor/data-fetching/no-shared-key-across-pages',\n severity: 'warn',\n message: `Data fetching key \"${key}\" is shared across ${files.length} different page files. This causes cache collisions in useAsyncData/useFetch. Use a unique key per page.`,\n source: 'cross-file',\n recommendation: `Rename the key to something page-specific, e.g. \"page-${key}\" or \"users-${key}\".`,\n });\n }\n }\n return diags;\n}\n\nconst BROWSER_GLOBALS = new Set([\n 'window',\n 'document',\n 'navigator',\n 'localStorage',\n 'sessionStorage',\n 'location',\n 'history',\n 'fetch',\n 'XMLHttpRequest',\n 'matchMedia',\n 'IntersectionObserver',\n 'MutationObserver',\n 'indexedDB',\n 'webkit',\n 'moz',\n 'onmessage',\n]);\n\nfunction ruleSsrSafeOnMountedOnlyForClient(\n pages: ParsedPageScript[],\n): Diagnostic[] {\n const diags: Diagnostic[] = [];\n for (const page of pages) {\n const { program } = parseSync(\n `script.${page.scriptSetupLang}`,\n page.scriptSetupContent,\n { sourceType: 'module', lang: page.scriptSetupLang },\n );\n for (const stmt of program.body) {\n if (stmt.type === 'VariableDeclaration') {\n for (const decl of stmt.declarations) {\n const init = decl.init;\n if (!init) continue;\n if (init.type === 'CallExpression') {\n const call = init;\n if (isSkippedReactiveCall(call)) continue;\n checkCallForBrowserGlobal(call, page, diags);\n } else if (init.type === 'MemberExpression') {\n checkMemberForBrowserGlobal(init, page, diags);\n }\n }\n } else if (stmt.type === 'ExpressionStatement') {\n const expr = stmt.expression;\n if (expr.type === 'CallExpression') {\n if (isSkippedReactiveCall(expr)) continue;\n checkCallForBrowserGlobal(expr, page, diags);\n } else if (expr.type === 'MemberExpression') {\n checkMemberForBrowserGlobal(expr, page, diags);\n }\n }\n }\n }\n return diags;\n}\n\nconst CLIENT_SAFE_WRAPPERS = new Set(['onMounted', 'watchEffect', 'watch']);\n\nfunction isSkippedReactiveCall(call: {\n callee: { type: string; name?: string };\n}): boolean {\n if (call.callee.type !== 'Identifier') return false;\n return CLIENT_SAFE_WRAPPERS.has(call.callee.name as string);\n}\n\nfunction checkCallForBrowserGlobal(\n call: Record<string, unknown>,\n page: ParsedPageScript,\n diags: Diagnostic[],\n) {\n const callee = call.callee as Record<string, unknown>;\n if (callee.type !== 'MemberExpression') return;\n const obj = callee.object as Record<string, unknown>;\n if (obj.type !== 'Identifier' || !BROWSER_GLOBALS.has(obj.name as string))\n return;\n diags.push({\n file: page.file,\n line: page.scriptSetupLine,\n column: 1,\n ruleId: 'nuxt-doctor/data-fetching/ssr-safe-onMounted-only-for-client',\n severity: 'warn',\n message: `Browser global \"${obj.name}\" is accessed at setup top-level outside onMounted. This causes SSR/hydration mismatches. Move browser-only code inside onMounted or a client-only plugin.`,\n source: 'cross-file',\n recommendation: `Wrap \"${obj.name}\" access in onMounted(() => { /* code */ }) or use defineNuxtPlugin to run only on the client.`,\n });\n}\n\nfunction checkMemberForBrowserGlobal(\n mem: Record<string, unknown>,\n page: ParsedPageScript,\n diags: Diagnostic[],\n) {\n const obj = mem.object as Record<string, unknown>;\n if (obj.type !== 'Identifier' || !BROWSER_GLOBALS.has(obj.name as string))\n return;\n diags.push({\n file: page.file,\n line: page.scriptSetupLine,\n column: 1,\n ruleId: 'nuxt-doctor/data-fetching/ssr-safe-onMounted-only-for-client',\n severity: 'warn',\n message: `Browser global \"${obj.name}\" is accessed at setup top-level outside onMounted. This causes SSR/hydration mismatches. Move browser-only code inside onMounted or a client-only plugin.`,\n source: 'cross-file',\n recommendation: `Wrap \"${obj.name}\" access in onMounted(() => { /* code */ }) or use defineNuxtPlugin to run only on the client.`,\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 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 { 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 type { DirectiveNode, 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 vHtml: DirectiveNode | undefined = findDirective(el, 'html');\n if (!vHtml) return;\n diagnostics.push({\n file: ctx.file,\n line: vHtml.loc.start.line,\n column: vHtml.loc.start.column,\n endLine: vHtml.loc.end.line,\n endColumn: vHtml.loc.end.column,\n ruleId: 'vue-doctor/security/no-v-html',\n severity: 'error',\n message: `<${el.tag}> uses v-html, which renders raw HTML and bypasses Vue's escaping — the primary XSS sink in Vue apps.`,\n source: 'template',\n recommendation:\n 'Render text with {{ }} interpolation, or sanitize the HTML with DOMPurify in a computed before binding it.',\n });\n });\n return { diagnostics };\n}\n","import type {\n AttributeNode,\n DirectiveNode,\n ElementNode,\n} from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { findBindAttr, findStaticAttr } from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nfunction unquote(raw: string): string {\n const trimmed = raw.trim();\n const first = trimmed.charAt(0);\n if ((first === '\"' || first === \"'\") && trimmed.endsWith(first)) {\n return trimmed.slice(1, -1);\n }\n return trimmed;\n}\n\nfunction attrValue(\n el: ElementNode,\n name: string,\n):\n | { value: string; loc: AttributeNode['loc'] | DirectiveNode['loc'] }\n | undefined {\n const staticAttr = findStaticAttr(el, name);\n if (staticAttr) {\n return { value: staticAttr.value?.content ?? '', loc: staticAttr.loc };\n }\n const bound = findBindAttr(el, name);\n if (bound?.exp && 'content' in bound.exp) {\n return { value: unquote(bound.exp.content as string), loc: bound.loc };\n }\n return undefined;\n}\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n if (el.tag !== 'a') return;\n const target = attrValue(el, 'target');\n if (!target || target.value !== '_blank') return;\n const rel = attrValue(el, 'rel');\n if (rel && rel.value.includes('noopener')) return;\n diagnostics.push({\n file: ctx.file,\n line: target.loc.start.line,\n column: target.loc.start.column,\n endLine: target.loc.end.line,\n endColumn: target.loc.end.column,\n ruleId: 'vue-doctor/security/no-target-blank-without-rel',\n severity: 'warn',\n message: `<a target=\"_blank\"> without rel=\"noopener noreferrer\" exposes the opener window to reverse-tabnabbing.`,\n source: 'template',\n recommendation:\n 'Add rel=\"noopener noreferrer\" to anchors that open in a new tab.',\n });\n });\n return { diagnostics };\n}\n","import type {\n AttributeNode,\n DirectiveNode,\n ElementNode,\n} from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst NODE_ATTRIBUTE = 6;\n\nconst URI_SINKS = new Set([\n 'href',\n 'src',\n 'srcset',\n 'action',\n 'xlink:href',\n 'formaction',\n 'poster',\n 'data',\n]);\n\nconst DANGEROUS_SCHEME = /^\\s*(?:javascript:|vbscript:|data:text\\/html)/i;\n\nfunction unquote(raw: string): string {\n const trimmed = raw.trim();\n const first = trimmed.charAt(0);\n if (\n (first === '\"' || first === \"'\" || first === '`') &&\n trimmed.endsWith(first)\n ) {\n return trimmed.slice(1, -1);\n }\n return trimmed;\n}\n\ninterface UriProp {\n name: string;\n value: string;\n loc: AttributeNode['loc'] | DirectiveNode['loc'];\n}\n\nfunction resolveUriProp(\n prop: AttributeNode | DirectiveNode,\n): UriProp | undefined {\n if (prop.type === NODE_ATTRIBUTE) {\n const attr = prop as AttributeNode;\n if (attr.value === undefined) return undefined;\n return { name: attr.name, value: attr.value.content, loc: attr.loc };\n }\n const dir = prop as DirectiveNode;\n if (dir.name !== 'bind') return undefined;\n if (!dir.arg || !('content' in dir.arg)) return undefined;\n if (!dir.exp || !('content' in dir.exp)) return undefined;\n return {\n name: dir.arg.content as string,\n value: unquote(dir.exp.content as string),\n loc: dir.loc,\n };\n}\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n for (const prop of el.props) {\n const resolved = resolveUriProp(prop as AttributeNode | DirectiveNode);\n if (!resolved) continue;\n if (!URI_SINKS.has(resolved.name)) continue;\n if (!DANGEROUS_SCHEME.test(resolved.value)) continue;\n\n diagnostics.push({\n file: ctx.file,\n line: resolved.loc.start.line,\n column: resolved.loc.start.column,\n endLine: resolved.loc.end.line,\n endColumn: resolved.loc.end.column,\n ruleId: 'vue-doctor/security/no-javascript-uri',\n severity: 'error',\n message: `<${el.tag}> binds ${resolved.name} to a dangerous URI scheme (javascript:/vbscript:/data:text/html), which executes arbitrary code.`,\n source: 'template',\n recommendation:\n 'Use a safe http(s) or relative URL; never put a javascript:, vbscript:, or data:text/html value in a URL attribute.',\n });\n }\n });\n return { diagnostics };\n}\n","import type {\n AttributeNode,\n DirectiveNode,\n ElementNode,\n} from '@vue/compiler-core';\n\nconst NODE_ATTRIBUTE = 6;\nconst NODE_DIRECTIVE = 7;\n\nexport interface AttrLoc {\n start: { line: number; column: number };\n end: { line: number; column: number };\n}\n\nexport interface AttrSource {\n /** The raw text to scan (class string body or bound-class expression text). */\n text: string;\n loc: AttrLoc;\n}\n\n/**\n * Collect the scannable text of every `class` source on an element: the static\n * `class=\"...\"` value and any bound `:class` expression source. Bound\n * expressions are returned verbatim so a regex can match string-literal class\n * fragments inside ternaries, arrays, and objects without a full JS parse.\n */\nexport function collectClassSources(el: ElementNode): AttrSource[] {\n const sources: AttrSource[] = [];\n for (const prop of el.props) {\n if (prop.type === NODE_ATTRIBUTE) {\n const attr = prop as AttributeNode;\n if (attr.name === 'class' && attr.value) {\n sources.push({ text: attr.value.content, loc: attr.loc });\n }\n }\n if (prop.type === NODE_DIRECTIVE) {\n const dir = prop as DirectiveNode;\n if (\n dir.name === 'bind' &&\n dir.arg &&\n 'content' in dir.arg &&\n dir.arg.content === 'class' &&\n dir.exp &&\n 'content' in dir.exp\n ) {\n sources.push({ text: dir.exp.content as string, loc: dir.loc });\n }\n }\n }\n return sources;\n}\n\n/** Find a static `style=\"...\"` attribute on an element, if present. */\nexport function findStaticStyle(el: ElementNode): AttributeNode | undefined {\n for (const prop of el.props) {\n if (\n prop.type === NODE_ATTRIBUTE &&\n (prop as AttributeNode).name === 'style'\n ) {\n return prop as AttributeNode;\n }\n }\n return undefined;\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { collectClassSources } from '../class-attr-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst ARBITRARY_VALUE = /\\[[^\\]]+\\]/;\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n for (const source of collectClassSources(el)) {\n if (!ARBITRARY_VALUE.test(source.text)) continue;\n diagnostics.push({\n file: ctx.file,\n line: source.loc.start.line,\n column: source.loc.start.column,\n endLine: source.loc.end.line,\n endColumn: source.loc.end.column,\n ruleId: 'vue-doctor/design/no-arbitrary-tailwind-values',\n severity: 'warn',\n message: `<${el.tag}> uses a Tailwind arbitrary value (e.g. w-[412px]). Arbitrary values are design-system debt; repeated values should become @theme tokens.`,\n source: 'template',\n recommendation:\n 'Replace the arbitrary value with a design token defined in your @theme (e.g. w-container-lg).',\n });\n }\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { collectClassSources, findStaticStyle } from '../class-attr-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst HEX_COLOR = /#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b/;\n\nconst RULE_ID = 'vue-doctor/design/no-raw-hex-color';\nconst MESSAGE =\n 'Raw hex color bypasses the token system and breaks theming. Use a semantic color token instead.';\nconst RECOMMENDATION =\n 'Replace the hex color with a design token (e.g. bg-danger / text-success) defined in your @theme.';\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n for (const source of collectClassSources(el)) {\n if (!HEX_COLOR.test(source.text)) continue;\n diagnostics.push({\n file: ctx.file,\n line: source.loc.start.line,\n column: source.loc.start.column,\n endLine: source.loc.end.line,\n endColumn: source.loc.end.column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: `<${el.tag}> embeds a raw hex color in a class. ${MESSAGE}`,\n source: 'template',\n recommendation: RECOMMENDATION,\n });\n }\n const style = findStaticStyle(el);\n if (style?.value && HEX_COLOR.test(style.value.content)) {\n diagnostics.push({\n file: ctx.file,\n line: style.loc.start.line,\n column: style.loc.start.column,\n endLine: style.loc.end.line,\n endColumn: style.loc.end.column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: `<${el.tag}> embeds a raw hex color in an inline style. ${MESSAGE}`,\n source: 'template',\n recommendation: RECOMMENDATION,\n });\n }\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { collectClassSources } from '../class-attr-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst DEFAULT_PALETTE =\n /(?:^|[\\s:'\"`])(?:bg|text|border|ring|shadow|from|via|to|accent|caret|fill|stroke|outline|decoration|divide|ring-offset|placeholder)-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\\d{2,3}\\b/;\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n for (const source of collectClassSources(el)) {\n if (!DEFAULT_PALETTE.test(source.text)) continue;\n diagnostics.push({\n file: ctx.file,\n line: source.loc.start.line,\n column: source.loc.start.column,\n endLine: source.loc.end.line,\n endColumn: source.loc.end.column,\n ruleId: 'vue-doctor/design/no-default-tailwind-palette',\n severity: 'warn',\n message: `<${el.tag}> uses a default Tailwind palette utility (e.g. bg-blue-600). The default palette produces generic UI; map colors to brand tokens.`,\n source: 'template',\n recommendation:\n 'Map the color to a brand token (e.g. bg-primary-600) defined in your @theme instead of the default palette.',\n });\n }\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { collectClassSources } from '../class-attr-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst IMPORTANT_UTILITY = /(?:^|[\\s:'\"`])!-?[a-z][a-z0-9-]*/;\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n for (const source of collectClassSources(el)) {\n if (!IMPORTANT_UTILITY.test(source.text)) continue;\n diagnostics.push({\n file: ctx.file,\n line: source.loc.start.line,\n column: source.loc.start.column,\n endLine: source.loc.end.line,\n endColumn: source.loc.end.column,\n ruleId: 'vue-doctor/design/no-important-utility',\n severity: 'warn',\n message: `<${el.tag}> uses a !important Tailwind utility (e.g. !bg-red-500). !important is a specificity escape hatch that makes maintenance harder.`,\n source: 'template',\n recommendation:\n 'Remove the ! prefix and resolve the specificity conflict at its source instead of forcing !important.',\n });\n }\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { findStaticStyle } from '../class-attr-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst HARDCODED_VALUE =\n /\\d+px\\b|#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b/;\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n const style = findStaticStyle(el);\n if (!style?.value) return;\n if (!HARDCODED_VALUE.test(style.value.content)) return;\n diagnostics.push({\n file: ctx.file,\n line: style.loc.start.line,\n column: style.loc.start.column,\n endLine: style.loc.end.line,\n endColumn: style.loc.end.column,\n ruleId: 'vue-doctor/design/no-hardcoded-inline-style',\n severity: 'warn',\n message: `<${el.tag}> uses an inline style with hardcoded px or hex values. Inline styles bypass tokens, hurt caching, and create drift.`,\n source: 'template',\n recommendation:\n 'Move the styling to token-based utility classes (e.g. w-60 text-neutral-700) instead of an inline style.',\n });\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { findBindAttr, findStaticAttr } from '../directive-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst IMAGE_TAGS = new Set(['img', 'NuxtImg', 'nuxt-img']);\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n if (!IMAGE_TAGS.has(el.tag)) return;\n const hasAlt = findStaticAttr(el, 'alt') ?? findBindAttr(el, 'alt');\n if (hasAlt) 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/design/no-missing-alt',\n severity: 'warn',\n message: `<${el.tag}> has no alt attribute. Screen readers and SEO depend on descriptive alt text.`,\n source: 'template',\n recommendation:\n 'Add an alt attribute describing the image, or alt=\"\" for purely decorative images.',\n });\n });\n return { diagnostics };\n}\n","import type { ElementNode } from '@vue/compiler-core';\nimport type { Diagnostic } from '../../types.js';\nimport { collectClassSources, findStaticStyle } from '../class-attr-helpers.js';\nimport { walkElements } from '../walk.js';\nimport type { TemplateRuleContext, TemplateRuleResult } from './types.js';\n\nconst ABSURD_THRESHOLD = 1000;\nconst ARBITRARY_Z = /(?:^|[\\s:'\"`])-?z-\\[(\\d+)\\]/;\nconst INLINE_Z = /z-index\\s*:\\s*(\\d+)/;\n\nconst RULE_ID = 'vue-doctor/design/no-absurd-z-index';\nconst MESSAGE =\n 'huge z-index values usually paper over layering bugs instead of fixing stacking context.';\nconst RECOMMENDATION =\n 'Use a small, tokenized z-index scale (e.g. z-modal) and fix the underlying stacking context.';\n\nexport function check(ctx: TemplateRuleContext): TemplateRuleResult {\n const diagnostics: Diagnostic[] = [];\n walkElements(ctx.template, (el: ElementNode) => {\n for (const source of collectClassSources(el)) {\n const match = ARBITRARY_Z.exec(source.text);\n if (!match || Number(match[1]) < ABSURD_THRESHOLD) continue;\n diagnostics.push({\n file: ctx.file,\n line: source.loc.start.line,\n column: source.loc.start.column,\n endLine: source.loc.end.line,\n endColumn: source.loc.end.column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: `<${el.tag}> uses an absurd z-index class (>= ${ABSURD_THRESHOLD}); ${MESSAGE}`,\n source: 'template',\n recommendation: RECOMMENDATION,\n });\n }\n const style = findStaticStyle(el);\n if (style?.value) {\n const match = INLINE_Z.exec(style.value.content);\n if (match && Number(match[1]) >= ABSURD_THRESHOLD) {\n diagnostics.push({\n file: ctx.file,\n line: style.loc.start.line,\n column: style.loc.start.column,\n endLine: style.loc.end.line,\n endColumn: style.loc.end.column,\n ruleId: RULE_ID,\n severity: 'warn',\n message: `<${el.tag}> uses an absurd inline z-index (>= ${ABSURD_THRESHOLD}); ${MESSAGE}`,\n source: 'template',\n recommendation: RECOMMENDATION,\n });\n }\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 { 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 { check as noVHtml } from './no-v-html.js';\nimport { check as noTargetBlankWithoutRel } from './no-target-blank-without-rel.js';\nimport { check as noJavascriptUri } from './no-javascript-uri.js';\nimport { check as noArbitraryTailwindValues } from './no-arbitrary-tailwind-values.js';\nimport { check as noRawHexColor } from './no-raw-hex-color.js';\nimport { check as noDefaultTailwindPalette } from './no-default-tailwind-palette.js';\nimport { check as noImportantUtility } from './no-important-utility.js';\nimport { check as noHardcodedInlineStyle } from './no-hardcoded-inline-style.js';\nimport { check as noMissingAlt } from './no-missing-alt.js';\nimport { check as noAbsurdZIndex } from './no-absurd-z-index.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 { id: 'vue-doctor/security/no-v-html', check: noVHtml },\n {\n id: 'vue-doctor/security/no-target-blank-without-rel',\n check: noTargetBlankWithoutRel,\n },\n { id: 'vue-doctor/security/no-javascript-uri', check: noJavascriptUri },\n {\n id: 'vue-doctor/design/no-arbitrary-tailwind-values',\n check: noArbitraryTailwindValues,\n },\n { id: 'vue-doctor/design/no-raw-hex-color', check: noRawHexColor },\n {\n id: 'vue-doctor/design/no-default-tailwind-palette',\n check: noDefaultTailwindPalette,\n },\n { id: 'vue-doctor/design/no-important-utility', check: noImportantUtility },\n {\n id: 'vue-doctor/design/no-hardcoded-inline-style',\n check: noHardcodedInlineStyle,\n },\n { id: 'vue-doctor/design/no-missing-alt', check: noMissingAlt },\n { id: 'vue-doctor/design/no-absurd-z-index', check: noAbsurdZIndex },\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 { checkNuxtProject } from './check-nuxt-project.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 { runCrossFilePass } from './nuxt/cross-file/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 project = await detectProject(rootDir);\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({\n files,\n ruleOverrides: config.rules,\n projectInfo: project,\n })\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 framework: project.framework === 'nuxt' ? 'nuxt' : 'vue',\n fix: config.fix === true && config.scopeFiles === undefined,\n fixExcludes: config.fixExcludes,\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 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 (err) {\n // knip failed — diagnostics remain empty for this pass. Surface it under\n // DOCTOR_DEBUG (matching the script pass) so a degraded dead-code run is\n // never silently disguised as a clean pass.\n if (process.env.DOCTOR_DEBUG) {\n process.stderr.write(\n `[doctor-core] dead-code pass failed: ${String(err)}\\n`,\n );\n }\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 let nuxtProjectDiagnostics: Diagnostic[] = [];\n if (project.framework === 'nuxt') {\n try {\n const raw = await checkNuxtProject(project);\n nuxtProjectDiagnostics = 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 // nuxt-project pass failed — diagnostics remain empty for this pass\n }\n }\n\n let crossFileDiagnostics: Diagnostic[] = [];\n if (project.framework === 'nuxt') {\n try {\n const raw = await runCrossFilePass({ files, projectInfo: project });\n crossFileDiagnostics = 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 // cross-file pass failed — diagnostics remain empty for this pass\n }\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 nuxtProjectDiagnostics,\n crossFileDiagnostics,\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 { Severity } from '../types.js';\n\nexport const BUILT_IN_RECOMMENDED: Omit<\n import('./types.js').ResolvedDoctorConfig,\n 'rootDir' | 'source' | 'configFile'\n> = {\n include: ['**/*.vue', '**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],\n exclude: ['node_modules', 'dist', '.nuxt', '.output', 'coverage'],\n failOn: 'error' as const,\n threshold: 0,\n rules: {} as Record<string, Severity>,\n};\n","export class ConfigFileNotFoundError extends Error {\n override name = 'ConfigFileNotFoundError' as const;\n\n constructor(path: string) {\n super(`Config file not found: ${path}`);\n }\n}\n\nexport class ConfigCycleError extends Error {\n override name = 'ConfigCycleError' as const;\n\n constructor(chain: string[]) {\n super(`Config extends cycle detected: ${chain.join(' -> ')}`);\n }\n}\n\nimport type { z } from 'zod';\n\nexport class InvalidConfigError extends Error {\n override name = 'InvalidConfigError' as const;\n\n readonly issues: readonly z.core.$ZodIssue[];\n\n constructor(message: string, issues: readonly z.core.$ZodIssue[] = []) {\n super(message);\n this.issues = issues;\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 { Severity } from './types.js';\n\nexport type RuleCategory =\n | 'ai-slop'\n | 'reactivity'\n | 'composition'\n | 'performance'\n | 'template'\n | 'template-perf'\n | 'build-quality'\n | 'deps'\n | 'dead-code'\n | 'sfc'\n | 'vue-builtin'\n | 'structure'\n | 'modules-deps'\n | 'nitro'\n | 'seo'\n | 'cloudflare'\n | 'server-routes'\n | 'hydration'\n | 'data-fetching'\n | 'security'\n | 'design';\n\nexport type RuleSource = 'doctor' | 'oxlint-builtin' | 'eslint-plugin-vue';\n\nexport interface RegisteredRule {\n readonly id: string;\n readonly severity: Severity;\n readonly category: RuleCategory;\n readonly source: RuleSource;\n readonly recommended: boolean;\n}\n\nexport const RULE_REGISTRY: readonly RegisteredRule[] = [\n {\n id: 'vue/no-export-in-script-setup',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/require-typed-ref',\n severity: 'warn',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-arrow-functions-in-watch',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-deprecated-data-object-declaration',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-deprecated-events-api',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-deprecated-destroyed-lifecycle',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-deprecated-model-definition',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-deprecated-delete-set',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-deprecated-vue-config-keycodes',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-lifecycle-after-await',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-this-in-before-route-enter',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/return-in-computed-property',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/valid-define-emits',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/valid-define-props',\n severity: 'error',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-required-prop-with-default',\n severity: 'warn',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/prefer-import-from-vue',\n severity: 'warn',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-import-compiler-macros',\n severity: 'warn',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/no-multiple-slot-args',\n severity: 'warn',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/require-default-export',\n severity: 'warn',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: true,\n },\n {\n id: 'vue/define-emits-declaration',\n severity: 'info',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: false,\n },\n {\n id: 'vue/define-props-declaration',\n severity: 'info',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: false,\n },\n {\n id: 'vue/define-props-destructuring',\n severity: 'info',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: false,\n },\n {\n id: 'vue/max-props',\n severity: 'info',\n category: 'vue-builtin',\n source: 'oxlint-builtin',\n recommended: false,\n },\n\n {\n id: 'vue-doctor/no-em-dash-in-string',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/no-destructure-props-without-to-refs',\n severity: 'error',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/no-destructure-reactive-without-to-refs',\n severity: 'error',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/no-non-null-assertion-on-ref-value',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/no-imports-from-vue-when-auto-imported',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n\n {\n id: 'vue-doctor/reactivity/watch-without-cleanup',\n severity: 'warn',\n category: 'reactivity',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/reactivity/prefer-shallowRef-for-large-data',\n severity: 'info',\n category: 'reactivity',\n source: 'doctor',\n recommended: false,\n },\n {\n id: 'vue-doctor/reactivity/prefer-readonly-for-injected',\n severity: 'info',\n category: 'reactivity',\n source: 'doctor',\n recommended: false,\n },\n\n {\n id: 'vue-doctor/composition/prefer-script-setup-for-new-files',\n severity: 'warn',\n category: 'composition',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/composition/defineProps-typed',\n severity: 'warn',\n category: 'composition',\n source: 'doctor',\n recommended: true,\n },\n\n {\n id: 'vue-doctor/performance/prefer-defineAsyncComponent-on-route',\n severity: 'info',\n category: 'performance',\n source: 'doctor',\n recommended: false,\n },\n\n {\n id: 'vue-doctor/template/v-for-has-key',\n severity: 'error',\n category: 'template',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/template/v-if-v-for-precedence',\n severity: 'error',\n category: 'template',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/template/v-memo-on-large-list',\n severity: 'warn',\n category: 'performance',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/template/no-inline-object-prop-in-list',\n severity: 'warn',\n category: 'performance',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/template/no-computed-getter-in-template-loop',\n severity: 'warn',\n category: 'template-perf',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/template/avoid-deep-v-bind-spread-in-list',\n severity: 'info',\n category: 'template-perf',\n source: 'doctor',\n recommended: true,\n },\n\n {\n id: 'vue-doctor/sfc/no-mixed-options-and-composition-api',\n severity: 'warn',\n category: 'sfc',\n source: 'doctor',\n recommended: true,\n },\n\n {\n id: 'vue-doctor/build-quality/tsconfig-strict-required',\n severity: 'warn',\n category: 'build-quality',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/build-quality/vue-tsc-in-devDeps',\n severity: 'warn',\n category: 'build-quality',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/build-quality/no-vue-cli',\n severity: 'warn',\n category: 'build-quality',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/build-quality/eslint-plugin-vue-installed',\n severity: 'info',\n category: 'build-quality',\n source: 'doctor',\n recommended: true,\n },\n\n {\n id: 'vue-doctor/deps/duplicate-vue-versions',\n severity: 'error',\n category: 'deps',\n source: 'doctor',\n recommended: true,\n },\n\n {\n id: 'vue-doctor/deps/vue-major-current',\n severity: 'info',\n category: 'deps',\n source: 'doctor',\n recommended: false,\n },\n\n {\n id: 'dead-code/unused-file',\n severity: 'warn',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'dead-code/unused-export',\n severity: 'warn',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'dead-code/unused-type-export',\n severity: 'info',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'dead-code/unused-member',\n severity: 'info',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'dead-code/unused-dependency',\n severity: 'warn',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'dead-code/unlisted-dependency',\n severity: 'error',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'dead-code/duplicate-export',\n severity: 'warn',\n category: 'dead-code',\n source: 'doctor',\n recommended: true,\n },\n\n // ── Nuxt project post-checks ────────────────────────────────────────────────\n {\n id: 'nuxt-doctor/structure/uses-app-directory',\n severity: 'warn',\n category: 'structure',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/structure/nuxt-major-current',\n severity: 'info',\n category: 'structure',\n source: 'doctor',\n recommended: false,\n },\n {\n id: 'nuxt-doctor/modules-deps/no-modules-incompatible-with-nuxt-4',\n severity: 'warn',\n category: 'modules-deps',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/modules-deps/recommended-modules-installed',\n severity: 'info',\n category: 'modules-deps',\n source: 'doctor',\n recommended: false,\n },\n {\n id: 'nuxt-doctor/nitro/compatibilityDate-set',\n severity: 'error',\n category: 'nitro',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/nitro/preset-defined-for-deploy-target',\n severity: 'warn',\n category: 'nitro',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/nitro/runtime-config-typed',\n severity: 'info',\n category: 'nitro',\n source: 'doctor',\n recommended: false,\n },\n {\n id: 'nuxt-doctor/seo/lang-on-html',\n severity: 'warn',\n category: 'seo',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/seo/useSeoMeta-on-public-page',\n severity: 'warn',\n category: 'seo',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/seo/og-image-defined',\n severity: 'warn',\n category: 'seo',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/cloudflare/nitro-cloudflare-preset',\n severity: 'warn',\n category: 'cloudflare',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/cloudflare/og-image-via-satori',\n severity: 'info',\n category: 'cloudflare',\n source: 'doctor',\n recommended: false,\n },\n {\n id: 'nuxt-doctor/cloudflare/no-node-only-modules',\n severity: 'warn',\n category: 'cloudflare',\n source: 'doctor',\n recommended: true,\n },\n\n // ── Nuxt cross-file rules ────────────────────────────────────────────────────\n {\n id: 'nuxt-doctor/data-fetching/no-shared-key-across-pages',\n severity: 'warn',\n category: 'data-fetching',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/data-fetching/ssr-safe-onMounted-only-for-client',\n severity: 'warn',\n category: 'data-fetching',\n source: 'doctor',\n recommended: true,\n },\n\n // ── Nuxt SFC rules ──────────────────────────────────────────────────────────\n {\n id: 'nuxt-doctor/ai-slop/no-mixed-app-and-root-layout',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n\n // ── Nuxt oxlint-plugin rules (source 'doctor') ──────────────────────────────\n {\n id: 'nuxt-doctor/ai-slop/no-process-client-server',\n severity: 'error',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/ai-slop/no-explicit-imports-of-auto-imported',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/ai-slop/no-useState-for-server-data',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/ai-slop/no-fetch-in-setup',\n severity: 'warn',\n category: 'ai-slop',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/data-fetching/useAsyncData-key-required-in-loop',\n severity: 'error',\n category: 'data-fetching',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/server-routes/defineEventHandler-typed',\n severity: 'warn',\n category: 'server-routes',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/server-routes/validate-body-with-h3-v2',\n severity: 'warn',\n category: 'server-routes',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/server-routes/createError-on-failure',\n severity: 'warn',\n category: 'server-routes',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/hydration/no-document-in-setup',\n severity: 'error',\n category: 'hydration',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/hydration/clientOnly-for-browser-apis',\n severity: 'error',\n category: 'hydration',\n source: 'doctor',\n recommended: true,\n },\n\n // ── Security rules ───────────────────────────────────────────────────────────\n {\n id: 'vue-doctor/security/no-v-html',\n severity: 'error',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/security/no-inner-html',\n severity: 'error',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/security/no-eval-like',\n severity: 'error',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/security/no-auth-token-in-web-storage',\n severity: 'warn',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/security/no-secrets-in-source',\n severity: 'warn',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/security/no-target-blank-without-rel',\n severity: 'warn',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/security/no-javascript-uri',\n severity: 'error',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/security/no-secret-in-public-runtime-config',\n severity: 'error',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'nuxt-doctor/security/no-user-input-in-fetch-url',\n severity: 'warn',\n category: 'security',\n source: 'doctor',\n recommended: true,\n },\n\n // ── Design / Tailwind rules ──────────────────────────────────────────────────\n {\n id: 'vue-doctor/design/no-arbitrary-tailwind-values',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/design/no-raw-hex-color',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/design/no-default-tailwind-palette',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/design/no-important-utility',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/design/no-hardcoded-inline-style',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/design/no-missing-alt',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n {\n id: 'vue-doctor/design/no-absurd-z-index',\n severity: 'warn',\n category: 'design',\n source: 'doctor',\n recommended: true,\n },\n];\n\nexport interface ListRulesFilter {\n readonly preset?: 'recommended' | 'all';\n readonly category?: RuleCategory;\n readonly source?: RuleSource;\n readonly severity?: Severity;\n}\n\nexport function listRules(filter: ListRulesFilter = {}): RegisteredRule[] {\n let rules = [...RULE_REGISTRY];\n if (filter.preset === 'recommended') {\n rules = rules.filter((r) => r.recommended);\n }\n if (filter.category) {\n rules = rules.filter((r) => r.category === filter.category);\n }\n if (filter.source) {\n rules = rules.filter((r) => r.source === filter.source);\n }\n if (filter.severity) {\n rules = rules.filter((r) => r.severity === filter.severity);\n }\n return rules.sort((a, b) => a.id.localeCompare(b.id));\n}\n","import { RULE_REGISTRY } from '../rule-registry.js';\nimport type { Severity } from '../types.js';\n\nexport type PresetName = 'minimal' | 'recommended' | 'strict' | 'all';\n\nexport const PRESET_NAMES: readonly PresetName[] = [\n 'minimal',\n 'recommended',\n 'strict',\n 'all',\n];\n\nexport function isPresetName(value: string): value is PresetName {\n return (PRESET_NAMES as readonly string[]).includes(value);\n}\n\n/**\n * Resolve a preset name to its base ruleId -> Severity map.\n *\n * - `minimal` : errors only (warn/info turned off)\n * - `recommended` : errors + warns (info off) — same as today's default\n * - `strict` : errors + warns + infos all on at registered severity\n * - `all` : alias of `strict` for now; reserved to surface every\n * known ruleId regardless of preset opt-in policy\n *\n * The returned map is the BASE; downstream code merges user config\n * `rules:` on top, then CLI `--rule` overrides on top of that.\n */\nexport function resolvePreset(name: PresetName): Record<string, Severity> {\n const rules: Record<string, Severity> = {};\n for (const rule of RULE_REGISTRY) {\n if (name === 'minimal') {\n if (rule.severity === 'error') rules[rule.id] = 'error';\n } else if (name === 'recommended') {\n if (rule.severity === 'error' || rule.severity === 'warn') {\n rules[rule.id] = rule.severity;\n }\n } else {\n // strict | all\n rules[rule.id] = rule.severity;\n }\n }\n return rules;\n}\n","import { z } from 'zod';\nimport { RULE_REGISTRY } from '../rule-registry.js';\n\n/**\n * A rule severity level as accepted in user config. `off` disables a rule\n * (removing it from the resolved preset base); the other three mirror the\n * internal {@link import('../types.js').Severity} vocabulary.\n */\nexport const LevelSchema = z.enum(['error', 'warn', 'info', 'off']);\n\n/**\n * The accepted shape of a single `rules` entry. Doctor config only ever takes\n * a bare severity string (no `[level, options]` tuple, no `{ level }` object) —\n * this matches the historical hand-rolled validator exactly.\n */\nexport const RuleEntrySchema = LevelSchema;\n\nconst ruleIds: readonly string[] = RULE_REGISTRY.map((rule) => rule.id);\n\n/**\n * Dynamic `rules` object: every registered rule id is a known optional key, and\n * a `catchall` keeps unknown keys parseable so {@link DoctorUserConfigSchema}'s\n * `superRefine` can report them with a precise path. Building the object from\n * RULE_REGISTRY is what lets `z.toJSONSchema()` enumerate the known ids.\n */\nconst RulesSchema = z\n .object(\n Object.fromEntries(ruleIds.map((id) => [id, RuleEntrySchema.optional()])),\n )\n .catchall(RuleEntrySchema.optional());\n\n/**\n * Scalar fields of the user config. `.loose()` preserves unknown top-level keys\n * (forward-compatibility, matching the old validator which ignored them) and is\n * required so a `$schema` editor hint round-trips untouched.\n */\nconst BaseUserConfigSchema = z\n .object({\n $schema: z.string().optional(),\n rootDir: z.string().optional(),\n include: z.array(z.string()).optional(),\n exclude: z.array(z.string()).optional(),\n failOn: z.enum(['error', 'warn', 'none']).optional(),\n threshold: z.int().min(0).max(100).optional(),\n preset: z\n .enum(['minimal', 'recommended', 'strict', 'all'], {\n error: \"must be one of 'minimal', 'recommended', 'strict', 'all'\",\n })\n .optional(),\n extends: z.array(z.string()).optional(),\n fixExcludes: z.array(z.string()).optional(),\n rules: RulesSchema.optional(),\n })\n .loose();\n\n/**\n * The single source of truth for doctor config validation. Wraps the base\n * object in a `superRefine` that rejects any unknown rule id with a\n * `rules.<id>` path, so a typo'd rule surfaces as an `InvalidConfigError`\n * rather than silently doing nothing.\n */\nexport const DoctorUserConfigSchema = BaseUserConfigSchema.superRefine(\n (value, ctx) => {\n const rules = value.rules;\n if (!rules) return;\n const known = new Set(ruleIds);\n for (const key of Object.keys(rules)) {\n if (!known.has(key)) {\n ctx.addIssue({\n code: 'custom',\n path: ['rules', key],\n message: `unknown rule id ${JSON.stringify(key)}`,\n });\n }\n }\n },\n);\n\n/** The inferred user-config type — the single source of truth for the shape. */\nexport type DoctorUserConfigInput = z.infer<typeof DoctorUserConfigSchema>;\n\n/**\n * Generate the JSON Schema for the user config. Built from the base object\n * (not the refined wrapper) so `z.toJSONSchema` emits the full property set,\n * including every enumerated rule id. The result is what gets written to\n * `schema.json` and served from the docs site.\n */\nexport function buildJsonSchema(): Record<string, unknown> {\n return z.toJSONSchema(BaseUserConfigSchema) as Record<string, unknown>;\n}\n","import { z } from 'zod';\nimport { DoctorUserConfigSchema } from './schema.js';\nimport { InvalidConfigError } from './errors.js';\n\n/**\n * Render a single zod issue into the historical hand-rolled message format\n * (`<path>: <message>`), so InvalidConfigError.message stays backward-compatible\n * with callers that assert on substrings like `threshold`, `failOn`, or\n * `rules.foo/bar`. A root-level issue (empty path) maps to the legacy\n * `config: must be an object` wording.\n */\nfunction formatIssue(issue: z.core.$ZodIssue): string {\n if (issue.path.length === 0) {\n return 'config: must be an object';\n }\n const path = issue.path.map((segment) => String(segment)).join('.');\n return `${path}: ${issue.message}`;\n}\n\n/**\n * Validate a raw, untrusted config object against the zod schema — the single\n * source of truth. Throws {@link InvalidConfigError} (carrying the full zod\n * issue list) on the first failure, mirroring the legacy validator's\n * throw-on-first-error contract.\n */\nexport function validateConfig(raw: unknown): void {\n const result = DoctorUserConfigSchema.safeParse(raw);\n if (result.success) return;\n const { issues } = result.error;\n throw new InvalidConfigError(formatIssue(issues[0]!), issues);\n}\n","import { existsSync } from 'node:fs';\nimport { extname, resolve } from 'node:path';\nimport { loadConfig } from 'c12';\nimport { BUILT_IN_RECOMMENDED } from './built-in.js';\nimport {\n ConfigCycleError,\n ConfigFileNotFoundError,\n InvalidConfigError,\n} from './errors.js';\nimport { isPresetName, type PresetName, resolvePreset } from './presets.js';\nimport type {\n ConfigSource,\n DoctorUserConfig,\n ResolvedDoctorConfig,\n} from './types.js';\nimport { validateConfig } from './validate.js';\nimport type { Severity } from '../types.js';\n\nconst SOURCE_MAP: Record<string, ConfigSource> = {\n ts: 'ts',\n mjs: 'mjs',\n js: 'js',\n json: 'json',\n jsonc: 'jsonc',\n};\n\nexport interface LoadDoctorConfigOptions {\n readonly explicitPath?: string;\n readonly presetOverride?: string;\n}\n\nexport async function loadDoctorConfig(\n rootDir: string,\n explicitPathOrOptions?: string | LoadDoctorConfigOptions,\n): Promise<ResolvedDoctorConfig> {\n const opts: LoadDoctorConfigOptions =\n typeof explicitPathOrOptions === 'string'\n ? { explicitPath: explicitPathOrOptions }\n : (explicitPathOrOptions ?? {});\n const explicitPath = opts.explicitPath;\n if (opts.presetOverride !== undefined && !isPresetName(opts.presetOverride)) {\n throw new InvalidConfigError(\n `preset: must be one of 'minimal', 'recommended', 'strict', 'all', got ${JSON.stringify(opts.presetOverride)}`,\n );\n }\n if (explicitPath) {\n const absPath = resolve(rootDir, explicitPath);\n if (!existsSync(absPath)) {\n throw new ConfigFileNotFoundError(explicitPath);\n }\n }\n\n const chain: string[] = [];\n\n const result = await loadConfig<DoctorUserConfig>({\n cwd: rootDir,\n name: 'doctor',\n packageJson: 'doctor',\n rcFile: false,\n globalRc: false,\n ...(explicitPath ? { configFile: resolve(rootDir, explicitPath) } : {}),\n resolve(source, options) {\n const base = options.cwd;\n const key = resolve(base, source);\n if (chain.includes(key)) {\n throw new ConfigCycleError([...chain, key]);\n }\n chain.push(key);\n return undefined;\n },\n });\n\n const raw: DoctorUserConfig = result.config as DoctorUserConfig;\n\n validateConfig(raw);\n\n let source: ConfigSource;\n let configFile: string | undefined;\n\n if (explicitPath) {\n source = 'flag';\n configFile = resolve(rootDir, explicitPath);\n } else if (result._configFile) {\n const ext = extname(result._configFile).slice(1) as keyof typeof SOURCE_MAP;\n source = SOURCE_MAP[ext];\n configFile = result._configFile;\n } else if (Object.keys(raw).length > 0) {\n source = 'package.json';\n configFile = resolve(rootDir, 'package.json');\n } else {\n source = 'built-in';\n configFile = undefined;\n }\n\n // Resolve preset name: CLI override wins, then config file, default 'recommended'.\n const presetName: PresetName = (opts.presetOverride ??\n raw.preset ??\n 'recommended') as PresetName;\n const presetRules = resolvePreset(presetName);\n\n // User config: 'off' explicitly removes the rule from the base preset.\n const userRules: Record<string, Severity> = {};\n const userOff = new Set<string>();\n if (raw.rules && typeof raw.rules === 'object') {\n for (const [key, value] of Object.entries(raw.rules)) {\n if (value === 'off') {\n userOff.add(key);\n } else {\n userRules[key] = value as Severity;\n }\n }\n }\n\n // Merge: preset base -> user rules on top -> user 'off' removes entries.\n const mergedRules: Record<string, Severity> = {\n ...presetRules,\n ...userRules,\n };\n for (const key of userOff) delete mergedRules[key];\n\n return {\n rootDir,\n include: raw.include ?? BUILT_IN_RECOMMENDED.include,\n exclude: raw.exclude ?? BUILT_IN_RECOMMENDED.exclude,\n failOn: raw.failOn ?? BUILT_IN_RECOMMENDED.failOn,\n threshold: raw.threshold ?? BUILT_IN_RECOMMENDED.threshold,\n rules: mergedRules,\n preset: presetName,\n source,\n configFile,\n ...(raw.fixExcludes ? { fixExcludes: raw.fixExcludes } : {}),\n };\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 fixExcludes?: string[];\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 ...((cli.fixExcludes ?? resolved.fixExcludes)\n ? { fixExcludes: cli.fixExcludes ?? resolved.fixExcludes }\n : {}),\n };\n}\n","import { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { detectProject } from '../detect-project.js';\nimport { listSourceFiles } from '../file-scan.js';\nimport { pathExists } from '../project-info/path-exists.js';\nimport type { DoctorUserConfig } from '../config/types.js';\nimport type { ProjectInfo } from '../types/project-info.js';\n\nexport type InitConfigFormat = 'ts' | 'json' | 'package-json';\nexport type InitPreset = 'recommended' | 'strict' | 'minimal';\n\nexport interface RawInitAnswers {\n target?: InitConfigFormat;\n preset?: InitPreset;\n threshold?: number;\n exclude?: string;\n}\n\nexport interface ResolvedInitAnswers {\n configFormat: InitConfigFormat;\n preset: InitPreset;\n threshold: number | undefined;\n exclude: string[] | undefined;\n}\n\nexport interface InitOptions {\n dir: string;\n configFormat: InitConfigFormat;\n preset: InitPreset;\n threshold: number | undefined;\n exclude: string[] | undefined;\n binName: string;\n}\n\nexport interface InitFileWrite {\n path: string;\n content: string;\n}\n\nexport interface InitPlan {\n writes: InitFileWrite[];\n conflict: boolean;\n conflictPath: string | null;\n}\n\nexport function parseExcludeList(\n raw: string | undefined,\n): string[] | undefined {\n if (!raw) return undefined;\n const parts = raw\n .split(',')\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n return parts.length > 0 ? parts : undefined;\n}\n\nexport function normalizeInitAnswers(raw: RawInitAnswers): ResolvedInitAnswers {\n return {\n configFormat: raw.target ?? 'ts',\n preset: raw.preset ?? 'recommended',\n threshold: typeof raw.threshold === 'number' ? raw.threshold : undefined,\n exclude: parseExcludeList(raw.exclude),\n };\n}\n\nfunction frameworkLabel(project: ProjectInfo): string {\n if (project.framework === 'nuxt') {\n return `Nuxt ${project.nuxtVersion ?? 'unknown'}`;\n }\n if (project.framework === 'vue') {\n return `Vue ${project.vueVersion ?? 'unknown'}`;\n }\n return 'unknown project';\n}\n\nexport function renderDetectSummary(\n project: ProjectInfo,\n sfcCount: number,\n): string {\n const ts = project.capabilities.has('typescript') ? ' · TS' : '';\n const noun = sfcCount === 1 ? 'SFC' : 'SFCs';\n return `detected: ${frameworkLabel(project)}${ts} · ${sfcCount} ${noun}`;\n}\n\nexport async function detectSummary(dir: string): Promise<string> {\n const project = await detectProject(dir);\n const sfcs = await listSourceFiles({\n rootDir: dir,\n include: ['**/*.vue'],\n exclude: ['**/node_modules/**'],\n });\n return renderDetectSummary(project, sfcs.length);\n}\n\nfunction buildUserConfig(options: InitOptions): DoctorUserConfig {\n const config: DoctorUserConfig = { preset: options.preset };\n if (options.threshold !== undefined) config.threshold = options.threshold;\n if (options.exclude && options.exclude.length > 0) {\n config.exclude = options.exclude;\n }\n return config;\n}\n\nfunction renderTsConfig(options: InitOptions): string {\n const config = buildUserConfig(options);\n const lines = [\n \"import { defineConfig } from '@geoql/doctor-core';\",\n '',\n 'export default defineConfig({',\n ` preset: '${config.preset}',`,\n ];\n if (config.threshold !== undefined) {\n lines.push(` threshold: ${config.threshold},`);\n }\n if (config.exclude) {\n const globs = config.exclude.map((glob) => `'${glob}'`).join(', ');\n lines.push(` exclude: [${globs}],`);\n }\n lines.push('});');\n return `${lines.join('\\n')}\\n`;\n}\n\nfunction renderJsonConfig(options: InitOptions): string {\n return `${JSON.stringify(buildUserConfig(options), null, 2)}\\n`;\n}\n\ninterface MutablePackageJson {\n scripts?: Record<string, string>;\n doctor?: DoctorUserConfig;\n [key: string]: unknown;\n}\n\nasync function readPackageJsonRaw(\n path: string,\n): Promise<MutablePackageJson | null> {\n try {\n return JSON.parse(await readFile(path, 'utf8')) as MutablePackageJson;\n } catch {\n return null;\n }\n}\n\nexport async function planInit(options: InitOptions): Promise<InitPlan> {\n const writes: InitFileWrite[] = [];\n const packageJsonPath = join(options.dir, 'package.json');\n const existingPkg = await readPackageJsonRaw(packageJsonPath);\n const pkg: MutablePackageJson = { ...(existingPkg ?? {}) };\n\n let conflict = false;\n let conflictPath: string | null = null;\n\n if (options.configFormat === 'package-json') {\n if (pkg.doctor !== undefined) {\n conflict = true;\n conflictPath = packageJsonPath;\n }\n pkg.doctor = buildUserConfig(options);\n } else {\n const fileName =\n options.configFormat === 'ts' ? 'doctor.config.ts' : 'doctor.config.json';\n const configPath = join(options.dir, fileName);\n if (await pathExists(configPath)) {\n conflict = true;\n conflictPath = configPath;\n }\n const content =\n options.configFormat === 'ts'\n ? renderTsConfig(options)\n : renderJsonConfig(options);\n writes.push({ path: configPath, content });\n }\n\n pkg.scripts = { ...(pkg.scripts ?? {}), 'doctor:check': options.binName };\n writes.push({\n path: packageJsonPath,\n content: `${JSON.stringify(pkg, null, 2)}\\n`,\n });\n\n return { writes, conflict, conflictPath };\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","import { readFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { glob } from 'tinyglobby';\nimport { findMonorepoRoot } from './find-monorepo-root.js';\nimport { readPackageJson } from './read-package-json.js';\n\nexport interface WorkspacePackage {\n name: string;\n dir: string;\n}\n\nfunction parsePackageGlobs(yaml: string): string[] {\n const globs: string[] = [];\n let inPackages = false;\n for (const raw of yaml.split('\\n')) {\n if (!inPackages) {\n if (/^packages:/.test(raw)) inPackages = true;\n continue;\n }\n const item = raw.match(/^\\s*-\\s*(.+?)\\s*$/);\n if (item) {\n globs.push(item[1].replace(/^['\"]|['\"]$/g, ''));\n continue;\n }\n if (raw.trim() === '') continue;\n break;\n }\n return globs;\n}\n\nexport async function listWorkspacePackages(\n rootDir: string,\n): Promise<WorkspacePackage[]> {\n const { root, kind } = await findMonorepoRoot(rootDir);\n if (kind !== 'pnpm') return [];\n\n const yaml = await readFile(join(root, 'pnpm-workspace.yaml'), 'utf8');\n const globs = parsePackageGlobs(yaml);\n const manifests = await glob(\n globs.map((g) => `${g}/package.json`),\n { cwd: root, absolute: true, onlyFiles: true, dot: false },\n );\n\n const packages: WorkspacePackage[] = [];\n for (const manifest of manifests) {\n const dir = dirname(manifest);\n const pkg = await readPackageJson(dir);\n if (pkg?.name) packages.push({ name: pkg.name, dir });\n }\n packages.sort((a, b) => a.name.localeCompare(b.name));\n return packages;\n}\n","export function docsUrl(ruleId: string): string {\n return `https://docs.the-doctor.report/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 { relative } from 'node:path';\nimport type { Diagnostic } from '../types.js';\nimport { compareStrings } from './render.js';\nimport type { ReporterInput } from './types.js';\n\nconst DOCS_BASE = 'https://docs.the-doctor.report/rules/';\nconst MAX_PER_SECTION = 5;\n\nfunction binName(toolName: string): string {\n return toolName.replace('@geoql/', '');\n}\n\nfunction relativeLocation(diag: Diagnostic, rootDirectory: string): string {\n const file = relative(rootDirectory, diag.file).replaceAll('\\\\', '/');\n return `${file}:${diag.line}`;\n}\n\nfunction findingLine(diag: Diagnostic, rootDirectory: string): string {\n return `- \\`${relativeLocation(diag, rootDirectory)}\\` ${diag.ruleId} — ${diag.message}`;\n}\n\nfunction sortBySeverityFilter(\n diagnostics: readonly Diagnostic[],\n severity: Diagnostic['severity'],\n rootDirectory: string,\n): Diagnostic[] {\n return diagnostics\n .filter((d) => d.severity === severity)\n .sort((a, b) => {\n const byFile = compareStrings(\n relative(rootDirectory, a.file).replaceAll('\\\\', '/'),\n relative(rootDirectory, b.file).replaceAll('\\\\', '/'),\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 section(\n title: string,\n diagnostics: Diagnostic[],\n rootDirectory: string,\n): string[] {\n if (diagnostics.length === 0) return [];\n const lines = ['', `### ${title}`];\n for (const d of diagnostics.slice(0, MAX_PER_SECTION)) {\n lines.push(findingLine(d, rootDirectory));\n }\n return lines;\n}\n\nexport function prCommentReport(input: ReporterInput): string {\n const score = input.score.score;\n const header = `## 🛡 ${input.toolName} — Score: ${score}`;\n const errors = sortBySeverityFilter(\n input.diagnostics,\n 'error',\n input.rootDirectory,\n );\n const warnings = sortBySeverityFilter(\n input.diagnostics,\n 'warn',\n input.rootDirectory,\n );\n const actionable = errors.length + warnings.length;\n\n if (actionable === 0) {\n return `${header}\\n\\n✓ No actionable findings. Score: ${score}\\n`;\n }\n\n const topRule = (errors[0] ?? warnings[0]).ruleId;\n const lines: string[] = [\n header,\n '',\n `**${actionable} findings** (${errors.length} errors, ${warnings.length} warnings)`,\n ...section('Errors', errors, input.rootDirectory),\n ...section('Warnings', warnings, input.rootDirectory),\n '',\n '---',\n `[View the docs](${DOCS_BASE}) · Run \\`${binName(input.toolName)} explain ${topRule}\\` for details.`,\n ];\n\n return `${lines.join('\\n')}\\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 { prCommentReport } from './pr-comment.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 | 'pr-comment';\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 if (kind === 'pr-comment') return prCommentReport(input);\n return agentReport(input, options);\n}\n","import { loadAllRuleDocs, loadRuleDoc } from './rule-docs.js';\nimport type { RuleDoc } from './rule-docs.js';\n\n// Which published CLI owns a given rule id. Nuxt rules ship in @geoql/nuxt-doctor\n// (which bundles the Vue passes too); everything else is audited by\n// @geoql/vue-doctor. Kept co-located (Rule #9) — single-use mapping for prompts.\ntype DoctorCli = '@geoql/vue-doctor' | '@geoql/nuxt-doctor';\n\nfunction cliForRule(ruleId: string): DoctorCli {\n return ruleId.startsWith('nuxt-doctor/')\n ? '@geoql/nuxt-doctor'\n : '@geoql/vue-doctor';\n}\n\nfunction presetLine(doc: RuleDoc): string {\n return doc.recommended\n ? 'This rule is part of the `recommended` preset, so it runs by default.'\n : 'This rule is off by default in `recommended`; enable it with `--rule ' +\n `${doc.id}:warn\\` or in \\`doctor.config.ts\\`.`;\n}\n\nfunction article(word: string): 'a' | 'an' {\n return /^[aeiou]/i.test(word) ? 'an' : 'a';\n}\n\nfunction whyThisMatters(doc: RuleDoc): string {\n const severityNote =\n doc.severity === 'error'\n ? 'It is an `error`-severity rule: a finding is a correctness, security, or hard-correctness defect that should block a clean audit.'\n : doc.severity === 'warn'\n ? 'It is a `warn`-severity rule: a finding is a likely bug, performance trap, or AI-slop pattern worth fixing before shipping.'\n : 'It is an `info`-severity rule: a finding is an opt-in suggestion that nudges the code toward the idiomatic Vue 3 / Nuxt 4 pattern.';\n return `\\`${doc.id}\\` is ${article(doc.severity)} ${doc.severity}-severity ${doc.category} rule from ${doc.source}. ${severityNote}\\n\\n${presetLine(doc)}`;\n}\n\nfunction howToFix(doc: RuleDoc, cli: DoctorCli): string {\n return [\n `Open each file the audit flags for \\`${doc.id}\\` and edit the offending code in the working tree directly.`,\n '',\n `1. Read the canonical rule reference at ${doc.helpUri} for the full rationale and the idiomatic ${doc.category} pattern.`,\n `2. Apply the smallest change that resolves the ${doc.category} concern without altering unrelated behavior — do not suppress the finding with an inline disable unless the rule is a genuine false positive for that line.`,\n `3. Run \\`npx ${cli} explain ${doc.id}\\` for an inline summary of the severity, category, and help link while you work.`,\n '',\n 'Fix by severity: resolve `error` findings first, then `warn`, then `info`.',\n ].join('\\n');\n}\n\nfunction howToValidate(doc: RuleDoc, cli: DoctorCli): string {\n return [\n 'Re-run the audit scoped to just this rule and confirm it reports zero findings:',\n '',\n '```bash',\n `npx ${cli} --rule ${doc.id}:error --full`,\n '```',\n '',\n `A clean run (no diagnostics for \\`${doc.id}\\`) means the fix is complete. If findings remain, repeat the \"How to fix\" steps on the still-flagged files.`,\n ].join('\\n');\n}\n\n/**\n * Render a self-contained \"fix + validate\" markdown recipe for a single rule.\n * Returns `null` for an unknown rule id. Pure: derives everything from the\n * rule's `RuleDoc` (id, severity, category, source, recommended, helpUri).\n */\nexport function renderRulePrompt(ruleId: string): string | null {\n const doc = loadRuleDoc(ruleId);\n if (!doc) return null;\n const cli = cliForRule(doc.id);\n return [\n `# Fix: \\`${doc.id}\\``,\n '',\n `> **Rule** \\`${doc.id}\\` · **Severity** \\`${doc.severity}\\` · **Category** \\`${doc.category}\\` · **Source** \\`${doc.source}\\``,\n '',\n '## Why this matters',\n '',\n whyThisMatters(doc),\n '',\n '## How to fix',\n '',\n howToFix(doc, cli),\n '',\n '## How to validate',\n '',\n howToValidate(doc, cli),\n '',\n '## Reference',\n '',\n `Canonical rule documentation: ${doc.helpUri}`,\n '',\n ].join('\\n');\n}\n\n/**\n * Render the canonical agent playbook: the scan → filter → triage → fix →\n * validate loop an AI agent follows when cleaning up doctor diagnostics. Pure\n * markdown; fetched on demand by the agent skill at runtime.\n */\nexport function renderAgentPlaybook(): string {\n const ruleCount = loadAllRuleDocs().length;\n return [\n '# Doctor Agent Playbook',\n '',\n 'You are an AI agent cleaning up `@geoql/doctor` findings in a Vue 3 / Nuxt 4',\n 'codebase. Doctor does not generate code — it critiques the code you just',\n 'wrote. Follow this loop exactly.',\n '',\n '## Guardrails',\n '',\n '- Edit the working tree directly to fix findings.',\n '- **NEVER commit.** Leave staging and committing to the human.',\n '- **NEVER open a pull request**, push a branch, or run any git write command.',\n '- Never weaken a rule to make a finding disappear; fix the underlying code.',\n '',\n '## Pick the right CLI',\n '',\n 'Use `npx @geoql/nuxt-doctor` for a Nuxt 4 project (it runs the Vue passes',\n 'too) and `npx @geoql/vue-doctor` for a standalone Vue 3 project. The flags',\n `below are identical for both. Doctor ships ~${ruleCount} rules across the vue,`,\n 'nuxt, and oxlint-builtin plugins.',\n '',\n '## The loop',\n '',\n '### 1. Scan',\n '',\n 'Audit only what changed so you stay focused on your own edits:',\n '',\n '```bash',\n 'npx @geoql/vue-doctor --diff # findings in files changed vs HEAD',\n 'npx @geoql/vue-doctor --staged # findings in staged files only',\n 'npx @geoql/vue-doctor --full # complete scan (overrides --diff/--staged)',\n '```',\n '',\n 'For a quick health gate, read just the score:',\n '',\n '```bash',\n 'npx @geoql/vue-doctor --score # prints a single 0-100 integer',\n '```',\n '',\n '### 2. Filter',\n '',\n 'Get the machine-readable report and work from it:',\n '',\n '```bash',\n 'npx @geoql/vue-doctor --diff --json',\n '```',\n '',\n 'Group the diagnostics by `ruleId`. Drop nothing — every finding is in scope',\n 'unless the human told you otherwise.',\n '',\n '### 3. Triage',\n '',\n 'Order the work by severity: `error` first, then `warn`, then `info`. To',\n 'understand a single rule before touching code:',\n '',\n '```bash',\n 'npx @geoql/vue-doctor explain <rule> # severity, category, help link',\n 'npx @geoql/vue-doctor list-rules # every registered rule (alias: rules)',\n '```',\n '',\n '### 4. Fix',\n '',\n 'For each rule with findings, fetch the canonical per-rule recipe and apply',\n 'it to every flagged file:',\n '',\n '```bash',\n 'curl --fail --silent --show-error \\\\',\n ' https://docs.the-doctor.report/prompts/rules/<plugin>/<rule>.md',\n '```',\n '',\n 'For example, `vue-doctor/template/v-for-has-key` lives at',\n '`/prompts/rules/vue-doctor/template/v-for-has-key.md`. Each recipe explains',\n 'why the rule matters, how to fix it, and how to validate the fix. Edit the',\n 'working tree directly — never an inline disable unless it is a true false',\n 'positive.',\n '',\n '### 5. Validate',\n '',\n 'After fixing a rule, re-run the audit scoped to just that rule and confirm',\n 'zero findings:',\n '',\n '```bash',\n 'npx @geoql/vue-doctor --rule <rule>:error --full',\n '```',\n '',\n 'Then re-run the full scan and confirm the score did not regress:',\n '',\n '```bash',\n 'npx @geoql/vue-doctor --full --score',\n '```',\n '',\n 'Repeat the loop until the score is clean. Hand the working tree back to the',\n 'human to review and commit.',\n '',\n ].join('\\n');\n}\n","import { scoreDiagnostics } from './score.js';\nimport type { AuditReport, Diagnostic } from './types.js';\n\n/**\n * Filter `report.diagnostics` to a known set of allowed rule ids, then\n * recompute `score`, `errorCount`, `warnCount`, `infoCount`, `scoreResult`,\n * `ruleCounts`, and `exitCode` from the filtered array.\n *\n * Why: the CLI layer calls `audit()` and then applies its own\n * `allowedRuleIds` filter to drop suppressed (`off`) and preset-excluded\n * (`info` rules not in `recommended`) diagnostics. The audit's own\n * `score`/`counts` are computed BEFORE the CLI filter, so they still\n * include the suppressed findings. That desync surfaces to consumers\n * (the SaaS `--push` payload, the dashboard's counts-but-no-findings bug)\n * and to the `score` itself (suppressed findings still penalize).\n *\n * Invariant enforced here:\n * report.errorCount + report.warnCount + report.infoCount === report.diagnostics.length\n * report.scoreResult.totalFindings === report.diagnostics.length\n *\n * `exitCode=2` (oxlint crash) is preserved verbatim; `exitCode=1` is\n * recomputed from the surviving counts + the `failOn` gate.\n */\nexport function filterReportByRules(\n report: AuditReport,\n allowedRuleIds: ReadonlySet<string>,\n failOn: 'error' | 'warn' | 'none' = 'error',\n oxlintStderr?: string,\n): AuditReport {\n const filtered: Diagnostic[] = [];\n for (const d of report.diagnostics) {\n if (allowedRuleIds.has(d.ruleId)) filtered.push(d);\n }\n\n const threshold = report.scoreResult.threshold;\n const scoreResult = scoreDiagnostics(filtered, { threshold });\n\n const ruleCounts: Record<string, number> = {};\n for (const d of filtered) {\n ruleCounts[d.ruleId] = (ruleCounts[d.ruleId] ?? 0) + 1;\n }\n\n let exitCode: 0 | 1 | 2 = report.exitCode;\n if (exitCode !== 2) {\n if (failOn === 'none') {\n exitCode = 0;\n } else {\n const tripping =\n failOn === 'warn'\n ? scoreResult.errorCount + scoreResult.warnCount\n : scoreResult.errorCount;\n exitCode = tripping > 0 ? 1 : 0;\n }\n }\n // When the audit reported an oxlint-crash exit=2 it usually also set\n // scoreResult.keepResultFromOxlint — not applicable here, the helper\n // just preserves exit=2 unchanged when stderr indicates the crash.\n // (The oxlintStderr parameter is kept for forward-compatibility: the\n // CLI passes the same stderr it saw and we don't second-guess exit=2.)\n void oxlintStderr;\n\n return {\n ...report,\n diagnostics: filtered,\n score: scoreResult.score,\n errorCount: scoreResult.errorCount,\n warnCount: scoreResult.warnCount,\n infoCount: scoreResult.infoCount,\n scoreResult,\n ruleCounts,\n exitCode,\n };\n}\n","import { isAbsolute, relative } from 'node:path';\nimport { RULE_REGISTRY } from './rule-registry.js';\nimport type { Diagnostic, Severity } from './types.js';\n\n/**\n * The 6 fields the SaaS receives for each finding.\n * Everything else (message, codeSnippet, recommendation, etc.) is privacy-sensitive\n * and MUST be stripped before transmission.\n */\nexport interface PushedFinding {\n file: string;\n line: number;\n col: number;\n ruleId: string;\n severity: Severity;\n category: string;\n}\n\nexport interface PushPayloadInput {\n project: string;\n score: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n findings: PushedFinding[];\n}\n\nexport interface PushPayload extends PushPayloadInput {\n commitSha?: string;\n branch?: string;\n prNumber?: number;\n}\n\nexport interface PushOptions {\n project: string;\n score: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n diagnostics: Diagnostic[];\n /** Project root used to relativize absolute finding file paths. */\n rootDir?: string;\n url: string;\n apiKey: string;\n fetchImpl?: typeof fetch;\n /** Overrides for the request timeout (ms). Defaults to 5000. Test-only. */\n timeoutMs?: number;\n}\n\nexport type PushResult =\n | { ok: true; status?: number; error?: undefined }\n | { ok: false; status?: number; error: string };\n\nconst PUSH_TIMEOUT_MS = 5000;\n\nconst categoryByRuleId: ReadonlyMap<string, string> = new Map(\n RULE_REGISTRY.map((r) => [r.id, r.category]),\n);\n\nfunction lookupCategory(ruleId: string): string {\n return categoryByRuleId.get(ruleId) ?? 'unknown';\n}\n\nfunction toRepoRelative(file: string, rootDir: string | undefined): string {\n if (!rootDir || !isAbsolute(file)) return file;\n const rel = relative(rootDir, file);\n // Paths outside rootDir would relativize to ../../… which is more\n // confusing (and more revealing) than the original — keep those as-is.\n if (rel.startsWith('..')) return file;\n return rel;\n}\n\n/**\n * Strip a list of Diagnostics down to the 6 allowed push fields.\n * Privacy boundary: this function is the single point of enforcement.\n * If you add a new privacy-sensitive field to Diagnostic, add it to the deny list here.\n *\n * Absolute file paths are relativized against rootDir so dashboards show\n * `src/Foo.vue` rather than the CI runner's `/home/runner/work/<repo>/…`.\n */\nexport function stripFindings(\n diagnostics: Diagnostic[],\n rootDir?: string,\n): PushedFinding[] {\n const out: PushedFinding[] = new Array(diagnostics.length);\n for (let i = 0; i < diagnostics.length; i++) {\n const d = diagnostics[i]!;\n out[i] = {\n file: toRepoRelative(d.file, rootDir),\n line: d.line,\n col: d.column,\n ruleId: d.ruleId,\n severity: d.severity,\n category: lookupCategory(d.ruleId),\n };\n }\n return out;\n}\n\nfunction readOptionalEnv(name: string): string | undefined {\n const v = process.env[name];\n return v === undefined || v === '' ? undefined : v;\n}\n\nfunction readPrNumber(): number | undefined {\n const raw = readOptionalEnv('GITHUB_PR_NUMBER');\n if (raw === undefined) return undefined;\n const n = Number(raw);\n return Number.isFinite(n) ? n : undefined;\n}\n\n/**\n * Build the top-level POST body. CI fields (commitSha, branch, prNumber) are\n * included ONLY when the matching GITHUB_* env var is set.\n */\nexport function buildPushPayload(input: PushPayloadInput): PushPayload {\n const payload: PushPayload = {\n project: input.project,\n score: input.score,\n errorCount: input.errorCount,\n warnCount: input.warnCount,\n infoCount: input.infoCount,\n findings: input.findings,\n };\n const commitSha = readOptionalEnv('GITHUB_SHA');\n const branch = readOptionalEnv('GITHUB_REF_NAME');\n const prNumber = readPrNumber();\n if (commitSha !== undefined) payload.commitSha = commitSha;\n if (branch !== undefined) payload.branch = branch;\n if (prNumber !== undefined) payload.prNumber = prNumber;\n return payload;\n}\n\n/**\n * Strip + POST findings to a SaaS endpoint. Never throws — returns\n * `{ ok: false, error }` on any HTTP / network failure so the audit's\n * exit code is not affected by SaaS downtime.\n */\nexport async function pushFindings(opts: PushOptions): Promise<PushResult> {\n const findings = stripFindings(opts.diagnostics, opts.rootDir);\n const payload = buildPushPayload({\n project: opts.project,\n score: opts.score,\n errorCount: opts.errorCount,\n warnCount: opts.warnCount,\n infoCount: opts.infoCount,\n findings,\n });\n\n const fetchImpl: typeof fetch = opts.fetchImpl ?? fetch;\n const controller = new AbortController();\n const timeoutMs = opts.timeoutMs ?? PUSH_TIMEOUT_MS;\n const timer = setTimeout(() => controller.abort(), timeoutMs);\n timer.unref?.();\n\n try {\n const res = await fetchImpl(opts.url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': opts.apiKey,\n },\n body: JSON.stringify(payload),\n signal: controller.signal,\n });\n clearTimeout(timer);\n if (res.ok) {\n return { ok: true, status: res.status };\n }\n return {\n ok: false,\n status: res.status,\n error: `HTTP ${res.status} ${res.statusText}`.trim(),\n };\n } catch (err) {\n clearTimeout(timer);\n const message = err instanceof Error ? err.message : String(err);\n return { ok: false, error: message };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,eAAe,OAAuB;CAC7C,OAAO,MACJ,QAAQ,MAAM,KAAK,EACnB,QAAQ,OAAO,KAAK,EACpB,QAAQ,OAAO,KAAK,EACpB,QAAQ,MAAM,KAAK,EACnB,QAAQ,MAAM,KAAK;AACxB;AAEA,SAAS,WAAW,OAAuB;CACzC,OAAO,MAAM,QAAQ,MAAM,KAAK,EAAE,QAAQ,OAAO,KAAK,EAAE,QAAQ,OAAO,KAAK;AAC9E;AAEA,SAAgB,iBAAiB,YAAgC;CAQ/D,OAAO,KAPO,WAAW,aAAa,UAAU,UAAU,UAOxC,GANJ;EACZ,QAAQ,eAAe,WAAW,IAAI;EACtC,QAAQ,WAAW;EACnB,OAAO,WAAW;EAClB,SAAS,eAAe,WAAW,MAAM;CAC3C,EAAE,KAAK,GACkB,EAAE,IAAI,WAAW,WAAW,OAAO;AAC9D;AAEA,SAAgB,kBAAkB,aAAmC;CACnE,OAAO,YAAY,IAAI,gBAAgB,EAAE,KAAK,IAAI;AACpD;;;ACjBA,eAAsB,gBACpB,KAC6B;CAC7B,IAAI;EACF,MAAM,SAAS,MAAM,SAAS,KAAK,KAAK,cAAc,GAAG,MAAM;EAC/D,OAAO,KAAK,MAAM,MAAM;CAC1B,QAAQ;EACN,OAAO;C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;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EAAE,KAAK,IAAI;AACb;;;;;;;;;;;;;;;;;;;;;;;AC3KA,SAAgB,oBACd,QACA,gBACA,SAAoC,SACpC,cACa;CACb,MAAM,WAAyB,CAAC;CAChC,KAAK,MAAM,KAAK,OAAO,aACrB,IAAI,eAAe,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,CAAC;CAGnD,MAAM,YAAY,OAAO,YAAY;CACrC,MAAM,cAAc,iBAAiB,UAAU,EAAE,UAAU,CAAC;CAE5D,MAAM,aAAqC,CAAC;CAC5C,KAAK,MAAM,KAAK,UACd,WAAW,EAAE,WAAW,WAAW,EAAE,WAAW,KAAK;CAGvD,IAAI,WAAsB,OAAO;CACjC,IAAI,aAAa,GACf,IAAI,WAAW,QACb,WAAW;MAMX,YAHE,WAAW,SACP,YAAY,aAAa,YAAY,YACrC,YAAY,cACI,IAAI,IAAI;CAUlC,OAAO;EACL,GAAG;EACH,aAAa;EACb,OAAO,YAAY;EACnB,YAAY,YAAY;EACxB,WAAW,YAAY;EACvB,WAAW,YAAY;EACvB;EACA;EACA;CACF;AACF;;;ACnBA,MAAM,kBAAkB;AAExB,MAAM,mBAAgD,IAAI,IACxD,cAAc,KAAK,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAC7C;AAEA,SAAS,eAAe,QAAwB;CAC9C,OAAO,iBAAiB,IAAI,MAAM,KAAK;AACzC;AAEA,SAAS,eAAe,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