fix: preserve setup diagnostics and clean Knip config

This commit is contained in:
N0zoM1z0
2026-07-14 19:27:31 +08:00
parent 5231e95c19
commit 5a7ccefc68
5 changed files with 58 additions and 17 deletions
+6 -3
View File
@@ -108,9 +108,12 @@ const parseStringArray = (
return parsed.success
? ok(parsed.data)
: err(
new ConfigurationError(`${name} must encode an array of strings`, {
cause: parsed.error,
}),
new ConfigurationError(
parsed.error.issues.some(({ code }) => code === "too_big")
? `${name} must encode at most 128 strings`
: `${name} must encode an array of strings`,
{ cause: parsed.error },
),
);
} catch (cause: unknown) {
return err(new ConfigurationError(`${name} must be valid JSON`, { cause }));