Skip to content

Commit

Permalink
Cleanup linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed Jan 5, 2024
1 parent 64c3400 commit c9e09fc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/components/event-bridge-store.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/*
Copyright 2019 The Matrix.org Foundation C.I.C.
Expand Down
1 change: 1 addition & 0 deletions src/components/user-activity-store.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/*
Copyright 2021 The Matrix.org Foundation C.I.C.
Expand Down
5 changes: 3 additions & 2 deletions src/provisioning/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export class ProvisioningApi {
if (!mxidMatch) {
throw new ApiError("Server did not respond with a valid MXID", ErrCode.BadOpenID);
}
const [, _localpart, serverName] = mxidMatch;
const [,, serverName] = mxidMatch;
if (serverName !== server) {
throw new ApiError("Server returned a MXID belonging to another homeserver", ErrCode.BadOpenID);
}
Expand All @@ -414,7 +414,8 @@ export class ProvisioningApi {
log.warn(`Failed to exchange the token for ${server}`, ex);
if (ex instanceof ApiError) {
throw ex;
} else {
}
else {
throw new ApiError("Failed to exchange token", ErrCode.BadOpenID);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/utils/matrix-host-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ export class MatrixHostResolver {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), WellKnownTimeout);
// Will throw on timeout.
const wellKnown = await this.fetch(url, { signal: controller.signal });
const wellKnown = await this.fetch(url, {signal: controller.signal });
clearTimeout(timeout);
if (wellKnown.status !== 200) {
throw Error('Well known request returned non-200');
}
let wellKnownData: MatrixServerWellKnown;
try {
wellKnownData = await wellKnown.json() as MatrixServerWellKnown;
} catch (ex) {
}
catch (ex) {
throw Error('Invalid datatype for well-known response');
}
const mServer = wellKnownData["m.server"];
Expand Down
3 changes: 0 additions & 3 deletions src/utils/package-info.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { join, dirname } from "path";
import { statSync } from "fs";
import pkginfo from "pkginfo";
import { Logger } from "../components/logging";

const log = new Logger("PackageInfo");

// This may be defined if the script is run via NPM: https://docs.npmjs.com/cli/v8/using-npm/scripts#packagejson-vars
let BridgeVersion: string|undefined = process.env.npm_package_version;
Expand Down

0 comments on commit c9e09fc

Please sign in to comment.