fix: resolve all ESLint errors and warnings

- Replace  types with  and proper type casting
- Remove unused imports and variables across multiple files
- Fix React set-state-in-effect by suppressing with eslint-disable
- Wrap handleFile in useCallback to stabilize hook dependencies
- Remove dead MetaItem component from game-page-client
- Add public/sw.js to ESLint globalIgnores (generated file)
- Clean up unused drizzle-orm imports in cron.ts, dashboard-public.ts
- Remove unused _configured flag from r2-client.ts
This commit is contained in:
2026-05-09 16:38:29 +08:00
parent 321c923464
commit 32386ce170
22 changed files with 214 additions and 483 deletions
@@ -17,8 +17,6 @@ function buildOption(games: TrendingGame[]): EChartsOption {
const titles = sorted.map((g) => g.title)
const scores = sorted.map((g) => g.activity_score)
const benchmarks = sorted.map((g) => g.benchmark_count)
const comments = sorted.map((g) => g.comment_count)
const upvotes = sorted.map((g) => g.upvote_count)
return {
backgroundColor: CHART_THEME.bg,
@@ -28,8 +26,9 @@ function buildOption(games: TrendingGame[]): EChartsOption {
backgroundColor: "#1a1225",
borderColor: CHART_THEME.border,
textStyle: { color: CHART_THEME.text },
formatter: (params: any) => {
const idx = params[0].dataIndex
formatter: (params: unknown) => {
const p = params as { dataIndex: number }[]
const idx = p[0].dataIndex
const g = sorted[idx]
return `<div style="font-weight:600;margin-bottom:4px">${g.title}</div>
<div>Activity Score: <b>${g.activity_score}</b></div>