diff --git a/.oxlintrc.json b/.oxlintrc.json index a809db4d72..811d7750bd 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -20,5 +20,19 @@ "unicorn/consistent-function-scoping": "off", "unicorn/require-post-message-target-origin": "off" }, - "ignorePatterns": ["src/canvas-host/a2ui/a2ui.bundle.js"] + "ignorePatterns": [ + "assets/", + "dist/", + "docs/_layouts/", + "node_modules/", + "patches/", + "pnpm-lock.yaml/", + "skills/", + "src/canvas-host/a2ui/a2ui.bundle.js", + "Swabble/", + "vendor/", + "extensions/", + "scripts/", + "ui/" + ] } diff --git a/apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js b/apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js index 59d1cc150d..563adcc3b1 100644 --- a/apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js +++ b/apps/shared/OpenClawKit/Tools/CanvasA2UI/bootstrap.js @@ -32,7 +32,6 @@ if (modalElement && Array.isArray(modalElement.styles)) { modalElement.styles = [...modalElement.styles, modalStyles]; } -const empty = Object.freeze({}); const emptyClasses = () => ({}); const textHintStyles = () => ({ h1: {}, h2: {}, h3: {}, h4: {}, h5: {}, body: {}, caption: {} }); @@ -160,7 +159,7 @@ class OpenClawA2UIHost extends LitElement { }; #processor = v0_8.Data.createSignalA2uiMessageProcessor(); - #themeProvider = new ContextProvider(this, { + themeProvider = new ContextProvider(this, { context: themeContext, initialValue: openclawTheme, }); @@ -318,8 +317,8 @@ class OpenClawA2UIHost extends LitElement { #handleActionStatus(evt) { const detail = evt?.detail ?? null; - if (!detail || typeof detail.id !== "string") return; - if (!this.pendingAction || this.pendingAction.id !== detail.id) return; + if (!detail || typeof detail.id !== "string") {return;} + if (!this.pendingAction || this.pendingAction.id !== detail.id) {return;} if (detail.ok) { this.pendingAction = { ...this.pendingAction, phase: "sent", sentAt: Date.now() }; @@ -362,7 +361,7 @@ class OpenClawA2UIHost extends LitElement { for (const item of ctxItems) { const key = item?.key; const value = item?.value ?? null; - if (!key || !value) continue; + if (!key || !value) {continue;} if (typeof value.path === "string") { const resolved = sourceNode diff --git a/package.json b/package.json index facdab385f..da292d61c1 100644 --- a/package.json +++ b/package.json @@ -114,10 +114,10 @@ "mac:restart": "bash scripts/restart-mac.sh", "mac:package": "bash scripts/package-mac-app.sh", "mac:open": "open dist/OpenClaw.app", - "lint": "oxlint --type-aware src test", + "lint": "oxlint --type-aware", "lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)", "lint:all": "pnpm lint && pnpm lint:swift", - "lint:fix": "pnpm format:fix && oxlint --type-aware --fix src test", + "lint:fix": "pnpm format:fix && oxlint --type-aware --fix", "format": "oxfmt --check", "format:swift": "swiftformat --lint --config .swiftformat apps/macos/Sources apps/ios/Sources apps/shared/OpenClawKit/Sources", "format:all": "pnpm format && pnpm format:swift",