From e4f7155369e0789a95836cd77d6452848f98f804 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 1 Feb 2026 10:20:27 +0000 Subject: [PATCH] fix(ci): repair lint/build checks --- package.json | 2 +- src/agents/pi-embedded-runner/extra-params.ts | 5 ++++- src/config/telegram-webhook-secret.test.ts | 1 - tsconfig.oxlint.json | 11 +++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 tsconfig.oxlint.json diff --git a/package.json b/package.json index e3cb341df..d5695d4ef 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "ios:gen": "cd apps/ios && xcodegen generate", "ios:open": "cd apps/ios && xcodegen generate && open OpenClaw.xcodeproj", "ios:run": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build && xcrun simctl boot \"${IOS_SIM:-iPhone 17}\" || true && xcrun simctl launch booted ai.openclaw.ios'", - "lint": "oxlint --type-aware", + "lint": "oxlint --type-aware --tsconfig tsconfig.oxlint.json", "lint:all": "pnpm lint && pnpm lint:swift", "lint:fix": "oxlint --type-aware --fix && pnpm format:fix", "lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)", diff --git a/src/agents/pi-embedded-runner/extra-params.ts b/src/agents/pi-embedded-runner/extra-params.ts index a3314a5ca..47b678b60 100644 --- a/src/agents/pi-embedded-runner/extra-params.ts +++ b/src/agents/pi-embedded-runner/extra-params.ts @@ -21,6 +21,9 @@ export function resolveExtraParams(params: { } type CacheRetention = "none" | "short" | "long"; +type CacheRetentionStreamOptions = Partial & { + cacheRetention?: CacheRetention; +}; /** * Resolve cacheRetention from extraParams, supporting both new `cacheRetention` @@ -65,7 +68,7 @@ function createStreamFnWithExtraParams( return undefined; } - const streamParams: Partial = {}; + const streamParams: CacheRetentionStreamOptions = {}; if (typeof extraParams.temperature === "number") { streamParams.temperature = extraParams.temperature; } diff --git a/src/config/telegram-webhook-secret.test.ts b/src/config/telegram-webhook-secret.test.ts index dce093ae8..0c6d6d634 100644 --- a/src/config/telegram-webhook-secret.test.ts +++ b/src/config/telegram-webhook-secret.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from "vitest"; - import { validateConfigObject } from "./config.js"; describe("Telegram webhook config", () => { diff --git a/tsconfig.oxlint.json b/tsconfig.oxlint.json new file mode 100644 index 000000000..326b03df4 --- /dev/null +++ b/tsconfig.oxlint.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "openclaw": ["./src/index.ts"], + "openclaw/*": ["./src/*"] + } + }, + "include": ["src/**/*", "extensions/**/*", "packages/**/*"] +}