chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -30,11 +30,7 @@ function resolveNodeRunner(): NodeRunner {
throw new Error("Missing pnpm or npx; install a Node package runner.");
}
async function runNodeTool(
tool: string,
toolArgs: string[],
options: ToolRunOptions = {},
) {
async function runNodeTool(tool: string, toolArgs: string[], options: ToolRunOptions = {}) {
const runner = resolveNodeRunner();
const argv = [runner.cmd, ...runner.args, tool, ...toolArgs];
return await runCommandWithTimeout(argv, {
@@ -43,11 +39,7 @@ async function runNodeTool(
});
}
async function runTool(
tool: string,
toolArgs: string[],
options: ToolRunOptions = {},
) {
async function runTool(tool: string, toolArgs: string[], options: ToolRunOptions = {}) {
if (hasBinary(tool)) {
return await runCommandWithTimeout([tool, ...toolArgs], {
timeoutMs: options.timeoutMs ?? SEARCH_TIMEOUT_MS,
@@ -130,11 +122,7 @@ function formatLinkLabel(link: string): string {
return link.replace(/^https?:\/\//i, "");
}
function renderRichResults(
query: string,
results: DocResult[],
runtime: RuntimeEnv,
) {
function renderRichResults(query: string, results: DocResult[], runtime: RuntimeEnv) {
runtime.log(`${theme.heading("Docs search:")} ${theme.info(query)}`);
if (results.length === 0) {
runtime.log(theme.muted("No results."));
@@ -156,10 +144,7 @@ async function renderMarkdown(markdown: string, runtime: RuntimeEnv) {
runtime.log(markdown.trimEnd());
}
export async function docsSearchCommand(
queryParts: string[],
runtime: RuntimeEnv,
) {
export async function docsSearchCommand(queryParts: string[], runtime: RuntimeEnv) {
const query = queryParts.join(" ").trim();
if (!query) {
const docs = formatDocsLink("/", "docs.clawd.bot");