UNPKG

vibe-janitor

Version:

A CLI tool that cleans AI-generated JavaScript/TypeScript projects efficiently and intelligently

56 lines (55 loc) 1.48 kB
/** * Options for dependency auditing */ export interface DependencyAuditorOptions { verbose?: boolean; ignoreDirs?: string[]; ignoreMatches?: string[]; isGatsbyProject?: boolean; isNextProject?: boolean; isNuxtProject?: boolean; isAstroProject?: boolean; isMonorepo?: boolean; detectFrameworks?: boolean; } /** * Results from dependency audit */ export interface DependencyAuditResult { unusedDependencies: string[]; missingDependencies: string[]; possibleNativeReplacements: Array<{ package: string; alternatives: string[]; }>; totalDevDependencies: number; totalDependencies: number; } /** * Analyzes dependencies in the project using depcheck */ export declare class DependencyAuditor { private targetDir; private options; constructor(targetDir: string, options?: DependencyAuditorOptions); /** * Check if a package matches any of the special dependency patterns */ private isSpecialDependency; /** * Helper method to check if a package name matches any pattern in a list */ private matchesPattern; /** * Detect framework type from project structure */ private detectFrameworks; /** * Run dependency audit on the project */ audit(): Promise<DependencyAuditResult>; /** * Generate package.json cleanup instructions */ generateCleanupInstructions(results: DependencyAuditResult): string; }