refactor: eliminate remaining 15 any warnings and ratchet rule to error
- TaskCard: four catch((err: any) => err.message) promise handlers in
archive/unarchive/delete/move → catch((err) => getErrorMessage(err)).
- InlineCreateCard + QuickEntryBox: .catch((err: any)) model-load handlers
→ getErrorMessage(err) with existing @fusion/core import.
- TerminalModal: drop (navigator as any).maxTouchPoints — modern lib.dom
types already expose the property.
- serve.ts: remove unused any annotation on OpenRouter model mapper; the
array element type is already inferred from json.data.
- pi.js, runtime-resolution.ts, dashboard.ts, serve.ts, dev-server-port-
detect.ts, devserver-manager.ts: drop now-stale eslint-disable comments
that the cleanup made redundant.
Fix a prompt-builder regression surfaced by agent's `any` cleanup: toolCall
with a raw string `arguments` field must be preserved verbatim (JSON-quoted)
rather than coerced to `{}`; restores a previously-passing test.
Then promote @typescript-eslint/no-explicit-any from warn → error. Future
new anys must either come with a one-line disable + justification or use a
real type. Workspace is now lint-clean (0 problems).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
* Uses Fusion auth for writes and legacy pi auth as a read-only fallback.
|
||||
* Provides factory functions for creating triage and executor agent sessions.
|
||||
*/
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { exec } from "node:child_process";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
@@ -78,7 +78,6 @@ export class DefaultPiRuntime implements AgentRuntime {
|
||||
readonly name = "Default PI Runtime";
|
||||
|
||||
// Synchronous cached describeModel function
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
private static describeModelFn: ((session: AgentSession) => string) | null = null;
|
||||
|
||||
/**
|
||||
@@ -223,7 +222,6 @@ function wrapPluginRuntime(
|
||||
describeModel: (session: AgentSession) => {
|
||||
const adapter = instance as Record<string, unknown>;
|
||||
if (typeof adapter.describeModel === "function") {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
return (adapter.describeModel as (s: AgentSession) => string)(session);
|
||||
}
|
||||
// Fallback to default pi describeModel - use cached sync function
|
||||
|
||||
Reference in New Issue
Block a user