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

@@ -98,10 +98,7 @@ export async function resolveSandboxWorkdir(params: {
}
}
export function killSession(session: {
pid?: number;
child?: ChildProcessWithoutNullStreams;
}) {
export function killSession(session: { pid?: number; child?: ChildProcessWithoutNullStreams }) {
const pid = session.pid ?? session.child?.pid;
if (pid) {
killProcessTree(pid);
@@ -117,9 +114,7 @@ export function resolveWorkdir(workdir: string, warnings: string[]) {
} catch {
// ignore, fallback below
}
warnings.push(
`Warning: workdir "${workdir}" is unavailable; using "${fallback}".`,
);
warnings.push(`Warning: workdir "${workdir}" is unavailable; using "${fallback}".`);
return fallback;
}
@@ -177,9 +172,7 @@ export function sliceLogLines(
const totalLines = lines.length;
const totalChars = text.length;
let start =
typeof offset === "number" && Number.isFinite(offset)
? Math.max(0, Math.floor(offset))
: 0;
typeof offset === "number" && Number.isFinite(offset) ? Math.max(0, Math.floor(offset)) : 0;
if (limit !== undefined && offset === undefined) {
const tailCount = Math.max(0, Math.floor(limit));
start = Math.max(totalLines - tailCount, 0);
@@ -203,8 +196,7 @@ export function deriveSessionName(command: string): string | undefined {
}
function tokenizeCommand(command: string): string[] {
const matches =
command.match(/(?:[^\s"']+|"(?:\\.|[^"])*"|'(?:\\.|[^'])*')+/g) ?? [];
const matches = command.match(/(?:[^\s"']+|"(?:\\.|[^"])*"|'(?:\\.|[^'])*')+/g) ?? [];
return matches.map((token) => stripQuotes(token)).filter(Boolean);
}