From c06880e946246fbf167a062cec4070c1b9e0f668 Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Tue, 3 Mar 2026 12:53:46 +0800 Subject: [PATCH] fix: resolve code quality issues in utility functions - Fix TypeScript type error in deepMerge recursive call with proper type assertions - Remove unused type imports (ErpConfig, DatabaseConfig, PathsConfig, ExtractionConfig, ValidationConfig, UiConfig, ExecutionConfig) - Fix line endings (CRLF to LF) via Prettier format Co-Authored-By: Claude Sonnet 4.5 --- src/main/services/config/config-manager.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/services/config/config-manager.ts b/src/main/services/config/config-manager.ts index 525ee87..98db245 100644 --- a/src/main/services/config/config-manager.ts +++ b/src/main/services/config/config-manager.ts @@ -11,13 +11,6 @@ import { fileURLToPath } from 'url' import { dirname } from 'path' import type { SettingsData, - ErpConfig, - DatabaseConfig, - PathsConfig, - ExtractionConfig, - ValidationConfig, - UiConfig, - ExecutionConfig, DatabaseType, MatchMode, ValidationDataSource @@ -96,7 +89,10 @@ function deepMerge(source: T, target: Partial): T { const sourceValue = result[key] if (isObject(targetValue) && isObject(sourceValue)) { - result[key] = deepMerge(sourceValue, targetValue) + result[key] = deepMerge( + sourceValue as T[Extract], + targetValue as Partial]> + ) } else if (targetValue !== undefined) { result[key] = targetValue as T[Extract] } @@ -113,7 +109,7 @@ function deepMerge(source: T, target: Partial): T { const UI_EDITABLE_FIELDS: string[] = [ 'erp.url', 'erp.username', - 'erp.password', + 'erp.password' // Add more fields as UI expands ]