chore(eslint): fix pre-existing errors surfaced by wider .cjs match

- Widen config match from top-level *.cjs to **/*.cjs so nested CommonJS
  scripts (e.g. mcp-schema-server.cjs) get Node globals and require() allowance.
- Replace lazy require() in claude-skills.ts with a normal top-level fs import.
- Tighten an any-typed tool map in pi-claude-cli to { name: string }.

Clears the remaining 12 lint errors; workspace now has 0 errors, 450 warnings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-04-23 17:45:28 -07:00
parent 30d35b101e
commit ce167b6397
3 changed files with 3 additions and 5 deletions

View File

@@ -24,6 +24,7 @@ import {
lstatSync,
mkdirSync,
readlinkSync,
rmSync,
symlinkSync,
unlinkSync,
} from "node:fs";
@@ -244,7 +245,5 @@ function safeReadlink(path: string): string | null {
}
function removeRecursive(path: string): void {
// Node 14.14+: rmSync. Imported lazily to keep the top imports minimal.
const { rmSync } = require("node:fs") as typeof import("node:fs");
rmSync(path, { recursive: true, force: true });
}

View File

@@ -86,7 +86,7 @@ export default function (pi: ExtensionAPI) {
pi.on("session_start", async () => {
const allTools = pi.getAllTools();
if (Array.isArray(allTools)) {
pi.setActiveTools(allTools.map((t: any) => t.name));
pi.setActiveTools(allTools.map((t: { name: string }) => t.name));
}
});