import { Category, Config, JsonReport, Result, RuleSetting, Severity, defineConfig } from "@svelte-vitals/core"; import { BranchStep, HeadTag, RuleOptionsSpec, SuppressionDirective } from "@svelte-vitals/core/internal"; import { AST } from "svelte/compiler"; //#region src/providers/source/imports.d.ts /** A resolved import binding: which module, and which export ('default' for default imports). */ interface ImportInfo { source: string; imported: string; } /** local identifier -> import binding. */ type ImportMap = Map; //#endregion //#region src/providers/source/parse.d.ts /** A head tag parsed from one file, before layout-chain presence is assigned. */ type ParsedTag = Omit; interface ComponentUse { name: string; attributes: AST.Component['attributes']; hasSpread: boolean; } interface ParsedImage { hasWidth: boolean; hasHeight: boolean; hasLoading: boolean; hasAlt: boolean; lazy: boolean; hasSrcset: boolean; /** 1-based source line, or 0 if unknown. */ line: number; } /** A page-body heading (

) parsed from one file (seo/single-h1). */ interface ParsedHeading { /** Heading level 1–6. */ level: number; /** 1-based source line, or 0 if unknown. */ line: number; } interface A11yNode { kind: 'landmark' | 'id' | 'idref' | 'component'; /** landmark → 'main'|'banner'|'contentinfo'|'complementary'; id/idref → the literal id; component → component name */ key: string; line: number; /** inside {#each} body or {#snippet} definition at any depth (excluded from duplication counting) */ repeatable: boolean; /** branch address from template root (empty = unconditional) */ path: BranchStep[]; /** for kind 'idref': the referencing attribute ('for', 'aria-labelledby', …, 'href') */ attr?: string; /** the landmark ancestor element within this file, if any */ inLandmark?: string; /** for kind 'landmark' from
/