[CORL-678] Transition to eslint (#2634)

* chore: setup eslint

* chore: tslint checks with types & check for import order

* chore: complete eslint transition

* fix: tests

* fix: linting after rebase, faster lint for lint-staged

* chore: remove line

* fix: lint rules

* feat: add a11y linter and fix errors

* fix: tests
This commit is contained in:
Vinh
2019-10-16 05:56:38 +07:00
committed by Wyatt Johnson
parent b0e0ba6633
commit 3bfcc509d2
569 changed files with 2592 additions and 1925 deletions
@@ -256,8 +256,8 @@ export const createJobProcessor = (options: MailProcessorOptions) => {
fromAddress,
data
);
} catch (err) {
throw new InternalError(err, "could not translate the message");
} catch (e) {
throw new InternalError(e, "could not translate the message");
}
// Compute the end time.
@@ -285,8 +285,8 @@ export const createJobProcessor = (options: MailProcessorOptions) => {
// Create the transport based on the smtp uri.
transport = createTransport(opts);
} catch (err) {
throw new InternalError(err, "could not create email transport");
} catch (e) {
throw new InternalError(e, "could not create email transport");
}
// Set the transport back into the cache.
@@ -304,8 +304,8 @@ export const createJobProcessor = (options: MailProcessorOptions) => {
try {
// Send the mail message.
await transport.sendMail(message);
} catch (err) {
throw new InternalError(err, "could not send email");
} catch (e) {
throw new InternalError(e, "could not send email");
}
// Compute the end time.
@@ -16,11 +16,6 @@ import TenantCache from "coral-server/services/tenant/cache";
import { createJobProcessor, JOB_NAME, NotifierData } from "./processor";
export const createNotifierTask = (
queue: Queue.QueueOptions,
options: Options
) => new NotifierQueue(queue, options);
interface Options {
mongo: Db;
mailerQueue: MailerQueue;
@@ -69,3 +64,8 @@ export class NotifierQueue {
return this.task.process();
}
}
export const createNotifierTask = (
queue: Queue.QueueOptions,
options: Options
) => new NotifierQueue(queue, options);