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

@@ -44,9 +44,7 @@ export const SERVICE_AUDIT_CODES = {
systemdWantsNetworkOnline: "systemd-wants-network-online",
} as const;
export function needsNodeRuntimeMigration(
issues: ServiceConfigIssue[],
): boolean {
export function needsNodeRuntimeMigration(issues: ServiceConfigIssue[]): boolean {
return issues.some(
(issue) =>
issue.code === SERVICE_AUDIT_CODES.gatewayRuntimeBun ||
@@ -171,10 +169,7 @@ async function auditLaunchdPlist(
}
}
function auditGatewayCommand(
programArguments: string[] | undefined,
issues: ServiceConfigIssue[],
) {
function auditGatewayCommand(programArguments: string[] | undefined, issues: ServiceConfigIssue[]) {
if (!programArguments || programArguments.length === 0) return;
if (!hasGatewaySubcommand(programArguments)) {
issues.push({
@@ -218,8 +213,7 @@ function auditGatewayServicePath(
if (!servicePath) {
issues.push({
code: SERVICE_AUDIT_CODES.gatewayPathMissing,
message:
"Gateway service PATH is not set; the daemon should use a minimal PATH.",
message: "Gateway service PATH is not set; the daemon should use a minimal PATH.",
level: "recommended",
});
return;
@@ -230,9 +224,7 @@ function auditGatewayServicePath(
.split(getPathModule(platform).delimiter)
.map((entry) => entry.trim())
.filter(Boolean);
const normalizedParts = parts.map((entry) =>
normalizePathEntry(entry, platform),
);
const normalizedParts = parts.map((entry) => normalizePathEntry(entry, platform));
const missing = expected.filter((entry) => {
const normalized = normalizePathEntry(entry, platform);
return !normalizedParts.includes(normalized);
@@ -284,8 +276,7 @@ async function auditGatewayRuntime(
if (isBunRuntime(execPath)) {
issues.push({
code: SERVICE_AUDIT_CODES.gatewayRuntimeBun,
message:
"Gateway service uses Bun; Bun is incompatible with WhatsApp + Telegram channels.",
message: "Gateway service uses Bun; Bun is incompatible with WhatsApp + Telegram channels.",
detail: execPath,
level: "recommended",
});
@@ -297,8 +288,7 @@ async function auditGatewayRuntime(
if (isVersionManagedNodePath(execPath, platform)) {
issues.push({
code: SERVICE_AUDIT_CODES.gatewayRuntimeNodeVersionManager,
message:
"Gateway service uses Node from a version manager; it can break after upgrades.",
message: "Gateway service uses Node from a version manager; it can break after upgrades.",
detail: execPath,
level: "recommended",
});