chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -10,8 +10,7 @@ export const GATEWAY_CLIENT_IDS = {
PROBE: "clawdbot-probe",
} as const;
export type GatewayClientId =
(typeof GATEWAY_CLIENT_IDS)[keyof typeof GATEWAY_CLIENT_IDS];
export type GatewayClientId = (typeof GATEWAY_CLIENT_IDS)[keyof typeof GATEWAY_CLIENT_IDS];
// Back-compat naming (internal): these values are IDs, not display names.
export const GATEWAY_CLIENT_NAMES = GATEWAY_CLIENT_IDS;
@@ -26,8 +25,7 @@ export const GATEWAY_CLIENT_MODES = {
TEST: "test",
} as const;
export type GatewayClientMode =
(typeof GATEWAY_CLIENT_MODES)[keyof typeof GATEWAY_CLIENT_MODES];
export type GatewayClientMode = (typeof GATEWAY_CLIENT_MODES)[keyof typeof GATEWAY_CLIENT_MODES];
export type GatewayClientInfo = {
id: GatewayClientId;
@@ -40,16 +38,10 @@ export type GatewayClientInfo = {
instanceId?: string;
};
const GATEWAY_CLIENT_ID_SET = new Set<GatewayClientId>(
Object.values(GATEWAY_CLIENT_IDS),
);
const GATEWAY_CLIENT_MODE_SET = new Set<GatewayClientMode>(
Object.values(GATEWAY_CLIENT_MODES),
);
const GATEWAY_CLIENT_ID_SET = new Set<GatewayClientId>(Object.values(GATEWAY_CLIENT_IDS));
const GATEWAY_CLIENT_MODE_SET = new Set<GatewayClientMode>(Object.values(GATEWAY_CLIENT_MODES));
export function normalizeGatewayClientId(
raw?: string | null,
): GatewayClientId | undefined {
export function normalizeGatewayClientId(raw?: string | null): GatewayClientId | undefined {
const normalized = raw?.trim().toLowerCase();
if (!normalized) return undefined;
return GATEWAY_CLIENT_ID_SET.has(normalized as GatewayClientId)
@@ -57,15 +49,11 @@ export function normalizeGatewayClientId(
: undefined;
}
export function normalizeGatewayClientName(
raw?: string | null,
): GatewayClientName | undefined {
export function normalizeGatewayClientName(raw?: string | null): GatewayClientName | undefined {
return normalizeGatewayClientId(raw);
}
export function normalizeGatewayClientMode(
raw?: string | null,
): GatewayClientMode | undefined {
export function normalizeGatewayClientMode(raw?: string | null): GatewayClientMode | undefined {
const normalized = raw?.trim().toLowerCase();
if (!normalized) return undefined;
return GATEWAY_CLIENT_MODE_SET.has(normalized as GatewayClientMode)