chore: Move to prettier standard double quotes (#1309)

This commit is contained in:
Tom Moor
2020-06-20 13:59:15 -07:00
committed by GitHub
parent 2a3b9e2104
commit f43deb7940
444 changed files with 5988 additions and 5977 deletions

View File

@@ -1,33 +1,33 @@
// @flow
import * as React from 'react';
import debug from 'debug';
import * as Sentry from '@sentry/node';
import nodemailer from 'nodemailer';
import Oy from 'oy-vey';
import { createQueue } from './utils/queue';
import { baseStyles } from './emails/components/EmailLayout';
import { WelcomeEmail, welcomeEmailText } from './emails/WelcomeEmail';
import { ExportEmail, exportEmailText } from './emails/ExportEmail';
import { SigninEmail, signinEmailText } from './emails/SigninEmail';
import * as React from "react";
import debug from "debug";
import * as Sentry from "@sentry/node";
import nodemailer from "nodemailer";
import Oy from "oy-vey";
import { createQueue } from "./utils/queue";
import { baseStyles } from "./emails/components/EmailLayout";
import { WelcomeEmail, welcomeEmailText } from "./emails/WelcomeEmail";
import { ExportEmail, exportEmailText } from "./emails/ExportEmail";
import { SigninEmail, signinEmailText } from "./emails/SigninEmail";
import {
type Props as InviteEmailT,
InviteEmail,
inviteEmailText,
} from './emails/InviteEmail';
} from "./emails/InviteEmail";
import {
type Props as DocumentNotificationEmailT,
DocumentNotificationEmail,
documentNotificationEmailText,
} from './emails/DocumentNotificationEmail';
} from "./emails/DocumentNotificationEmail";
import {
type Props as CollectionNotificationEmailT,
CollectionNotificationEmail,
collectionNotificationEmailText,
} from './emails/CollectionNotificationEmail';
} from "./emails/CollectionNotificationEmail";
const log = debug('emails');
const log = debug("emails");
type Emails = 'welcome' | 'export';
type Emails = "welcome" | "export";
type SendMailType = {
to: string,
@@ -67,7 +67,7 @@ export class Mailer {
if (transporter) {
const html = Oy.renderTemplate(data.html, {
title: data.title,
headCSS: [baseStyles, data.headCSS].join(' '),
headCSS: [baseStyles, data.headCSS].join(" "),
previewText: data.previewText,
});
@@ -94,9 +94,9 @@ export class Mailer {
welcome = async (opts: { to: string, teamUrl: string }) => {
this.sendMail({
to: opts.to,
title: 'Welcome to Outline',
title: "Welcome to Outline",
previewText:
'Outline is a place for your team to build and share knowledge.',
"Outline is a place for your team to build and share knowledge.",
html: <WelcomeEmail {...opts} />,
text: welcomeEmailText(opts),
});
@@ -106,7 +106,7 @@ export class Mailer {
this.sendMail({
to: opts.to,
attachments: opts.attachments,
title: 'Your requested export',
title: "Your requested export",
previewText: "Here's your request data export from Outline",
html: <ExportEmail />,
text: exportEmailText,
@@ -120,7 +120,7 @@ export class Mailer {
opts.teamName
}s knowledgebase`,
previewText:
'Outline is a place for your team to build and share knowledge.',
"Outline is a place for your team to build and share knowledge.",
html: <InviteEmail {...opts} />,
text: inviteEmailText(opts),
});
@@ -129,8 +129,8 @@ export class Mailer {
signin = async (opts: { to: string, token: string, teamUrl: string }) => {
this.sendMail({
to: opts.to,
title: 'Magic signin link',
previewText: 'Heres your link to signin to Outline.',
title: "Magic signin link",
previewText: "Heres your link to signin to Outline.",
html: <SigninEmail {...opts} />,
text: signinEmailText(opts),
});
@@ -165,7 +165,7 @@ export class Mailer {
let smtpConfig = {
host: process.env.SMTP_HOST,
port: process.env.SMTP_PORT,
secure: process.env.NODE_ENV === 'production',
secure: process.env.NODE_ENV === "production",
auth: undefined,
};
@@ -184,7 +184,7 @@ export class Mailer {
const mailer = new Mailer();
export default mailer;
export const mailerQueue = createQueue('email');
export const mailerQueue = createQueue("email");
mailerQueue.process(async (job: EmailJob) => {
// $FlowIssue flow doesn't like dynamic values
@@ -204,7 +204,7 @@ export const sendEmail = (type: Emails, to: string, options?: Object = {}) => {
attempts: 5,
removeOnComplete: true,
backoff: {
type: 'exponential',
type: "exponential",
delay: 60 * 1000,
},
}