From 6deeea7032507e91c6e01285e91eec7bb825f2c1 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Fri, 6 Feb 2026 07:18:00 +0000 Subject: [PATCH] add lint/format scripts and fix all biome errors (#233) Add `lint`, `lint:fix`, `format`, and `format:fix` package.json scripts backed by biome. Add AGENTS.md rule for agents to run them after changes. Fix all existing lint and format violations across the codebase. Co-authored-by: Cursor --- agents/claude.ts | 5 +++- entry | 48 +++++++++++++++++++------------------- test/adhoc/pushDisabled.ts | 2 +- utils/github.ts | 1 - 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/agents/claude.ts b/agents/claude.ts index 8bf6b61..5d419e3 100644 --- a/agents/claude.ts +++ b/agents/claude.ts @@ -167,7 +167,10 @@ export const claude = agent({ if (result.exitCode !== 0) { const errorMessage = - result.stderr || finalOutput || result.stdout || "Unknown error - no output from Claude CLI"; + result.stderr || + finalOutput || + result.stdout || + "Unknown error - no output from Claude CLI"; log.error(`Claude CLI exited with code ${result.exitCode}: ${errorMessage}`); return { success: false, diff --git a/entry b/entry index 4d6ad8e..7f10d86 100755 --- a/entry +++ b/entry @@ -41814,11 +41814,11 @@ var require_core2 = __commonJS({ Ajv2.ValidationError = validation_error_1.default; Ajv2.MissingRefError = ref_error_1.default; exports.default = Ajv2; - function checkOptions(checkOpts, options, msg, log3 = "error") { + function checkOptions(checkOpts, options, msg, log2 = "error") { for (const key in checkOpts) { const opt = key; if (opt in options) - this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`); + this.logger[log2](`${msg}: option ${key}. ${checkOpts[opt]}`); } } function getSchEnv(keyRef) { @@ -55729,13 +55729,13 @@ var require_mock_call_history = __commonJS({ function makeFilterCalls(parameterName) { return (parameterValue) => { if (typeof parameterValue === "string" || parameterValue == null) { - return this.logs.filter((log3) => { - return log3[parameterName] === parameterValue; + return this.logs.filter((log2) => { + return log2[parameterName] === parameterValue; }); } if (parameterValue instanceof RegExp) { - return this.logs.filter((log3) => { - return parameterValue.test(log3[parameterName]); + return this.logs.filter((log2) => { + return parameterValue.test(log2[parameterName]); }); } throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`); @@ -55830,8 +55830,8 @@ var require_mock_call_history = __commonJS({ return this.logs.filter(criteria); } if (criteria instanceof RegExp) { - return this.logs.filter((log3) => { - return criteria.test(log3.toString()); + return this.logs.filter((log2) => { + return criteria.test(log2.toString()); }); } if (typeof criteria === "object" && criteria !== null) { @@ -55881,13 +55881,13 @@ var require_mock_call_history = __commonJS({ this.logs = []; } [kMockCallHistoryAddLog](requestInit) { - const log3 = new MockCallHistoryLog(requestInit); - this.logs.push(log3); - return log3; + const log2 = new MockCallHistoryLog(requestInit); + this.logs.push(log2); + return log2; } *[Symbol.iterator]() { - for (const log3 of this.calls()) { - yield log3; + for (const log2 of this.calls()) { + yield log2; } } }; @@ -75811,7 +75811,7 @@ var require_node = __commonJS({ var tty = __require("tty"); var util2 = __require("util"); exports.init = init; - exports.log = log3; + exports.log = log2; exports.formatArgs = formatArgs2; exports.save = save; exports.load = load; @@ -75946,7 +75946,7 @@ var require_node = __commonJS({ } return (/* @__PURE__ */ new Date()).toISOString() + " "; } - function log3(...args3) { + function log2(...args3) { return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args3) + "\n"); } function save(namespaces) { @@ -109560,7 +109560,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (!namespace) throw new TypeError("argument namespace is required"); var file2 = callSiteLocation(getStack()[1])[0]; function deprecate$1(message) { - log3.call(deprecate$1, message); + log2.call(deprecate$1, message); } deprecate$1._file = file2; deprecate$1._ignored = isignored(namespace); @@ -109582,7 +109582,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (process.traceDeprecation) return true; return containsNamespace(process.env.TRACE_DEPRECATION || "", namespace); } - function log3(message, site) { + function log2(message, site) { var haslisteners = eehaslisteners(process, "deprecation"); if (!haslisteners && this._ignored) return; var caller; @@ -109688,7 +109688,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => { var args3 = createArgumentsString(fn2.length); var site = callSiteLocation(getStack()[1]); site.name = fn2.name; - return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args3 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log3, this, message, site); + return new Function("fn", "log", "deprecate", "message", "site", '"use strict"\nreturn function (' + args3 + ") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(fn2, log2, this, message, site); } function wrapproperty(obj, prop, message) { if (!obj || typeof obj !== "object" && typeof obj !== "function") throw new TypeError("argument obj must be object"); @@ -109702,11 +109702,11 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => { var get2 = descriptor.get; var set2 = descriptor.set; if (typeof get2 === "function") descriptor.get = function getter() { - log3.call(deprecate$1, message, site); + log2.call(deprecate$1, message, site); return get2.apply(this, arguments); }; if (typeof set2 === "function") descriptor.set = function setter() { - log3.call(deprecate$1, message, site); + log2.call(deprecate$1, message, site); return set2.apply(this, arguments); }; Object.defineProperty(obj, prop, descriptor); @@ -127308,7 +127308,7 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}` ); } }; - const log3 = { + const log2 = { debug: (message, context) => { this.#server.sendLoggingMessage({ data: { @@ -127370,7 +127370,7 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}` client: { version: this.#server.getClientVersion() }, - log: log3, + log: log2, reportProgress: reportProgress2, requestId: typeof request2.params?._meta?.requestId === "string" ? request2.params._meta.requestId : void 0, session: this.#auth, @@ -136485,7 +136485,7 @@ async function fetchWrapper(requestOptions) { "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" ); } - const log3 = requestOptions.request?.log || console; + const log2 = requestOptions.request?.log || console; const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; const body = isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body; const requestHeaders = Object.fromEntries( @@ -136543,7 +136543,7 @@ async function fetchWrapper(requestOptions) { if ("deprecation" in responseHeaders) { const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); const deprecationLink = matches && matches.pop(); - log3.warn( + log2.warn( `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` ); } diff --git a/test/adhoc/pushDisabled.ts b/test/adhoc/pushDisabled.ts index 4b955bb..0166a37 100644 --- a/test/adhoc/pushDisabled.ts +++ b/test/adhoc/pushDisabled.ts @@ -1,5 +1,5 @@ import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts"; -import { defineFixture, getAgentOutput, getStructuredOutput } from "../utils.ts"; +import { defineFixture, getStructuredOutput } from "../utils.ts"; /** * push disabled test - validates that all push operations are blocked. diff --git a/utils/github.ts b/utils/github.ts index 82b8a47..0dbd4f9 100644 --- a/utils/github.ts +++ b/utils/github.ts @@ -2,7 +2,6 @@ import { createSign } from "node:crypto"; import * as core from "@actions/core"; import { throttling } from "@octokit/plugin-throttling"; import { Octokit } from "@octokit/rest"; -import { log } from "./cli.ts"; import { retry } from "./retry.ts"; export interface InstallationToken {