mirror of
https://github.com/wassname/talk.git
synced 2026-07-12 12:36:02 +08:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user