From ebb82a6ef2771e48ac0f9f42c7b95bc4de41566d Mon Sep 17 00:00:00 2001 From: ho991217 Date: Sun, 3 May 2026 15:08:37 +0900 Subject: [PATCH 1/2] fix: fix duplicate configuration warning logic by consolidating redundant checks --- src/features/pkg/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/pkg/index.ts b/src/features/pkg/index.ts index 1981114da..549c8fbda 100644 --- a/src/features/pkg/index.ts +++ b/src/features/pkg/index.ts @@ -95,8 +95,9 @@ export async function bundleDone( const publintConfigs = dedupeConfigs(configs, 'publint') const attwConfigs = dedupeConfigs(configs, 'attw') - if (publintConfigs.length > 1 || attwConfigs.length > 1) { - publintConfigs[1].logger.warn( + const dup = publintConfigs[1] ?? attwConfigs[1] + if (dup) { + dup.logger.warn( `Multiple publint or attw configurations found for package at ${pkg.packageJsonPath}. Consider merging them for better consistency and performance.`, ) } From 8871403a150585699735576b6a1d9477a0dfc290 Mon Sep 17 00:00:00 2001 From: Kevin Deng Date: Sun, 3 May 2026 16:08:15 +0900 Subject: [PATCH 2/2] refactor --- src/features/pkg/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/pkg/index.ts b/src/features/pkg/index.ts index 549c8fbda..345677e00 100644 --- a/src/features/pkg/index.ts +++ b/src/features/pkg/index.ts @@ -95,9 +95,9 @@ export async function bundleDone( const publintConfigs = dedupeConfigs(configs, 'publint') const attwConfigs = dedupeConfigs(configs, 'attw') - const dup = publintConfigs[1] ?? attwConfigs[1] - if (dup) { - dup.logger.warn( + const duplicate = publintConfigs[1] || attwConfigs[1] + if (duplicate) { + duplicate.logger.warn( `Multiple publint or attw configurations found for package at ${pkg.packageJsonPath}. Consider merging them for better consistency and performance.`, ) }