/** * QA360 Code Formatter * * Formats and validates generated test code. * Supports TypeScript, JavaScript, Go, and Python. */ /** * Formatter configuration */ export interface FormatterConfig { /** * Indentation style */ indentStyle?: 'spaces' | 'tabs'; /** * Indentation size */ indentSize?: number; /** * Line width */ lineWidth?: number; /** * Semicolons (for JS/TS) */ semicolons?: boolean; /** * Quotes style */ quotes?: 'single' | 'double'; /** * Trailing commas */ trailingCommas?: boolean; /** * Sort imports */ sortImports?: boolean; } /** * Formatting result */ export interface FormatResult { formatted: string; errors: string[]; warnings: string[]; } /** * Code Formatter class */ export declare class CodeFormatter { private readonly config; private readonly defaultConfig; constructor(config?: FormatterConfig); /** * Format code based on language */ format(code: string, language: string): string; /** * Format TypeScript code */ formatTypeScript(code: string): string; /** * Format JavaScript code */ formatJavaScript(code: string): string; /** * Format Go code */ formatGo(code: string): string; /** * Format Python code */ formatPython(code: string): string; /** * Generic formatting */ formatGeneric(code: string): string; /** * Validate code syntax */ validate(code: string, language: string): FormatResult; /** * Sort imports */ private sortImports; /** * Sort import lines */ private sortImportLines; /** * Normalize quotes */ private normalizeQuotes; /** * Normalize braces spacing */ private normalizeBraces; /** * Fix common formatting issues */ private fixCommonIssues; /** * Normalize Python indentation */ private normalizePythonIndentation; } /** * Create a formatter with default config */ export declare function createFormatter(config?: FormatterConfig): CodeFormatter;