diff --git a/.oxlintrc.json b/.oxlintrc.json index e1e7383d26..f9acdbea83 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -16,7 +16,6 @@ "oxc/no-map-spread": "off", "typescript/no-explicit-any": "error", "typescript/no-extraneous-class": "off", - "typescript/no-redundant-type-constituents": "off", "typescript/no-unsafe-type-assertion": "off", "unicorn/consistent-function-scoping": "off", "unicorn/require-post-message-target-origin": "off" diff --git a/package.json b/package.json index f563fb6616..2a16435304 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,6 @@ "exports": { ".": "./dist/index.js", "./plugin-sdk": "./dist/plugin-sdk/index.js", - "./plugin-sdk/*": "./dist/plugin-sdk/*", "./cli-entry": "./openclaw.mjs" }, "scripts": { @@ -105,9 +104,9 @@ "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 --tsconfig tsconfig.oxlint.json", + "lint": "oxlint --type-aware", "lint:all": "pnpm lint && pnpm lint:swift", - "lint:fix": "oxlint --type-aware --tsconfig tsconfig.oxlint.json --fix && pnpm format:fix", + "lint:fix": "oxlint --type-aware --fix && pnpm format:fix", "lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)", "mac:open": "open dist/OpenClaw.app", "mac:package": "bash scripts/package-mac-app.sh", diff --git a/src/media-understanding/providers/deepgram/audio.test.ts b/src/media-understanding/providers/deepgram/audio.test.ts index a3b96cc6c9..5d40b93059 100644 --- a/src/media-understanding/providers/deepgram/audio.test.ts +++ b/src/media-understanding/providers/deepgram/audio.test.ts @@ -5,8 +5,8 @@ import { transcribeDeepgramAudio } from "./audio.js"; const resolvePinnedHostname = ssrf.resolvePinnedHostname; const resolvePinnedHostnameWithPolicy = ssrf.resolvePinnedHostnameWithPolicy; const lookupMock = vi.fn(); -let resolvePinnedHostnameSpy: ReturnType | null = null; -let resolvePinnedHostnameWithPolicySpy: ReturnType | null = null; +let resolvePinnedHostnameSpy: ReturnType = null; +let resolvePinnedHostnameWithPolicySpy: ReturnType = null; const resolveRequestUrl = (input: RequestInfo | URL) => { if (typeof input === "string") { diff --git a/src/media-understanding/providers/google/video.test.ts b/src/media-understanding/providers/google/video.test.ts index 20675d4a37..c0a514f998 100644 --- a/src/media-understanding/providers/google/video.test.ts +++ b/src/media-understanding/providers/google/video.test.ts @@ -15,7 +15,7 @@ const resolveRequestUrl = (input: RequestInfo | URL) => { }; describe("describeGeminiVideo", () => { - let resolvePinnedHostnameSpy: ReturnType | undefined; + let resolvePinnedHostnameSpy: ReturnType; beforeEach(() => { resolvePinnedHostnameSpy = vi diff --git a/src/media-understanding/providers/openai/audio.test.ts b/src/media-understanding/providers/openai/audio.test.ts index 2053aef2df..4ea7a84088 100644 --- a/src/media-understanding/providers/openai/audio.test.ts +++ b/src/media-understanding/providers/openai/audio.test.ts @@ -5,8 +5,8 @@ import { transcribeOpenAiCompatibleAudio } from "./audio.js"; const resolvePinnedHostname = ssrf.resolvePinnedHostname; const resolvePinnedHostnameWithPolicy = ssrf.resolvePinnedHostnameWithPolicy; const lookupMock = vi.fn(); -let resolvePinnedHostnameSpy: ReturnType | null = null; -let resolvePinnedHostnameWithPolicySpy: ReturnType | null = null; +let resolvePinnedHostnameSpy: ReturnType = null; +let resolvePinnedHostnameWithPolicySpy: ReturnType = null; const resolveRequestUrl = (input: RequestInfo | URL) => { if (typeof input === "string") { diff --git a/src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts b/src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts index 6e4b70c434..d725340950 100644 --- a/src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts +++ b/src/telegram/bot.media.downloads-media-file-path-no-file-download.test.ts @@ -13,7 +13,7 @@ const getCachedStickerSpy = vi.fn(); const describeStickerImageSpy = vi.fn(); const resolvePinnedHostname = ssrf.resolvePinnedHostname; const lookupMock = vi.fn(); -let resolvePinnedHostnameSpy: ReturnType | null = null; +let resolvePinnedHostnameSpy: ReturnType = null; type ApiStub = { config: { use: (arg: unknown) => void }; diff --git a/src/web/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts b/src/web/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts index e9f078cffe..3c15871f2e 100644 --- a/src/web/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts +++ b/src/web/auto-reply.web-auto-reply.compresses-common-formats-jpeg-cap.test.ts @@ -98,7 +98,7 @@ const _makeSessionStore = async ( }; describe("web auto-reply", () => { - let resolvePinnedHostnameSpy: ReturnType | undefined; + let resolvePinnedHostnameSpy: ReturnType; beforeEach(() => { vi.clearAllMocks(); diff --git a/src/web/auto-reply.web-auto-reply.falls-back-text-media-send-fails.test.ts b/src/web/auto-reply.web-auto-reply.falls-back-text-media-send-fails.test.ts index 4e158e1caf..2d4e55b98f 100644 --- a/src/web/auto-reply.web-auto-reply.falls-back-text-media-send-fails.test.ts +++ b/src/web/auto-reply.web-auto-reply.falls-back-text-media-send-fails.test.ts @@ -97,7 +97,7 @@ const _makeSessionStore = async ( }; describe("web auto-reply", () => { - let resolvePinnedHostnameSpy: ReturnType | undefined; + let resolvePinnedHostnameSpy: ReturnType; beforeEach(() => { vi.clearAllMocks(); diff --git a/tsconfig.oxlint.json b/tsconfig.oxlint.json deleted file mode 100644 index bfec7fc55e..0000000000 --- a/tsconfig.oxlint.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "module": "NodeNext", - "moduleResolution": "NodeNext", - "lib": ["DOM", "DOM.Iterable", "ES2023", "ScriptHost"], - "noEmit": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "es2023" - }, - "include": ["src/**/*.ts", "extensions/**/*.ts"], - "exclude": ["node_modules", "dist"] -} diff --git a/tsdown.config.ts b/tsdown.config.ts index c9f165b695..137ce4b6a8 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -18,7 +18,9 @@ export default defineConfig([ platform: "node", }, { + dts: true, entry: "src/plugin-sdk/index.ts", + outDir: "dist/plugin-sdk", env, fixedExtension: false, platform: "node",