UNPKG

@samiyev/guardian

Version:

Research-backed code quality guardian for AI-assisted development. Detects hardcodes, secrets, circular deps, framework leaks, entity exposure, and 9 architecture violations. Enforces Clean Architecture/DDD principles. Works with GitHub Copilot, Cursor, W

25 lines 827 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConstantsFileChecker = void 0; /** * Checks if a file is a constants definition file * * Identifies files that should be skipped for hardcode detection * since they are meant to contain constant definitions. */ class ConstantsFileChecker { constantsPatterns = [ /^constants?\.(ts|js)$/i, /constants?\/.*\.(ts|js)$/i, /\/(constants|config|settings|defaults|tokens)\.ts$/i, /\/di\/tokens\.(ts|js)$/i, ]; /** * Checks if a file path represents a constants file */ isConstantsFile(filePath) { return this.constantsPatterns.some((pattern) => pattern.test(filePath)); } } exports.ConstantsFileChecker = ConstantsFileChecker; //# sourceMappingURL=ConstantsFileChecker.js.map