fix: lint issues in web4-governance extension

- Replace 'as any' with proper 'as ToolCategory' type cast
- Add ToolCategory import to policy-entity.ts
- Add eslint-disable comment for console.log in CLI commands (legitimate output)
This commit is contained in:
dp-web4 2026-01-28 14:18:51 -08:00
parent c9d0f86db0
commit 29afd60f11
2 changed files with 3 additions and 1 deletions

View File

@ -293,6 +293,7 @@ const plugin = {
});
// --- CLI Commands ---
/* eslint-disable no-console */
api.registerCli(
({ program }) => {

View File

@ -19,6 +19,7 @@ import type {
PolicyDecision,
PolicyEvaluation,
} from "./policy-types.js";
import type { ToolCategory } from "./r6.js";
import { resolvePreset } from "./presets.js";
import type { RateLimiter } from "./rate-limiter.js";
@ -134,7 +135,7 @@ export class PolicyEntity {
}
// Category match
if (match.categories && !match.categories.includes(category as any)) {
if (match.categories && !match.categories.includes(category as ToolCategory)) {
return false;
}