feat: enable type-aware no-base-to-string rule, fix 56 violations (#22750)
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
@@ -317,6 +317,7 @@ describe("util.effect-flock", () => {
|
||||
})
|
||||
|
||||
const result = yield* flock.withLock(Effect.void, "eflock:perm", dir).pipe(Effect.exit)
|
||||
// oxlint-disable-next-line no-base-to-string -- Exit has a useful toString for test assertions
|
||||
expect(String(result)).toContain("PermissionDenied")
|
||||
yield* Effect.promise(() => fs.chmod(dir, 0o700).then(() => fs.rm(tmp, { recursive: true, force: true })))
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user