[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-15 22:56:38 +00:00
committed by Wyatt Johnson
parent b0e0ba6633
commit 3bfcc509d2
569 changed files with 2592 additions and 1925 deletions
+2 -1
View File
@@ -17,7 +17,7 @@ export default new GraphQLScalarType({
},
parseLiteral(ast) {
switch (ast.kind) {
case Kind.STRING:
case Kind.STRING: {
// This handles an empty string.
if (ast.value && ast.value.length === 0) {
return null;
@@ -29,6 +29,7 @@ export default new GraphQLScalarType({
}
return date.toJSDate();
}
default:
return null;
}
@@ -12,6 +12,7 @@ export type Publisher = (input: SUBSCRIPTION_INPUT) => Promise<void>;
* over the pubsub broker to facilitate live updates and notifications.
*
* @param pubsub the pubsub broker to be used to facilitate the publish action
* @param notifier
* @param tenantID the ID of the Tenant where the event will be published with
* @param clientID the ID of the client to de-duplicate mutation responses
*/
@@ -154,13 +154,14 @@ export function onConnect(options: OnConnectOptions): OnConnectFn {
}
if (!(err instanceof CoralError)) {
// eslint-disable-next-line no-ex-assign
err = new InternalError(err, "could not setup websocket connection");
}
const { message } = err.serializeExtensions(
options.i18n.getDefaultBundle()
);
throw { message };
throw new Error(message);
}
};
}