mirror of
https://github.com/samiyev/puaros.git
synced 2025-12-27 23:06:54 +05:00
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:
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user