Lint with every Oxlint category and list only the offs and options
Check / check (pull_request) Successful in 51s
Check / check (pull_request) Successful in 51s
This commit is contained in:
+12
-4
@@ -49,7 +49,9 @@ export async function collectOpenCodeOutput(
|
||||
export function openCodeError(output: string): Error | null {
|
||||
let failure: Error | null = null;
|
||||
for (const line of output.split("\n")) {
|
||||
if (line.trim() === "") continue;
|
||||
if (line.trim() === "") {
|
||||
continue;
|
||||
}
|
||||
let event: unknown;
|
||||
try {
|
||||
event = JSON.parse(line);
|
||||
@@ -80,12 +82,18 @@ export function openCodeError(output: string): Error | null {
|
||||
export function parseOpenCodeEvents(output: string): string {
|
||||
let result: string | null = null;
|
||||
for (const line of output.split("\n")) {
|
||||
if (line.trim() === "") continue;
|
||||
if (line.trim() === "") {
|
||||
continue;
|
||||
}
|
||||
const event: unknown = JSON.parse(line);
|
||||
const part = field(event, "part");
|
||||
if (field(event, "type") !== "text" || !isObject(part)) continue;
|
||||
if (field(event, "type") !== "text" || !isObject(part)) {
|
||||
continue;
|
||||
}
|
||||
const text = field(part, "text");
|
||||
if (typeof text === "string" && text.trim() !== "") result = text;
|
||||
if (typeof text === "string" && text.trim() !== "") {
|
||||
result = text;
|
||||
}
|
||||
}
|
||||
if (result === null) {
|
||||
throw openCodeError(output) ?? new Error("OpenCode produced no text output");
|
||||
|
||||
Reference in New Issue
Block a user