UNPKG

@felixgeelhaar/cclint

Version:

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

73 lines 2.1 kB
/** * Represents a changed line range in a file */ export interface ChangedRange { startLine: number; endLine: number; } /** * Information about a file's git diff status */ export interface FileDiffInfo { /** File path relative to repository root */ filePath: string; /** Whether the file is new (untracked or newly added) */ isNew: boolean; /** Whether the file was deleted */ isDeleted: boolean; /** Changed line ranges (for modified files) */ changedRanges: ChangedRange[]; } /** * Options for diff detection */ export interface DiffOptions { /** Compare against a specific git ref (branch, commit, tag) */ ref?: string; /** Include staged files only */ staged?: boolean; /** Root directory to search from */ rootDir?: string; } /** * Provides git diff information for linting only changed files/lines. */ export declare class GitDiffProvider { private rootDir; constructor(rootDir?: string); /** * Check if the directory is a git repository */ isGitRepository(): boolean; /** * Get list of changed CLAUDE.md files */ getChangedClaudeMdFiles(options?: DiffOptions): string[]; /** * Get detailed diff information for a file */ getFileDiffInfo(filePath: string, options?: DiffOptions): FileDiffInfo; /** * Check if a line number is within changed ranges */ isLineChanged(line: number, diffInfo: FileDiffInfo): boolean; /** * Get current branch name */ getCurrentBranch(): string | null; /** * Get the merge base with a target branch */ getMergeBase(targetBranch?: string): string | null; /** * Get untracked CLAUDE.md files */ getUntrackedClaudeMdFiles(): string[]; /** * Execute git with an explicit argument array (never a shell string), so a * ref, branch, or file path can never be interpreted by a shell. This is the * security boundary: --diff-ref and staged file paths flow in as data. */ private execGit; } //# sourceMappingURL=GitDiffProvider.d.ts.map