export declare const HTML_EXTENSIONS: Set;
export declare const EXCLUDED_DIRS: Set;
export interface MessageValidation {
ruleId: string;
severity: 1 | 2;
message: string;
line: number;
col: number;
ignored?: boolean;
}
export interface ResultCodeValidationFile {
path: string;
messages: MessageValidation[];
}
export interface ResultCodeValidation {
files: ResultCodeValidationFile[];
countErrors: number;
countWarnings: number;
countIgnored: number;
}
export interface ResultCodeDeprecationOccurrence {
name: string;
line: number;
col: number;
}
export interface ResultCodeDeprecationFile {
path: string;
elements: string[];
attributes: string[];
locations: { elements: ResultCodeDeprecationOccurrence[]; attributes: ResultCodeDeprecationOccurrence[] };
error?: string;
}
export interface ResultCodeDeprecation {
files: ResultCodeDeprecationFile[];
countIssues: number;
}
export interface ResultCode {
validation: ResultCodeValidation;
deprecation: ResultCodeDeprecation;
}
export interface ResultLinksUrl {
url: string;
lines: number[];
status: number | null;
ok: boolean;
skipped?: boolean;
warning?: string;
redirectStatus?: number;
error?: string;
}
export interface ResultLinksFragment {
fragment: string;
lines: number[];
}
export interface ResultLinksFile {
path: string;
links: ResultLinksUrl[];
fragmentsMissing: ResultLinksFragment[];
countBroken: number;
error?: string;
}
export interface ResultLinks {
files: ResultLinksFile[];
countBroken: number;
countChecked: number;
countSkipped: number;
countFragmentsChecked: number;
countFragmentsMissing: number;
countFileErrors: number;
}
export interface ResultMinificationFile {
path: string;
sizeOriginal: number;
sizeMinified: number;
error?: string;
}
export interface ResultMinification {
files: ResultMinificationFile[];
saved: number;
}
export interface HihtmlConfig {
extensions?: string[];
ignore?: string[];
validation?: { preset?: string | string[]; ignore?: string[] };
minification?: { preset?: string; options?: Record };
links?: {
timeout?: number;
concurrency?: number;
warnOnPermanentRedirects?: boolean;
ignore?: string[];
};
}
export declare function collect(
dir: string,
extensions?: Set,
excludedDirs?: Set
): Promise;
export declare function read(
filePaths: string[],
options?: { concurrency?: number; onProgress?: () => void }
): Promise