Skip to content

Commit 6a0d98c

Browse files
ho991217sxzz
andauthored
fix(pkg): fix duplicate configuration warning logic (#935)
Co-authored-by: Kevin Deng <sxzz@sxzz.moe>
1 parent 85e65d8 commit 6a0d98c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/features/pkg/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ export async function bundleDone(
9595
const publintConfigs = dedupeConfigs(configs, 'publint')
9696
const attwConfigs = dedupeConfigs(configs, 'attw')
9797

98-
if (publintConfigs.length > 1 || attwConfigs.length > 1) {
99-
publintConfigs[1].logger.warn(
98+
const duplicate = publintConfigs[1] || attwConfigs[1]
99+
if (duplicate) {
100+
duplicate.logger.warn(
100101
`Multiple publint or attw configurations found for package at ${pkg.packageJsonPath}. Consider merging them for better consistency and performance.`,
101102
)
102103
}

0 commit comments

Comments
 (0)