UNPKG

smart-renamer

Version:

🚀 Intelligent file and code naming suggestions based on project-specific naming conventions. Interactive CLI tool with AST-based code analysis for variables, functions, components, and more.

42 lines • 1.48 kB
import { CodeIdentifier } from './ast-analyzer'; import { NamingConvention } from '../types'; export interface CodeConventionConfig { variables: NamingConvention; functions: NamingConvention; components: NamingConvention; constants: NamingConvention; classes: NamingConvention; interfaces: NamingConvention; types: NamingConvention; enums: NamingConvention; } export interface CodeValidationResult { identifier: CodeIdentifier; isValid: boolean; expectedConvention: NamingConvention; suggestedName?: string; violation: string; } export interface CodeValidationSummary { totalChecked: number; totalViolations: number; violationsByType: { [key: string]: number; }; violations: CodeValidationResult[]; } export declare class CodeValidator { private convertToCamelCase; private convertToPascalCase; private convertToSnakeCase; private convertToKebabCase; private convertToConstantCase; private convertToConvention; private validateConvention; private getExpectedConvention; validateIdentifier(identifier: CodeIdentifier, config: CodeConventionConfig): CodeValidationResult; validateIdentifiers(identifiers: CodeIdentifier[], config: CodeConventionConfig): CodeValidationSummary; suggestFixes(identifier: CodeIdentifier, config: CodeConventionConfig): string[]; getDefaultCodeConfig(): CodeConventionConfig; } //# sourceMappingURL=code-validator.d.ts.map