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 <cursoragent@cursor.com>
This commit is contained in:
committed by
pullfrog[bot]
parent
1d59fd3d21
commit
6deeea7032
+4
-1
@@ -167,7 +167,10 @@ export const claude = agent({
|
|||||||
|
|
||||||
if (result.exitCode !== 0) {
|
if (result.exitCode !== 0) {
|
||||||
const errorMessage =
|
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}`);
|
log.error(`Claude CLI exited with code ${result.exitCode}: ${errorMessage}`);
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
|
|||||||
@@ -41814,11 +41814,11 @@ var require_core2 = __commonJS({
|
|||||||
Ajv2.ValidationError = validation_error_1.default;
|
Ajv2.ValidationError = validation_error_1.default;
|
||||||
Ajv2.MissingRefError = ref_error_1.default;
|
Ajv2.MissingRefError = ref_error_1.default;
|
||||||
exports.default = Ajv2;
|
exports.default = Ajv2;
|
||||||
function checkOptions(checkOpts, options, msg, log3 = "error") {
|
function checkOptions(checkOpts, options, msg, log2 = "error") {
|
||||||
for (const key in checkOpts) {
|
for (const key in checkOpts) {
|
||||||
const opt = key;
|
const opt = key;
|
||||||
if (opt in options)
|
if (opt in options)
|
||||||
this.logger[log3](`${msg}: option ${key}. ${checkOpts[opt]}`);
|
this.logger[log2](`${msg}: option ${key}. ${checkOpts[opt]}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getSchEnv(keyRef) {
|
function getSchEnv(keyRef) {
|
||||||
@@ -55729,13 +55729,13 @@ var require_mock_call_history = __commonJS({
|
|||||||
function makeFilterCalls(parameterName) {
|
function makeFilterCalls(parameterName) {
|
||||||
return (parameterValue) => {
|
return (parameterValue) => {
|
||||||
if (typeof parameterValue === "string" || parameterValue == null) {
|
if (typeof parameterValue === "string" || parameterValue == null) {
|
||||||
return this.logs.filter((log3) => {
|
return this.logs.filter((log2) => {
|
||||||
return log3[parameterName] === parameterValue;
|
return log2[parameterName] === parameterValue;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (parameterValue instanceof RegExp) {
|
if (parameterValue instanceof RegExp) {
|
||||||
return this.logs.filter((log3) => {
|
return this.logs.filter((log2) => {
|
||||||
return parameterValue.test(log3[parameterName]);
|
return parameterValue.test(log2[parameterName]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`);
|
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);
|
return this.logs.filter(criteria);
|
||||||
}
|
}
|
||||||
if (criteria instanceof RegExp) {
|
if (criteria instanceof RegExp) {
|
||||||
return this.logs.filter((log3) => {
|
return this.logs.filter((log2) => {
|
||||||
return criteria.test(log3.toString());
|
return criteria.test(log2.toString());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (typeof criteria === "object" && criteria !== null) {
|
if (typeof criteria === "object" && criteria !== null) {
|
||||||
@@ -55881,13 +55881,13 @@ var require_mock_call_history = __commonJS({
|
|||||||
this.logs = [];
|
this.logs = [];
|
||||||
}
|
}
|
||||||
[kMockCallHistoryAddLog](requestInit) {
|
[kMockCallHistoryAddLog](requestInit) {
|
||||||
const log3 = new MockCallHistoryLog(requestInit);
|
const log2 = new MockCallHistoryLog(requestInit);
|
||||||
this.logs.push(log3);
|
this.logs.push(log2);
|
||||||
return log3;
|
return log2;
|
||||||
}
|
}
|
||||||
*[Symbol.iterator]() {
|
*[Symbol.iterator]() {
|
||||||
for (const log3 of this.calls()) {
|
for (const log2 of this.calls()) {
|
||||||
yield log3;
|
yield log2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -75811,7 +75811,7 @@ var require_node = __commonJS({
|
|||||||
var tty = __require("tty");
|
var tty = __require("tty");
|
||||||
var util2 = __require("util");
|
var util2 = __require("util");
|
||||||
exports.init = init;
|
exports.init = init;
|
||||||
exports.log = log3;
|
exports.log = log2;
|
||||||
exports.formatArgs = formatArgs2;
|
exports.formatArgs = formatArgs2;
|
||||||
exports.save = save;
|
exports.save = save;
|
||||||
exports.load = load;
|
exports.load = load;
|
||||||
@@ -75946,7 +75946,7 @@ var require_node = __commonJS({
|
|||||||
}
|
}
|
||||||
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
||||||
}
|
}
|
||||||
function log3(...args3) {
|
function log2(...args3) {
|
||||||
return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args3) + "\n");
|
return process.stderr.write(util2.formatWithOptions(exports.inspectOpts, ...args3) + "\n");
|
||||||
}
|
}
|
||||||
function save(namespaces) {
|
function save(namespaces) {
|
||||||
@@ -109560,7 +109560,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|||||||
if (!namespace) throw new TypeError("argument namespace is required");
|
if (!namespace) throw new TypeError("argument namespace is required");
|
||||||
var file2 = callSiteLocation(getStack()[1])[0];
|
var file2 = callSiteLocation(getStack()[1])[0];
|
||||||
function deprecate$1(message) {
|
function deprecate$1(message) {
|
||||||
log3.call(deprecate$1, message);
|
log2.call(deprecate$1, message);
|
||||||
}
|
}
|
||||||
deprecate$1._file = file2;
|
deprecate$1._file = file2;
|
||||||
deprecate$1._ignored = isignored(namespace);
|
deprecate$1._ignored = isignored(namespace);
|
||||||
@@ -109582,7 +109582,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|||||||
if (process.traceDeprecation) return true;
|
if (process.traceDeprecation) return true;
|
||||||
return containsNamespace(process.env.TRACE_DEPRECATION || "", namespace);
|
return containsNamespace(process.env.TRACE_DEPRECATION || "", namespace);
|
||||||
}
|
}
|
||||||
function log3(message, site) {
|
function log2(message, site) {
|
||||||
var haslisteners = eehaslisteners(process, "deprecation");
|
var haslisteners = eehaslisteners(process, "deprecation");
|
||||||
if (!haslisteners && this._ignored) return;
|
if (!haslisteners && this._ignored) return;
|
||||||
var caller;
|
var caller;
|
||||||
@@ -109688,7 +109688,7 @@ var require_depd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|||||||
var args3 = createArgumentsString(fn2.length);
|
var args3 = createArgumentsString(fn2.length);
|
||||||
var site = callSiteLocation(getStack()[1]);
|
var site = callSiteLocation(getStack()[1]);
|
||||||
site.name = fn2.name;
|
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) {
|
function wrapproperty(obj, prop, message) {
|
||||||
if (!obj || typeof obj !== "object" && typeof obj !== "function") throw new TypeError("argument obj must be object");
|
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 get2 = descriptor.get;
|
||||||
var set2 = descriptor.set;
|
var set2 = descriptor.set;
|
||||||
if (typeof get2 === "function") descriptor.get = function getter() {
|
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);
|
return get2.apply(this, arguments);
|
||||||
};
|
};
|
||||||
if (typeof set2 === "function") descriptor.set = function setter() {
|
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);
|
return set2.apply(this, arguments);
|
||||||
};
|
};
|
||||||
Object.defineProperty(obj, prop, descriptor);
|
Object.defineProperty(obj, prop, descriptor);
|
||||||
@@ -127308,7 +127308,7 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}`
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const log3 = {
|
const log2 = {
|
||||||
debug: (message, context) => {
|
debug: (message, context) => {
|
||||||
this.#server.sendLoggingMessage({
|
this.#server.sendLoggingMessage({
|
||||||
data: {
|
data: {
|
||||||
@@ -127370,7 +127370,7 @@ ${error49 instanceof Error ? error49.stack : JSON.stringify(error49)}`
|
|||||||
client: {
|
client: {
|
||||||
version: this.#server.getClientVersion()
|
version: this.#server.getClientVersion()
|
||||||
},
|
},
|
||||||
log: log3,
|
log: log2,
|
||||||
reportProgress: reportProgress2,
|
reportProgress: reportProgress2,
|
||||||
requestId: typeof request2.params?._meta?.requestId === "string" ? request2.params._meta.requestId : void 0,
|
requestId: typeof request2.params?._meta?.requestId === "string" ? request2.params._meta.requestId : void 0,
|
||||||
session: this.#auth,
|
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"
|
"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 parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
|
||||||
const body = isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;
|
const body = isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;
|
||||||
const requestHeaders = Object.fromEntries(
|
const requestHeaders = Object.fromEntries(
|
||||||
@@ -136543,7 +136543,7 @@ async function fetchWrapper(requestOptions) {
|
|||||||
if ("deprecation" in responseHeaders) {
|
if ("deprecation" in responseHeaders) {
|
||||||
const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/);
|
const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/);
|
||||||
const deprecationLink = matches && matches.pop();
|
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}` : ""}`
|
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { AgentResult, TestRunnerOptions, ValidationCheck } from "../utils.ts";
|
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.
|
* push disabled test - validates that all push operations are blocked.
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { createSign } from "node:crypto";
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import { throttling } from "@octokit/plugin-throttling";
|
import { throttling } from "@octokit/plugin-throttling";
|
||||||
import { Octokit } from "@octokit/rest";
|
import { Octokit } from "@octokit/rest";
|
||||||
import { log } from "./cli.ts";
|
|
||||||
import { retry } from "./retry.ts";
|
import { retry } from "./retry.ts";
|
||||||
|
|
||||||
export interface InstallationToken {
|
export interface InstallationToken {
|
||||||
|
|||||||
Reference in New Issue
Block a user