cspell
Version:
A Spelling Checker for Code!
30 lines • 2.13 kB
TypeScript
import { type CSpellReporter, type CSpellSettings, type FeaturesSupportedByReporter, type FileSettings, type Issue, type ReporterConfiguration, type ReportIssueOptions, type RunResult } from '@cspell/cspell-types';
import { LintFileResult } from './LintFileResult.js';
export type FinalizedReporter = Required<CSpellReporter>;
/**
* Loads reporter modules configured in cspell config file
*/
export declare function loadReporters(reporters: FileSettings['reporters'], defaultReporter: CSpellReporter, config: ReporterConfiguration): Promise<ReadonlyArray<CSpellReporter>>;
export declare function finalizeReporter(reporter: undefined): undefined;
export declare function finalizeReporter(reporter: CSpellReporter): FinalizedReporter;
export declare function finalizeReporter(reporter: CSpellReporter | undefined): FinalizedReporter | undefined;
export declare function extractReporterIssueOptions(settings: CSpellSettings | ReportIssueOptions): ReportIssueOptions;
export declare function mergeReportIssueOptions(a: ReportIssueOptions | CSpellSettings, b: ReportIssueOptions | undefined): ReportIssueOptions;
export declare class LintReporter {
#private;
readonly defaultReporter: CSpellReporter;
constructor(defaultReporter: CSpellReporter, config: ReporterConfiguration);
get config(): ReporterConfiguration;
set config(config: ReporterConfiguration);
issue(issue: Issue, reportOptions?: ReportIssueOptions): void;
info(...params: Parameters<FinalizedReporter['info']>): void;
debug(...params: Parameters<FinalizedReporter['debug']>): void;
error(...params: Parameters<FinalizedReporter['error']>): void;
progress(...params: Parameters<FinalizedReporter['progress']>): void;
result(result: RunResult): Promise<void>;
get features(): FeaturesSupportedByReporter;
loadReportersAndFinalize(reporters: FileSettings['reporters']): Promise<void>;
emitProgressBegin(filename: string, fileNum: number, fileCount: number): void;
emitProgressComplete(filename: string, fileNum: number, fileCount: number, result: LintFileResult): number;
}
//# sourceMappingURL=reporters.d.ts.map