UNPKG

@felixgeelhaar/cclint

Version:

Catch CLAUDE.md drift before Claude misbehaves. Lints CLAUDE.md, skills, subagents, and hooks for Claude Code projects.

74 lines 2.04 kB
import type { Violation } from '../domain/Violation.js'; import type { CustomRule } from '../domain/CustomRule.js'; /** * User action choices for interactive fixing */ export type FixAction = 'yes' | 'no' | 'all' | 'quit'; /** * Result of an interactive fix session */ export interface InteractiveFixResult { /** Whether any fixes were applied */ fixed: boolean; /** Updated content after fixes */ content: string; /** Number of fixes applied */ appliedCount: number; /** Number of fixes skipped */ skippedCount: number; /** Whether the session was quit early */ quitEarly: boolean; } /** * Options for interactive fixing */ export interface InteractiveFixOptions { /** Custom prompt function (for testing) */ promptFn?: (question: string) => Promise<string>; /** Custom output function (for testing) */ outputFn?: (message: string) => void; /** Number of context lines to show in diff */ contextLines?: number; } /** * Interactive fixer that prompts user for each fix. */ export declare class InteractiveFixer { private promptFn; private outputFn; private contextLines; constructor(options?: InteractiveFixOptions); /** * Run interactive fix session for violations */ fix(content: string, violations: Violation[], customRules?: CustomRule[]): Promise<InteractiveFixResult>; /** * Show a preview of the fix with diff */ private showFixPreview; /** * Prompt user for action */ private promptForAction; /** * Show summary of the fix session */ private showSummary; /** * Pad line number for consistent display */ private padLineNumber; /** * Visualize whitespace characters for clarity */ private visualizeWhitespace; /** * Adjust fix position for content changes */ private adjustFixForContent; /** * Create default readline prompt */ private createDefaultPrompt; } //# sourceMappingURL=InteractiveFixer.d.ts.map