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 totalDependencies: number
avgDependencies: number avgDependencies: number
maxDependencies: number maxDependencies: number
} { } {
const nodes = Array.from(this.nodes.values()) const nodes = Array.from(this.nodes.values())
const totalFiles = nodes.length const totalFiles = nodes.length
const totalDependencies = nodes.reduce((sum, node) => sum + node.dependencies.length, 0) 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 { NamingViolation } from "../../domain/value-objects/NamingViolation"
import { import {
LAYERS, LAYERS,
NAMING_VIOLATION_TYPES,
NAMING_PATTERNS, NAMING_PATTERNS,
NAMING_VIOLATION_TYPES,
USE_CASE_VERBS, USE_CASE_VERBS,
} from "../../shared/constants/rules" } from "../../shared/constants/rules"
import { import {
EXCLUDED_FILES, EXCLUDED_FILES,
FILE_SUFFIXES, FILE_SUFFIXES,
NAMING_ERROR_MESSAGES,
PATH_PATTERNS, PATH_PATTERNS,
PATTERN_WORDS, PATTERN_WORDS,
NAMING_ERROR_MESSAGES,
} from "../constants/detectorPatterns" } from "../constants/detectorPatterns"
/** /**
@@ -72,7 +72,7 @@ export class NamingConventionDetector implements INamingConventionDetector {
filePath, filePath,
NAMING_ERROR_MESSAGES.DOMAIN_FORBIDDEN, NAMING_ERROR_MESSAGES.DOMAIN_FORBIDDEN,
fileName, 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 return violations

View File

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