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:
parent
c9d0f86db0
commit
29afd60f11
@ -293,6 +293,7 @@ const plugin = {
|
||||
});
|
||||
|
||||
// --- CLI Commands ---
|
||||
/* eslint-disable no-console */
|
||||
|
||||
api.registerCli(
|
||||
({ program }) => {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user