gitcleancommit
Version:
A beautiful CLI tool for creating clean, conventional git commits with advanced spell checking and automatic integration
30 lines (29 loc) • 1.04 kB
TypeScript
export interface SpellCheckResult {
word: string;
suggestions: string[];
isCorrect: boolean;
position: {
start: number;
end: number;
};
}
export declare class GitCleanSpellChecker {
private static dictionary;
private static isInitialized;
private static readonly TECHNICAL_WORDS;
private static readonly COMMON_TYPOS;
static initialize(): Promise<void>;
static checkSpelling(message: string): Promise<SpellCheckResult[]>;
private static extractWords;
static createSquigglyUnderline(text: string, errors: SpellCheckResult[]): string;
static getAutoCorrection(word: string): string | null;
static autoCorrectText(text: string): Promise<string>;
static getSpellCheckStats(): {
isInitialized: boolean;
hasDictionary: boolean;
technicalWordsCount: number;
typoRulesCount: number;
};
}
export declare function checkSpelling(message: string): Promise<string[]>;
export declare function getSuggestion(word: string): string | null;