Switch from eslint to oxlint

Co-authored-by: Jamie <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-03-30 14:27:16 -05:00
committed by GitHub
parent 707921b9be
commit 806a66e006
606 changed files with 6026 additions and 3790 deletions

View File

@@ -11,21 +11,25 @@ const permissiveStringOrNull = z
.string()
.optional()
.transform(convertUndefinedToNull)
// oxlint-disable-next-line promise/prefer-await-to-then
.catch(null);
const permissiveNumberOrNull = z
.number()
.optional()
.transform(convertUndefinedToNull)
// oxlint-disable-next-line promise/prefer-await-to-then
.catch(null);
const permissiveAttachmentVersion = z
.union([z.literal(1), z.literal(2)])
.optional()
.transform(convertUndefinedToNull)
// oxlint-disable-next-line promise/prefer-await-to-then
.catch(null);
const permissiveOptionalBool = z
.union([z.literal(0), z.literal(1)])
.optional()
.transform(convertUndefinedToNull)
// oxlint-disable-next-line promise/prefer-await-to-then
.catch(null);
// A schema which converts invalid values to null, to handle bad data when
@@ -38,9 +42,13 @@ export const permissiveMessageAttachmentSchema = z.object({
attachmentType: messageAttachmentTypeSchema,
orderInMessage: z.number(),
conversationId: z.string(),
// oxlint-disable-next-line promise/prefer-await-to-then
sentAt: z.number().catch(0),
// oxlint-disable-next-line promise/prefer-await-to-then
receivedAt: z.number().catch(0),
// oxlint-disable-next-line promise/prefer-await-to-then
size: z.number().catch(0),
// oxlint-disable-next-line promise/prefer-await-to-then
contentType: z.string().catch(APPLICATION_OCTET_STREAM),
// Fields allowing NULL