website refactor
This commit is contained in:
@@ -115,7 +115,7 @@ export class ArchitectureGuardrails {
|
||||
this.checkLocalHelpers(filePath, content);
|
||||
this.checkObjectConstruction(filePath, content);
|
||||
this.checkContainerManagerCalls(filePath, content);
|
||||
this.checkNoTemplatesInApp(filePath, content);
|
||||
this.checkNoTemplatesInApp(filePath);
|
||||
}
|
||||
|
||||
// Rule 5: Forbid client-side write fetch
|
||||
@@ -138,7 +138,7 @@ export class ArchitectureGuardrails {
|
||||
this.checkGeneratedDTOImport(filePath, content);
|
||||
|
||||
// Rule 11: Filename rules for app directory
|
||||
this.checkAppFilenameRules(filePath, content);
|
||||
this.checkAppFilenameRules(filePath);
|
||||
}
|
||||
|
||||
private scanPageQueryDirectory(filePath: string, content: string): void {
|
||||
@@ -174,7 +174,7 @@ export class ArchitectureGuardrails {
|
||||
this.checkGeneratedDTOImport(filePath, content);
|
||||
|
||||
// Rule 11: Filename rules for page queries
|
||||
this.checkPageQueryFilenameRules(filePath, content);
|
||||
this.checkPageQueryFilenameRules(filePath);
|
||||
}
|
||||
|
||||
private scanTemplateDirectory(filePath: string, content: string): void {
|
||||
@@ -198,7 +198,7 @@ export class ArchitectureGuardrails {
|
||||
this.checkGeneratedDTOImport(filePath, content);
|
||||
|
||||
// Rule 11: Filename rules for templates
|
||||
this.checkTemplateFilenameRules(filePath, content);
|
||||
this.checkTemplateFilenameRules(filePath);
|
||||
}
|
||||
|
||||
private scanServiceDirectory(filePath: string, content: string): void {
|
||||
@@ -554,7 +554,7 @@ export class ArchitectureGuardrails {
|
||||
});
|
||||
}
|
||||
|
||||
private checkNoTemplatesInApp(filePath: string, content: string): void {
|
||||
private checkNoTemplatesInApp(filePath: string): void {
|
||||
if (filePath.includes('/app/') && filePath.includes('Template.tsx')) {
|
||||
this.addViolation(
|
||||
'no-templates-in-app',
|
||||
@@ -695,7 +695,7 @@ export class ArchitectureGuardrails {
|
||||
});
|
||||
}
|
||||
|
||||
private checkTemplateFilenameRules(filePath: string, content: string): void {
|
||||
private checkTemplateFilenameRules(filePath: string): void {
|
||||
if (filePath.includes('/templates/') && !filePath.endsWith('Template.tsx')) {
|
||||
this.addViolation(
|
||||
'invalid-template-filename',
|
||||
@@ -778,7 +778,7 @@ export class ArchitectureGuardrails {
|
||||
});
|
||||
}
|
||||
|
||||
private checkPageQueryFilenameRules(filePath: string, content: string): void {
|
||||
private checkPageQueryFilenameRules(filePath: string): void {
|
||||
if (filePath.includes('/page-queries/') && !filePath.endsWith('PageQuery.ts')) {
|
||||
this.addViolation(
|
||||
'invalid-page-query-filename',
|
||||
@@ -1023,7 +1023,7 @@ export class ArchitectureGuardrails {
|
||||
// VIOLATION CHECKS - FILENAME RULES
|
||||
// ============================================================================
|
||||
|
||||
private checkAppFilenameRules(filePath: string, content: string): void {
|
||||
private checkAppFilenameRules(filePath: string): void {
|
||||
if (!filePath.includes('/app/')) return;
|
||||
|
||||
// Allowed extensions under app/
|
||||
|
||||
Reference in New Issue
Block a user