feat: enable type-aware no-base-to-string rule, fix 56 violations (#22750)
This commit is contained in:
parent
c802695ee9
commit
8aa0f9fe95
26 changed files with 87 additions and 55 deletions
|
|
@ -19,6 +19,7 @@ const TRANSIENT_MESSAGES = [
|
|||
|
||||
function isTransientError(error: unknown): boolean {
|
||||
if (!error) return false
|
||||
// oxlint-disable-next-line no-base-to-string -- error is unknown, intentional coercion for message matching
|
||||
const message = String(error instanceof Error ? error.message : error).toLowerCase()
|
||||
return TRANSIENT_MESSAGES.some((m) => message.includes(m))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue