Allow static only classes and make Health.check() no longer async

This commit is contained in:
James Blair 2026-05-08 18:49:46 +12:00
parent 85da5b630f
commit c9ba6a6cc5
Signed by: james
SSH key fingerprint: SHA256:hsDR3ENI2ZMgh+CNb+0PrFsj29DI007R+BMKUVGi6zQ
3 changed files with 6 additions and 3 deletions

View file

@ -20,6 +20,9 @@
"recommended": true, "recommended": true,
"suspicious": { "suspicious": {
"noUnknownAtRules": "off" "noUnknownAtRules": "off"
},
"complexity": {
"noStaticOnlyClass": "off"
} }
}, },
"domains": { "domains": {

View file

@ -1,4 +1,4 @@
import Elysia, { t } from "elysia"; import Elysia from "elysia";
import { health } from "./modules/health"; import { health } from "./modules/health";
export const app = new Elysia({ prefix: "/api" }).use(health); export const app = new Elysia({ prefix: "/api" }).use(health);

View file

@ -1,7 +1,7 @@
import { HealthModel } from "./model"; import type { HealthModel } from "./model";
export abstract class Health { export abstract class Health {
static async check() { static check() {
return { return {
status: "ok", status: "ok",
} satisfies HealthModel["checkResponse"]; } satisfies HealthModel["checkResponse"];