UNPKG

1.52 kBTypeScriptView Raw
1import type { Issue } from '@cspell/cspell-types';
2import type { ChalkInstance } from 'chalk';
3import { CSpellReporterConfiguration } from './models.js';
4import type { LinterCliOptions } from './options.js';
5import type { FinalizedReporter } from './util/reporters.js';
6export interface TemplateSubstitutions extends Record<string, string> {
7 $col: string;
8 $contextFull: string;
9 $contextLeft: string;
10 $contextRight: string;
11 $filename: string;
12 $padContext: string;
13 $padRowCol: string;
14 $row: string;
15 $suggestions: string;
16 $text: string;
17 $uri: string;
18 $quickFix: string;
19 $message: string;
20 $messageColored: string;
21}
22export interface ReporterIssue extends Issue {
23 filename: string;
24}
25interface IOChalk {
26 readonly chalk: ChalkInstance;
27}
28export interface ReporterOptions extends Pick<LinterCliOptions, 'debug' | 'issues' | 'issuesSummaryReport' | 'legacy' | 'progress' | 'relative' | 'root' | 'showContext' | 'showPerfSummary' | 'showSuggestions' | 'silent' | 'summary' | 'verbose' | 'wordsOnly'> {
29 fileGlobs: string[];
30}
31export declare function getReporter(options: ReporterOptions, config?: CSpellReporterConfiguration): FinalizedReporter;
32declare function formatIssue(io: IOChalk, templateStr: string, issue: ReporterIssue, maxIssueTextWidth: number): string;
33export declare function checkTemplate(template: string): true | Error;
34export declare const __testing__: {
35 formatIssue: typeof formatIssue;
36};
37export {};
38//# sourceMappingURL=cli-reporter.d.ts.map
\No newline at end of file