From c092192b0e2bd3a4962119d4b29b4910030e1492 Mon Sep 17 00:00:00 2001 From: Lukas Date: Mon, 16 Mar 2026 11:31:34 +0100 Subject: [PATCH] Add _copy field to RawMonster, remove noExplicitAny biome-ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The _copy field is a real property in the raw bestiary JSON — adding it to the interface is more accurate than casting through any. Ratchet source ignore threshold from 3 to 2. Co-Authored-By: Claude Opus 4.6 --- apps/web/src/adapters/bestiary-adapter.ts | 4 ++-- scripts/check-lint-ignores.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/adapters/bestiary-adapter.ts b/apps/web/src/adapters/bestiary-adapter.ts index e1be96a..a8b4391 100644 --- a/apps/web/src/adapters/bestiary-adapter.ts +++ b/apps/web/src/adapters/bestiary-adapter.ts @@ -51,6 +51,7 @@ interface RawMonster { legendaryHeader?: string[]; spellcasting?: RawSpellcasting[]; initiative?: { proficiency?: number }; + _copy?: unknown; } interface RawEntry { @@ -385,8 +386,7 @@ export function normalizeBestiary(raw: { monster: RawMonster[] }): Creature[] { // Filter out _copy entries (reference another source's monster) and // monsters missing required fields (ac, hp, size, type) const monsters = raw.monster.filter((m) => { - // biome-ignore lint/suspicious/noExplicitAny: raw JSON may have _copy field - if ((m as any)._copy) return false; + if (m._copy) return false; return ( Array.isArray(m.ac) && m.ac.length > 0 && diff --git a/scripts/check-lint-ignores.mjs b/scripts/check-lint-ignores.mjs index b4d552c..5755cf7 100644 --- a/scripts/check-lint-ignores.mjs +++ b/scripts/check-lint-ignores.mjs @@ -12,7 +12,7 @@ import { execSync } from "node:child_process"; import { readFileSync } from "node:fs"; // ── Configuration ────────────────────────────────────────────────────── -const MAX_SOURCE_IGNORES = 3; +const MAX_SOURCE_IGNORES = 2; const MAX_TEST_IGNORES = 3; /** Rule prefixes that must never be suppressed. */