fix(lint): resolve explicit any and useless assignment in DM components

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
emil
2026-05-15 18:10:28 +03:00
co-authored by Sisyphus
parent 3388d70d96
commit 8eafd504b2
3 changed files with 23 additions and 5 deletions
+11 -1
View File
@@ -166,7 +166,17 @@ const quickDice = [
}
if (!raw) return [];
const parsed = JSON.parse(raw) as any[];
const parsed = JSON.parse(raw) as Array<{
result?: number;
total?: number;
rolls?: unknown[];
formula?: string;
notation?: string;
modifier?: number;
status?: "crit" | "fail" | "normal";
isCrit?: boolean;
isFail?: boolean;
}>;
// Migrate old-format entries
const migrated = parsed.map((entry) => {
+1 -1
View File
@@ -172,7 +172,7 @@ if (activeTab && tabs.some((t) => t.id === activeTab)) {
if (!focused || !focused.hasAttribute("data-tab")) return;
const currentIndex = tabEls.indexOf(focused);
let nextIndex = currentIndex;
let nextIndex: number;
switch (e.key) {
case "ArrowRight":
+11 -3
View File
@@ -139,8 +139,16 @@ import { dmTranslations as T } from "@/i18n/dm-translations";
const oldRaw = sessionStorage.getItem("it-combatants");
if (oldRaw) {
try {
const oldData = JSON.parse(oldRaw) as any[];
const migrated = oldData.map((c: any, index: number) => ({
const oldData = JSON.parse(oldRaw) as Array<{
id?: string;
name?: string;
modifier?: number;
initiative?: number;
hp?: number;
maxHp?: number;
active?: boolean;
}>;
const migrated = oldData.map((c, index) => ({
id: c.id || `legacy-${index}-${Date.now()}`,
name: c.name || 'Unknown',
modifier: typeof c.modifier === 'number' ? c.modifier : 0,
@@ -156,7 +164,7 @@ import { dmTranslations as T } from "@/i18n/dm-translations";
}
return [];
}
const parsed = JSON.parse(raw) as any[];
const parsed = JSON.parse(raw) as Array<{ id?: string }>;
let migrated = false;
const combatants = parsed.map((c) => {