frontend-standards-checker
Version:
A comprehensive frontend standards validation tool with TypeScript support
59 lines • 2.02 kB
TypeScript
import type { ILogger } from '../types/index.js';
/**
* Helper functions for ConfigLoader
*/
export declare class ConfigLoaderHelper {
private readonly logger;
constructor(logger: ILogger);
/**
* Try to load config file using both ESM and CommonJS methods
*/
tryLoadConfig(configPath: string): Promise<any>;
/**
* Check if file is a config file
*/
isConfigFile(filePath: string): boolean;
/**
* Check for console.log statements and return their line numbers
*/
checkConsoleLogLines(content: string, filePath: string): number[];
/**
* Returns an array of line numbers (1-based) where console.log is used
*/
private getConsoleLogLineNumbers;
private shouldSkipConsoleCheck;
private updateCommentState;
private isInComment;
private hasConsoleStatement;
/**
* Check for direct imports from sibling files
*/
checkDirectImports(content: string, filePath: string): boolean;
private isIndexFile;
private checkIndexImport;
private findIndexFileContent;
private extractImportedSymbols;
private checkSymbolsAgainstExports;
private shouldSkipFile;
private getFileBaseName;
private isSymbolExported;
private getExportPatterns;
private checkSymbolExport;
/**
* Helper function for building dependency graph
*/
buildDependencyGraph(filePath: string, extensions: string[], dependencyGraph: Record<string, Set<string>>): void;
}
/**
* Lee el contenido de un archivo si existe.
*/
export declare function readFileContent(filePath: string): string | null;
/**
* Extrae los paths de importación relativos del contenido de un archivo.
*/
export declare function extractImportPaths(content: string): string[];
/**
* Resuelve una ruta de import relativa a partir del directorio base y extensiones.
*/
export declare function resolveImportPath(baseDir: string, importPath: string, extensions: string[]): string | null;
//# sourceMappingURL=configLoader.helper.d.ts.map