Skip to content

Commit

Permalink
refactor: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Jul 5, 2022
1 parent 9f0f3b2 commit 5be7727
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions packages/next-auth/src/providers/email.ts
@@ -1,9 +1,9 @@
import { createTransport } from "nodemailer"

import { type CommonProviderOptions } from "."
import { type Options as SMTPConnectionOptions } from "nodemailer/lib/smtp-connection"
import { type Awaitable } from ".."
import { type Theme } from "../core/types"
import type { CommonProviderOptions } from "."
import type { Options as SMTPConnectionOptions } from "nodemailer/lib/smtp-connection"
import type { Awaitable } from ".."
import type { Theme } from "../core/types"

export interface SendVerificationRequestParams {
identifier: string
Expand All @@ -27,7 +27,9 @@ export interface EmailConfig extends CommonProviderOptions {
*/
maxAge?: number
/** [Documentation](https://next-auth.js.org/providers/email#customizing-emails) */
sendVerificationRequest: (params: SendVerificationRequestParams) => Awaitable<void>
sendVerificationRequest: (
params: SendVerificationRequestParams
) => Awaitable<void>
/**
* By default, we are generating a random verification token.
* You can make it predictable or modify it as you like with this method.
Expand Down Expand Up @@ -97,14 +99,18 @@ function html(params: { url: string; host: string; theme: Theme }) {

const escapedHost = host.replace(/\./g, "&#8203;.")

// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const brandColor = theme.brandColor || "#346df1"
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const buttonText = theme.buttonText || "#fff"

const color = {
background: "#f9f9f9",
text: "#444",
mainBackground: "#fff",
buttonBackground: brandColor,
buttonBorder: brandColor,
buttonText: theme.buttonText || "#fff",
buttonText,
}

return `
Expand Down

0 comments on commit 5be7727

Please sign in to comment.