From 8654beb43db29533e3f0a83083f5a007be81974b Mon Sep 17 00:00:00 2001 From: imfozilbek Date: Mon, 24 Nov 2025 21:28:05 +0500 Subject: [PATCH] fix: remove unused imports and variables - Remove unused SEVERITY_LEVELS import from AnalyzeProject.ts - Prefix unused fileName variable with underscore in HardcodeDetector.ts - Replace || with ?? for nullish coalescing --- packages/guardian/src/application/use-cases/AnalyzeProject.ts | 1 - .../guardian/src/infrastructure/analyzers/HardcodeDetector.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/guardian/src/application/use-cases/AnalyzeProject.ts b/packages/guardian/src/application/use-cases/AnalyzeProject.ts index a57bebd..c0791aa 100644 --- a/packages/guardian/src/application/use-cases/AnalyzeProject.ts +++ b/packages/guardian/src/application/use-cases/AnalyzeProject.ts @@ -19,7 +19,6 @@ import { REGEX_PATTERNS, REPOSITORY_VIOLATION_TYPES, RULES, - SEVERITY_LEVELS, SEVERITY_ORDER, type SeverityLevel, VIOLATION_SEVERITY_MAP, diff --git a/packages/guardian/src/infrastructure/analyzers/HardcodeDetector.ts b/packages/guardian/src/infrastructure/analyzers/HardcodeDetector.ts index 3b770c6..4eec5c4 100644 --- a/packages/guardian/src/infrastructure/analyzers/HardcodeDetector.ts +++ b/packages/guardian/src/infrastructure/analyzers/HardcodeDetector.ts @@ -46,7 +46,7 @@ export class HardcodeDetector implements IHardcodeDetector { * Check if a file is a constants definition file */ private isConstantsFile(filePath: string): boolean { - const fileName = filePath.split("/").pop() || "" + const _fileName = filePath.split("/").pop() ?? "" const constantsPatterns = [ /^constants?\.(ts|js)$/i, /constants?\/.*\.(ts|js)$/i,