Skip to content

Commit c178060

Browse files
committed
style: fix prettier formatting in validations.ts
1 parent 341ec70 commit c178060

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

lib/validations.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -322,23 +322,25 @@ export const githubParamsSchema = z.object({
322322
refresh: z.string().optional().transform(toRefreshFlag),
323323
});
324324

325-
export const compareParamsSchema = z.object({
326-
user1: z
327-
.string({ error: 'Missing "user1" parameter' })
328-
.trim()
329-
.min(1, { message: 'user1 is required' })
330-
.max(39, { message: 'GitHub username cannot exceed 39 characters' })
331-
.regex(GITHUB_USERNAME_REGEX, { message: 'Invalid GitHub username for user1' }),
332-
user2: z
333-
.string({ error: 'Missing "user2" parameter' })
334-
.trim()
335-
.min(1, { message: 'user2 is required' })
336-
.max(39, { message: 'GitHub username cannot exceed 39 characters' })
337-
.regex(GITHUB_USERNAME_REGEX, { message: 'Invalid GitHub username for user2' }),
338-
}).refine((data) => data.user1.toLowerCase() !== data.user2.toLowerCase(), {
339-
message: 'Cannot compare a user with themselves',
340-
path: ['user2'],
341-
});
325+
export const compareParamsSchema = z
326+
.object({
327+
user1: z
328+
.string({ error: 'Missing "user1" parameter' })
329+
.trim()
330+
.min(1, { message: 'user1 is required' })
331+
.max(39, { message: 'GitHub username cannot exceed 39 characters' })
332+
.regex(GITHUB_USERNAME_REGEX, { message: 'Invalid GitHub username for user1' }),
333+
user2: z
334+
.string({ error: 'Missing "user2" parameter' })
335+
.trim()
336+
.min(1, { message: 'user2 is required' })
337+
.max(39, { message: 'GitHub username cannot exceed 39 characters' })
338+
.regex(GITHUB_USERNAME_REGEX, { message: 'Invalid GitHub username for user2' }),
339+
})
340+
.refine((data) => data.user1.toLowerCase() !== data.user2.toLowerCase(), {
341+
message: 'Cannot compare a user with themselves',
342+
path: ['user2'],
343+
});
342344

343345
export const ogParamsSchema = z
344346
.object({

0 commit comments

Comments
 (0)