feature: Adds eslint rules.

This commit is contained in:
greysoh 2024-05-10 17:37:04 -04:00
parent 57a82a15e9
commit abc60691c6
No known key found for this signature in database
GPG key ID: FE0F173B8FC01571
26 changed files with 123 additions and 94 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(