Lint with every Oxlint category and list only the offs and options
Check / check (pull_request) Successful in 51s

This commit is contained in:
Danny Kim
2026-10-19 11:26:48 +09:00
parent c8ffb9cc6f
commit d09806daad
19 changed files with 293 additions and 157 deletions
+12 -4
View File
@@ -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");