feat: enable type-aware no-base-to-string rule, fix 56 violations (#22750)

This commit is contained in:
Kit Langton
2026-04-15 23:50:47 -04:00
committed by GitHub
parent c802695ee9
commit 8aa0f9fe95
26 changed files with 87 additions and 55 deletions

View File

@@ -15,7 +15,9 @@ const clean = (input?: Fields): Fields =>
Object.fromEntries(Object.entries(input ?? {}).filter((entry) => entry[1] !== undefined && entry[1] !== null))
const text = (input: unknown): string => {
// oxlint-disable-next-line no-base-to-string
if (Array.isArray(input)) return input.map((item) => String(item)).join(" ")
// oxlint-disable-next-line no-base-to-string
return input === undefined ? "" : String(input)
}