eslint: default-case

This commit is contained in:
Rory&
2026-04-19 22:31:11 +02:00
parent af29e6b178
commit a8204b0c02
3 changed files with 17 additions and 0 deletions
+9
View File
@@ -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",
+6
View File
@@ -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
+2
View File
@@ -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") {