From 9416c97b24d46f780c57627551795e40619ecc26 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sat, 5 Jul 2025 23:24:36 -0700 Subject: fix eslint any warnings - needs to be any for dynamic score file rendering --- README.md | 5 +++++ frontend/src/components/tables/GenericScoreTable.tsx | 7 +++++-- frontend/src/pages/Score.tsx | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 542131f..af1f2f8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # Mirage **Mirage** is a lightweight, open-source rhythm game score tracker that doesn’t rely on predefined seeds or chart metadata. It preseves your scores across games — even niche ones. +- React Typescript +- Express +- TailwindCSS +- PostgreSQL +- Prisma ORM ## ✨ Features - **Import & Track Scores** – Keep a safe backup of your game scores. diff --git a/frontend/src/components/tables/GenericScoreTable.tsx b/frontend/src/components/tables/GenericScoreTable.tsx index f82e1ff..3358f8d 100644 --- a/frontend/src/components/tables/GenericScoreTable.tsx +++ b/frontend/src/components/tables/GenericScoreTable.tsx @@ -1,6 +1,7 @@ import React from "react"; interface Score { + // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; timestamp: string | number; } @@ -70,7 +71,7 @@ const ScoreDisplay: React.FC = ({ "grade", ]; const expandableKeys = ["judgements", "optional"]; - + // eslint-disable-next-line @typescript-eslint/no-explicit-any const formatValue = (value: any, key: string): string => { if (value === null || value === undefined) return "N/A"; @@ -102,10 +103,11 @@ const ScoreDisplay: React.FC = ({ }; const renderValue = ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any, key: string, compact: boolean = false, - ): JSX.Element => { + ): React.ReactElement => { if (value === null || value === undefined) return N/A; @@ -260,6 +262,7 @@ const ScoreDisplay: React.FC = ({ return (
{sortedScores.map((score, index) => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { primary, mainStats, expandable, others, timestamp } = getScoreEntries(score); diff --git a/frontend/src/pages/Score.tsx b/frontend/src/pages/Score.tsx index e9feecd..a39ce25 100644 --- a/frontend/src/pages/Score.tsx +++ b/frontend/src/pages/Score.tsx @@ -11,6 +11,7 @@ type SortDirection = "asc" | "desc"; const Score = () => { const { user, isLoading, logout } = useAuth(); const navigate = useNavigate(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any const [scores, setScores] = useState([]); const [loading, setLoading] = useState(true); const [currentPage, setCurrentPage] = useState(1); @@ -31,7 +32,7 @@ const Score = () => { alert("Network error during logout. Please try again."); } }; - + // eslint-disable-next-line @typescript-eslint/no-explicit-any const flattenScoreData = (score: any) => { const flat = { ...score, ...score.data }; delete flat.data; -- cgit v1.2.3