From bbab7fa6724b49a5729e9b92ed16172859129df7 Mon Sep 17 00:00:00 2001 From: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:15:50 +0530 Subject: [PATCH] fix: linting warnings in email package (#2998) --- .../components/auth/forgot-password-email.tsx | 2 +- .../auth/password-reset-notify-email.tsx | 2 +- .../components/auth/verification-email.tsx | 5 +- .../email/components/general/email-button.tsx | 2 +- .../email/components/general/email-footer.tsx | 2 +- .../components/general/email-template.tsx | 134 +++++++++--------- .../invite/invite-accepted-email.tsx | 5 +- .../email/components/invite/invite-email.tsx | 2 +- .../invite/onboarding-invite-email.tsx | 2 +- .../survey/embed-survey-preview-email.tsx | 5 +- .../components/survey/link-survey-email.tsx | 2 +- .../survey/preview-email-template.tsx | 30 ++-- .../survey/response-finished-email.tsx | 11 +- .../create-reminder-notification-body.tsx | 4 +- .../live-survey-notification.tsx | 15 +- .../no-live-survey-notification-email.tsx | 2 +- .../weekly-summary/notification-footer.tsx | 2 +- .../weekly-summary/notification-header.tsx | 4 +- .../weekly-summary/notification-insight.tsx | 2 +- .../weekly-summary-notification-email.tsx | 2 +- packages/email/index.tsx | 32 +++-- .../email/{utils/index.ts => lib/utils.ts} | 2 +- 22 files changed, 150 insertions(+), 119 deletions(-) rename packages/email/{utils/index.ts => lib/utils.ts} (97%) diff --git a/packages/email/components/auth/forgot-password-email.tsx b/packages/email/components/auth/forgot-password-email.tsx index 05a6d03264..77420a52d0 100644 --- a/packages/email/components/auth/forgot-password-email.tsx +++ b/packages/email/components/auth/forgot-password-email.tsx @@ -7,7 +7,7 @@ interface ForgotPasswordEmailProps { verifyLink: string; } -export function ForgotPasswordEmail({ verifyLink }: ForgotPasswordEmailProps) { +export function ForgotPasswordEmail({ verifyLink }: ForgotPasswordEmailProps): React.JSX.Element { return ( Change password diff --git a/packages/email/components/auth/password-reset-notify-email.tsx b/packages/email/components/auth/password-reset-notify-email.tsx index b4c7abf081..b0dae41df9 100644 --- a/packages/email/components/auth/password-reset-notify-email.tsx +++ b/packages/email/components/auth/password-reset-notify-email.tsx @@ -2,7 +2,7 @@ import { Container, Heading, Text } from "@react-email/components"; import React from "react"; import { EmailFooter } from "../general/email-footer"; -export function PasswordResetNotifyEmail() { +export function PasswordResetNotifyEmail(): React.JSX.Element { return ( Password changed diff --git a/packages/email/components/auth/verification-email.tsx b/packages/email/components/auth/verification-email.tsx index ff08477831..08691407e7 100644 --- a/packages/email/components/auth/verification-email.tsx +++ b/packages/email/components/auth/verification-email.tsx @@ -8,7 +8,10 @@ interface VerificationEmailProps { verificationRequestLink: string; } -export function VerificationEmail({ verifyLink, verificationRequestLink }: VerificationEmailProps) { +export function VerificationEmail({ + verifyLink, + verificationRequestLink, +}: VerificationEmailProps): React.JSX.Element { return ( Almost there! diff --git a/packages/email/components/general/email-button.tsx b/packages/email/components/general/email-button.tsx index f8c7df901c..47879c41af 100644 --- a/packages/email/components/general/email-button.tsx +++ b/packages/email/components/general/email-button.tsx @@ -6,7 +6,7 @@ interface EmailButtonProps { href: string; } -export function EmailButton({ label, href }: EmailButtonProps) { +export function EmailButton({ label, href }: EmailButtonProps): React.JSX.Element { return (