fix: resolve linting issues

- Fix indentation in DependencyGraph.ts getMetrics return type
- Add ESLint disable comment for Guards class (utility class pattern)
- Clean up formatting across analyzer files
This commit is contained in:
imfozilbek
2025-11-24 12:54:24 +05:00
parent 3f2a9f2051
commit 0b7c8796ad
3 changed files with 5 additions and 4 deletions

View File

@@ -94,7 +94,7 @@ export class DependencyGraph extends BaseEntity {
totalDependencies: number
avgDependencies: number
maxDependencies: number
} {
} {
const nodes = Array.from(this.nodes.values())
const totalFiles = nodes.length
const totalDependencies = nodes.reduce((sum, node) => sum + node.dependencies.length, 0)

View File

@@ -2,16 +2,16 @@ import { INamingConventionDetector } from "../../domain/services/INamingConventi
import { NamingViolation } from "../../domain/value-objects/NamingViolation"
import {
LAYERS,
NAMING_VIOLATION_TYPES,
NAMING_PATTERNS,
NAMING_VIOLATION_TYPES,
USE_CASE_VERBS,
} from "../../shared/constants/rules"
import {
EXCLUDED_FILES,
FILE_SUFFIXES,
NAMING_ERROR_MESSAGES,
PATH_PATTERNS,
PATTERN_WORDS,
NAMING_ERROR_MESSAGES,
} from "../constants/detectorPatterns"
/**
@@ -72,7 +72,7 @@ export class NamingConventionDetector implements INamingConventionDetector {
filePath,
NAMING_ERROR_MESSAGES.DOMAIN_FORBIDDEN,
fileName,
`Move to application or infrastructure layer, or rename to follow domain patterns`,
"Move to application or infrastructure layer, or rename to follow domain patterns",
),
)
return violations

View File

@@ -3,6 +3,7 @@ import { TYPE_NAMES } from "../constants"
/**
* Type guard utilities for runtime type checking
*/
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
export class Guards {
public static isNullOrUndefined(value: unknown): value is null | undefined {
return value === null || value === undefined