@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
30 lines • 1.07 kB
TypeScript
import Parser from "tree-sitter";
import { NamingViolation } from "../../../domain/value-objects/NamingViolation";
/**
* AST-based analyzer for detecting variable naming violations
*
* Analyzes variable declarations to ensure proper naming conventions:
* - Regular variables: camelCase
* - Constants (exported UPPER_CASE): UPPER_SNAKE_CASE
* - Class properties: camelCase
* - Private properties with underscore prefix are allowed
*/
export declare class AstVariableNameAnalyzer {
/**
* Analyzes a variable declaration node
*/
analyze(node: Parser.SyntaxNode, layer: string, filePath: string, _lines: string[]): NamingViolation | null;
/**
* Checks if node is a destructuring pattern (object or array)
*/
private isDestructuringPattern;
/**
* Checks if a variable is a constant (exported UPPER_CASE)
*/
private isConstantVariable;
/**
* Checks if field has readonly or static modifiers (indicating a constant)
*/
private hasConstModifiers;
}
//# sourceMappingURL=AstVariableNameAnalyzer.d.ts.map