lint: add Biome (lint only) and fix its findings
This commit is contained in:
1 parent
d5b6406cae
commit
441d9d6ed3
14 files changed
+125
-22
No files matched your search
@@ -228,7 +228,7 @@ function automationLine(task: ScheduledTask, now: number, timestampFormat: Tui3C
|
||||
task.schedule.type === "interval"
|
||||
? `every ${formatWorkingDurationLabel(task.schedule.everyMs)}`
|
||||
: task.schedule.type === "fixed_time"
|
||||
? `${task.schedule.weekdays && task.schedule.weekdays.length < 7 ? task.schedule.weekdays.map((day) => WEEKDAYS[day]).join(",") + " " : "daily "}${formatClock(task.schedule.timeOfDay, timestampFormat)}`
|
||||
? `${task.schedule.weekdays && task.schedule.weekdays.length < 7 ? `${task.schedule.weekdays.map((day) => WEEKDAYS[day]).join(",")} ` : "daily "}${formatClock(task.schedule.timeOfDay, timestampFormat)}`
|
||||
: "on webhook";
|
||||
if (!task.enabled) return { task, schedule, status: "off", tone: "muted" };
|
||||
if (task.lastRunStatus === "running") return { task, schedule, status: "running", tone: "info" };
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export interface PatchFile {
|
||||
/** Retains both paths so renamed and deleted files expand against the right revisions. */
|
||||
export function splitPatch(patch: string): PatchFile[] {
|
||||
return patch.split(/^(?=diff --git )/m).filter((chunk) => chunk.startsWith("diff --git ")).map((chunk) => {
|
||||
let parsed;
|
||||
let parsed: ReturnType<typeof parsePatch>[number] | undefined;
|
||||
try { parsed = parsePatch(chunk.split(/^@@ /m)[0]!)[0]; } catch { /* A truncated preview can end inside a file header. */ }
|
||||
const oldPath = cleanPath(parsed?.oldFileName ?? /^diff --git a\/(.+?) b\//.exec(chunk)?.[1] ?? "file");
|
||||
const newPath = cleanPath(parsed?.newFileName ?? oldPath);
|
||||
|
||||
Reference in new issue
Block a user