Skip to content

The Open Source DocuSign Alternative.

chore: lint with oxc

Ephraim Atta-Duncan49cddfab38ac
diff --git a/apps/marketing/src/app/(marketing)/open/page.tsx b/apps/marketing/src/app/(marketing)/open/page.tsx
index a1fea41e4..76de85fcf 100644
--- a/apps/marketing/src/app/(marketing)/open/page.tsx
+++ b/apps/marketing/src/app/(marketing)/open/page.tsx
@@ -147,7 +147,12 @@ export default async function OpenPage() {
<p className="text-muted-foreground mt-4 max-w-[60ch] text-center text-lg leading-normal">
All our metrics, finances, and learnings are public. We believe in transparency and want
to share our journey with you. You can read more about why here:{' '}
- <a className="font-bold" href="https://documenso.com/blog/pre-seed" target="_blank">
+ <a
+ className="font-bold"
+ href="https://documenso.com/blog/pre-seed"
+ target="_blank"
+ rel="noreferrer"
+ >
Announcing Open Metrics
</a>
</p>
diff --git a/apps/marketing/src/app/(marketing)/pricing/page.tsx b/apps/marketing/src/app/(marketing)/pricing/page.tsx
index e4c7b776a..5756f9e68 100644
--- a/apps/marketing/src/app/(marketing)/pricing/page.tsx
+++ b/apps/marketing/src/app/(marketing)/pricing/page.tsx
@@ -53,7 +53,7 @@ export default function PricingPage() {
<div className="mt-4 flex justify-center">
<Button variant="outline" size="lg" className="rounded-full hover:cursor-pointer" asChild>
- <Link href="https://github.com/documenso/documenso" target="_blank">
+ <Link href="https://github.com/documenso/documenso" target="_blank" rel="noreferrer">
Get Started
</Link>
</Button>
@@ -166,6 +166,7 @@ export default function PricingPage() {
<Link
className="text-documenso-700 font-bold"
target="_blank"
+ rel="noreferrer"
href="mailto:[email protected]"
>
@@ -175,6 +176,7 @@ export default function PricingPage() {
className="text-documenso-700 font-bold"
href="https://documen.so/discord"
target="_blank"
+ rel="noreferrer"
>
in our Discord-Support-Channel
</a>{' '}
diff --git a/apps/marketing/src/components/(marketing)/pricing-table.tsx b/apps/marketing/src/components/(marketing)/pricing-table.tsx
index b65411064..80510b8e5 100644
--- a/apps/marketing/src/components/(marketing)/pricing-table.tsx
+++ b/apps/marketing/src/components/(marketing)/pricing-table.tsx
@@ -123,7 +123,7 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
<div className="mt-8 flex w-full flex-col divide-y">
<p className="text-foreground py-4 font-medium">
{' '}
- <a href="https://documenso.com/blog/early-adopters" target="_blank">
+ <a href="https://documenso.com/blog/early-adopters" target="_blank" rel="noreferrer">
The Early Adopter Deal:
</a>
</p>
@@ -133,7 +133,11 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
<p className="text-foreground py-4">
<strong>
{' '}
- <a href="https://documenso.com/blog/early-adopters" target="_blank">
+ <a
+ href="https://documenso.com/blog/early-adopters"
+ target="_blank"
+ rel="noreferrer"
+ >
Includes all upcoming features
</a>
</strong>
diff --git a/apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx b/apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx
index e8e3d6130..4bcb25a6c 100644
--- a/apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx
+++ b/apps/web/src/app/(dashboard)/documents/_action-items/resend-document.tsx
@@ -108,88 +108,86 @@ export const ResendDocumentActionItem = ({
};
return (
- <>
- <Dialog open={isOpen} onOpenChange={setIsOpen}>
- <DialogTrigger asChild>
- <DropdownMenuItem disabled={isDisabled} onSelect={(e) => e.preventDefault()}>
- <History className="mr-2 h-4 w-4" />
- Resend
- </DropdownMenuItem>
- </DialogTrigger>
-
- <DialogContent className="sm:max-w-sm" hideClose>
- <DialogHeader>
- <DialogTitle>
- <h1 className="text-center text-xl">Who do you want to remind?</h1>
- </DialogTitle>
- </DialogHeader>
-
- <Form {...form}>
- <form id={FORM_ID} onSubmit={handleSubmit(onFormSubmit)} className="px-3">
- <FormField
- control={form.control}
- name="recipients"
- render={({ field: { value, onChange } }) => (
- <>
- {recipients.map((recipient) => (
- <FormItem
- key={recipient.id}
- className="flex flex-row items-center justify-between gap-x-3"
+ <Dialog open={isOpen} onOpenChange={setIsOpen}>
+ <DialogTrigger asChild>
+ <DropdownMenuItem disabled={isDisabled} onSelect={(e) => e.preventDefault()}>
+ <History className="mr-2 h-4 w-4" />
+ Resend
+ </DropdownMenuItem>
+ </DialogTrigger>
+
+ <DialogContent className="sm:max-w-sm" hideClose>
+ <DialogHeader>
+ <DialogTitle>
+ <h1 className="text-center text-xl">Who do you want to remind?</h1>
+ </DialogTitle>
+ </DialogHeader>
+
+ <Form {...form}>
+ <form id={FORM_ID} onSubmit={handleSubmit(onFormSubmit)} className="px-3">
+ <FormField
+ control={form.control}
+ name="recipients"
+ render={({ field: { value, onChange } }) => (
+ <>
+ {recipients.map((recipient) => (
+ <FormItem
+ key={recipient.id}
+ className="flex flex-row items-center justify-between gap-x-3"
+ >
+ <FormLabel
+ className={cn('my-2 flex items-center gap-2 font-normal', {
+ 'opacity-50': !value.includes(recipient.id),
+ })}
>
- <FormLabel
- className={cn('my-2 flex items-center gap-2 font-normal', {
- 'opacity-50': !value.includes(recipient.id),
- })}
- >
- <StackAvatar
- key={recipient.id}
- type={getRecipientType(recipient)}
- fallbackText={recipientAbbreviation(recipient)}
- />
- {recipient.email}
- </FormLabel>
-
- <FormControl>
- <Checkbox
- className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black "
- checkClassName="text-white"
- value={recipient.id}
- checked={value.includes(recipient.id)}
- onCheckedChange={(checked: boolean) =>
- checked
- ? onChange([...value, recipient.id])
- : onChange(value.filter((v) => v !== recipient.id))
- }
- />
- </FormControl>
- </FormItem>
- ))}
- </>
- )}
- />
- </form>
- </Form>
-
- <DialogFooter>
- <div className="flex w-full flex-1 flex-nowrap gap-4">
- <DialogClose asChild>
- <Button
- type="button"
- className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
- variant="secondary"
- disabled={isSubmitting}
- >
- Cancel
- </Button>
- </DialogClose>
-
- <Button className="flex-1" loading={isSubmitting} type="submit" form={FORM_ID}>
- Send reminder
+ <StackAvatar
+ key={recipient.id}
+ type={getRecipientType(recipient)}
+ fallbackText={recipientAbbreviation(recipient)}
+ />
+ {recipient.email}
+ </FormLabel>
+
+ <FormControl>
+ <Checkbox
+ className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black "
+ checkClassName="text-white"
+ value={recipient.id}
+ checked={value.includes(recipient.id)}
+ onCheckedChange={(checked: boolean) =>
+ checked
+ ? onChange([...value, recipient.id])
+ : onChange(value.filter((v) => v !== recipient.id))
+ }
+ />
+ </FormControl>
+ </FormItem>
+ ))}
+ </>
+ )}
+ />
+ </form>
+ </Form>
+
+ <DialogFooter>
+ <div className="flex w-full flex-1 flex-nowrap gap-4">
+ <DialogClose asChild>
+ <Button
+ type="button"
+ className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
+ variant="secondary"
+ disabled={isSubmitting}
+ >
+ Cancel
</Button>
- </div>
- </DialogFooter>
- </DialogContent>
- </Dialog>
- </>
+ </DialogClose>
+
+ <Button className="flex-1" loading={isSubmitting} type="submit" form={FORM_ID}>
+ Send reminder
+ </Button>
+ </div>
+ </DialogFooter>
+ </DialogContent>
+ </Dialog>
);
};
diff --git a/packages/lib/server-only/2fa/setup-2fa.ts b/packages/lib/server-only/2fa/setup-2fa.ts
index 23f213574..bcaa8d498 100644
--- a/packages/lib/server-only/2fa/setup-2fa.ts
+++ b/packages/lib/server-only/2fa/setup-2fa.ts
@@ -43,7 +43,7 @@ export const setupTwoFactorAuthentication = async ({
const secret = crypto.randomBytes(10);
- const backupCodes = new Array(10)
+ const backupCodes = Array.from({ length: 10 })
.fill(null)
.map(() => crypto.randomBytes(5).toString('hex'))
.map((code) => `${code.slice(0, 5)}-${code.slice(5)}`.toUpperCase());