From e2ea472a1058d9b80f9ef8992d40e68e7f1a9952 Mon Sep 17 00:00:00 2001 From: Michael Wolf Date: Thu, 1 Jan 2026 17:22:04 -0600 Subject: [PATCH] Make biome happier --- express/app.ts | 19 ++++++++----------- express/handlers.ts | 2 +- express/routes.ts | 2 +- express/tsconfig.json | 12 ++++++------ express/types.ts | 8 ++++---- 5 files changed, 20 insertions(+), 23 deletions(-) diff --git a/express/app.ts b/express/app.ts index 1dae9f7..6117023 100644 --- a/express/app.ts +++ b/express/app.ts @@ -1,6 +1,6 @@ import express, { - Request as ExpressRequest, - Response as ExpressResponse, + type Request as ExpressRequest, + type Response as ExpressResponse, } from "express"; import { match } from "path-to-regexp"; import { cli } from "./cli"; @@ -10,19 +10,16 @@ import { routes } from "./routes"; import { services } from "./services"; // import { URLPattern } from 'node:url'; import { - Call, - InternalHandler, - Method, - ProcessedRoute, - Result, - Route, + type Call, + type InternalHandler, + type Method, massageMethod, methodParser, + type ProcessedRoute, + type Result, + type Route, } from "./types"; - - - const app = express(); services.logging.log({ source: "logging", text: ["1"] }); diff --git a/express/handlers.ts b/express/handlers.ts index 4ad67e8..9a15231 100644 --- a/express/handlers.ts +++ b/express/handlers.ts @@ -1,7 +1,7 @@ import { contentTypes } from "./content-types"; import { httpCodes } from "./http-codes"; import { services } from "./services"; -import { Call, Handler, Result } from "./types"; +import type { Call, Handler, Result } from "./types"; const multiHandler: Handler = async (call: Call): Promise => { const code = httpCodes.success.OK; diff --git a/express/routes.ts b/express/routes.ts index 4a67aa5..7c7e7e4 100644 --- a/express/routes.ts +++ b/express/routes.ts @@ -4,7 +4,7 @@ import { contentTypes } from "./content-types"; import { multiHandler } from "./handlers"; import { HttpCode, httpCodes } from "./http-codes"; import { services } from "./services"; -import { Call, ProcessedRoute, Result, Route } from "./types"; +import { type Call, ProcessedRoute, type Result, type Route } from "./types"; // FIXME: Obviously put this somewhere else const okText = (result: string): Result => { diff --git a/express/tsconfig.json b/express/tsconfig.json index ccba534..3381805 100644 --- a/express/tsconfig.json +++ b/express/tsconfig.json @@ -1,13 +1,13 @@ { "compilerOptions": { - "esModuleInterop": true, - "target": "ES2022", - "lib": ["ES2023"], - "module": "NodeNext", - "moduleResolution": "NodeNext", + "esModuleInterop": true, + "target": "ES2022", + "lib": ["ES2023"], + "module": "NodeNext", + "moduleResolution": "NodeNext", "noImplicitAny": true, "strict": true, "types": ["node"], - "outDir": "out", + "outDir": "out" } } diff --git a/express/types.ts b/express/types.ts index 05ce6d9..2b6c79e 100644 --- a/express/types.ts +++ b/express/types.ts @@ -3,13 +3,13 @@ // FIXME: split this up into types used by app developers and types internal // to the framework. import { - Request as ExpressRequest, + type Request as ExpressRequest, Response as ExpressResponse, } from "express"; -import { MatchFunction } from "path-to-regexp"; +import type { MatchFunction } from "path-to-regexp"; import { z } from "zod"; -import { ContentType, contentTypes } from "./content-types"; -import { HttpCode, httpCodes } from "./http-codes"; +import { type ContentType, contentTypes } from "./content-types"; +import { type HttpCode, httpCodes } from "./http-codes"; const methodParser = z.union([ z.literal("GET"),