UNPKG

structure-validation

Version:

A Node.js CLI tool for validating codebase folder and file structure using a clean declarative configuration. Part of the guardz ecosystem for comprehensive TypeScript development.

26 lines 888 B
import { ValidationRule as ValidationRuleType } from '../types/validation.types'; /** * ValidationRule entity representing a folder structure rule */ export declare class ValidationRule implements ValidationRuleType { readonly folder: string; readonly patterns: readonly string[]; constructor(folder: string, patterns: readonly string[]); /** * Check if a file belongs to this rule's folder */ isFileInFolder(fileFolder: string): boolean; /** * Check if a file matches this rule's patterns */ isFileMatchingPatterns(filename: string, folderName?: string): boolean; /** * Check if a filename matches a specific pattern */ private matchesPattern; /** * Convert glob pattern to regex, supporting {variable} placeholder for folder name */ private globToRegex; } //# sourceMappingURL=ValidationRule.d.ts.map