UNPKG

frontend-standards-checker

Version:

A comprehensive frontend standards validation tool with TypeScript support

80 lines 2.72 kB
import type { ILogger, IValidationError, IProjectAnalyzer, IMonorepoZoneConfig, IProjectAnalysisResult, IProjectInfo, IZoneInfo } from '../types/index.js'; /** * Project analyzer for detecting project type, structure, and zones */ export declare class ProjectAnalyzer implements IProjectAnalyzer { readonly rootDir: string; readonly logger: ILogger; constructor(rootDir: string, logger: ILogger); /** * Analyze the project structure and return project information */ analyze(config?: IMonorepoZoneConfig): Promise<IProjectAnalysisResult>; /** * Detect the type of project (app, package, library, etc.) */ detectProjectType(projectPath?: string): IProjectInfo['projectType']; /** * Detect project type from package.json dependencies */ private detectProjectTypeFromPackageJson; /** * Detect project type using heuristics */ private detectProjectTypeFromHeuristics; /** * Detect zone type for a specific path */ detectZoneType(zonePath: string): IProjectInfo['projectType']; /** * Check if the project is a monorepo */ isMonorepo(): boolean; /** * Detect zones in a monorepo */ detectMonorepoZones(zoneConfig?: IMonorepoZoneConfig): Promise<IZoneInfo[]>; /** * Get list of standard zones to process based on configuration */ getStandardZones(zoneConfig: IMonorepoZoneConfig): string[]; /** * Process a zone directory and return its sub-zones */ processZoneDirectory(zoneName: string): IZoneInfo[]; /** * Process custom zones from configuration */ processCustomZones(customZones?: string[]): IZoneInfo[]; /** * Process workspace zones from package.json */ processWorkspaceZones(_zoneConfig: IMonorepoZoneConfig): IZoneInfo[]; /** * Get expected structure for a project type */ getExpectedStructure(projectType: string): string[]; /** * Get expected src structure */ getExpectedSrcStructure(): Record<string, string[]>; /** * Validate zone structure and naming conventions */ validateZoneStructure(files: string[], directories: string[], _zoneName: string): Promise<IValidationError[]>; private validateFiles; private validateSingleFile; private isComponentIndexFile; private validateComponentFunctionName; private validateDirectories; private isComponentDirectory; /** * Safely load additional validators */ private loadAdditionalValidators; /** * Legacy method for compatibility - not used in new implementation */ detectZones(): Promise<string[]>; } //# sourceMappingURL=project-analyzer.d.ts.map