feature: Adds eslint rules.

This commit is contained in:
greysoh 2024-05-10 17:37:04 -04:00
parent 09f7987e75
commit 3c95c23369
No known key found for this signature in database
GPG key ID: FE0F173B8FC01571
26 changed files with 124 additions and 95 deletions

View file

@ -14,7 +14,7 @@ function authenticateSocket(
ws: WebSocket,
message: string,
state: ConnectedClientExt,
): Boolean {
): boolean {
if (!message.startsWith("Accept: ")) {
ws.send("400 Bad Request");
return false;
@ -57,8 +57,8 @@ export function requestHandler(
let state: "authentication" | "data" = "authentication";
let socket: dgram.Socket | net.Socket | undefined;
// @ts-expect-error
let connectedClient: ConnectedClientExt = {};
// @ts-expect-error: FIXME because this is a mess
const connectedClient: ConnectedClientExt = {};
ws.on("close", () => {
instance.clients.splice(