summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-04-19 22:31:11 +0200
committerRory& <root@rory.gay>2026-04-19 22:45:37 +0200
commita8204b0c02e443a0928850e69d0abc47b17b6a72 (patch)
tree49f52116fcd9fee1ff462f7d4dc0ba3d33322caa
parenteslint: arrow-body-style=as-needed (diff)
downloadserver-ts-a8204b0c02e443a0928850e69d0abc47b17b6a72.tar.xz
eslint: default-case
-rw-r--r--eslint.config.mjs9
-rw-r--r--src/gateway/listener/listener.ts6
-rw-r--r--src/util/util/lambert-server/check.ts2
3 files changed, 17 insertions, 0 deletions
diff --git a/eslint.config.mjs b/eslint.config.mjs

index 7e126751..38750470 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs
@@ -56,6 +56,15 @@ export default defineConfig([ "no-unmodified-loop-condition": "error", "no-unreachable-loop": "error", "arrow-body-style": ["error", "as-needed"], + "block-scoped-var": "error", + // some day... + // "camelcase": ["error", { + // properties: "never", //schemas + // ignoreImports: true + // }], + // "consistent-return": "error", + "default-case": "error", + "default-case-last": "error", // unsure what the defaults are here, but we want them to error "for-direction": "error", "constructor-super": "error", diff --git a/src/gateway/listener/listener.ts b/src/gateway/listener/listener.ts
index c3f85e01..70571e5f 100644 --- a/src/gateway/listener/listener.ts +++ b/src/gateway/listener/listener.ts
@@ -231,6 +231,9 @@ async function consume(this: WebSocket, opts: EventOpts) { }); this.close(CLOSECODES.Invalid_session); // TODO: this is deprecated? return; + default: + // no special treatment + break; } // subscription managment @@ -290,6 +293,9 @@ async function consume(this: WebSocket, opts: EventOpts) { } break; } + default: + // no special treatment + break; } // permission checking diff --git a/src/util/util/lambert-server/check.ts b/src/util/util/lambert-server/check.ts
index 561a584c..5ec72761 100644 --- a/src/util/util/lambert-server/check.ts +++ b/src/util/util/lambert-server/check.ts
@@ -50,6 +50,8 @@ export function instanceOf(type: any, value: any, { path = "", optional = false case Object: if (typeof value === "object" && value !== null) return true; throw `${path} must be a object`; + default: + break; } if (typeof type === "object") {