chore(deps): upgrade major dependencies (ESLint 10, recharts 3, TS 6, Vite 8) (#130)

* chore(deps): upgrade ESLint 9 → 10 with plugin compatibility fixes

- eslint: ^9 → ^10.0.0 (backend + frontend)
- @eslint/js: ^9 → ^10.0.0 (backend + frontend)
- eslint-plugin-react-refresh: ^0.4.24 → ^0.5.2 (ESM, config factory API)
- Update frontend eslint.config.js: destructured import for react-refresh,
  call configs.vite() as factory function (0.5 API change)
- Downgrade new ESLint 10 rules (no-useless-assignment, preserve-caught-error)
  to warnings for existing code patterns
- eslint-plugin-react-hooks stays at 7.0.1 (stable) with --legacy-peer-deps
  until a stable release adds ESLint 10 peer support

* chore(deps): upgrade recharts 2.x to 3.8 with chart.tsx type fixes

recharts 3.x moved Tooltip/Legend props to context-based API.
Updated chart.tsx to use explicit prop interfaces with internal
recharts type imports (LegendPayload, TooltipPayload, TooltipFormatter).

* chore(deps): upgrade TypeScript 5.9 to 6.0

- Remove deprecated baseUrl from frontend tsconfig (paths works standalone in TS 6)
- Add react-is dependency required by recharts 3.x at build time
- Backend and frontend both compile and lint cleanly

* chore(deps): upgrade Vite 7.3 to 8.0 and @vitejs/plugin-react to 6.0

Vite 8 replaces Rollup+esbuild with Rolldown, significantly improving
build speed (~2s vs ~18s). No config changes required.

* fix(ci): add .npmrc with legacy-peer-deps for CI and Docker builds

typescript-eslint@8.x requires typescript <6.0.0 and
eslint-plugin-react-hooks@7.0.1 requires eslint <=9. Until upstream
packages release compatible versions, legacy-peer-deps is needed.

* docs: add logo assets and re-ignore CLAUDE.md

* fix(ci): copy .npmrc into prod-deps Docker stage

The prod-deps stage also runs npm ci with backend/package.json but was
missing the .npmrc needed to bypass peer dep conflicts.
This commit is contained in:
Anso
2026-03-25 00:03:08 -04:00
committed by GitHub
parent e39cd386b2
commit 68a1dbe671
16 changed files with 826 additions and 2698 deletions
+29 -15
View File
@@ -1,5 +1,12 @@
import * as React from "react"
import * as RechartsPrimitive from "recharts"
import type { LegendPayload } from "recharts/types/component/DefaultLegendContent"
import type {
NameType,
ValueType,
Payload as TooltipPayload,
Formatter as TooltipFormatter,
} from "recharts/types/component/DefaultTooltipContent"
import { cn } from "@/lib/utils"
@@ -102,14 +109,20 @@ const ChartTooltip = RechartsPrimitive.Tooltip
const ChartTooltipContent = React.forwardRef<
HTMLDivElement,
React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
React.ComponentProps<"div"> & {
hideLabel?: boolean
hideIndicator?: boolean
indicator?: "line" | "dot" | "dashed"
nameKey?: string
labelKey?: string
}
React.ComponentProps<"div"> & {
active?: boolean
payload?: TooltipPayload<ValueType, NameType>[]
label?: string | number
labelFormatter?: (label: string | number, payload: TooltipPayload<ValueType, NameType>[]) => React.ReactNode
labelClassName?: string
formatter?: TooltipFormatter<ValueType, NameType>
color?: string
hideLabel?: boolean
hideIndicator?: boolean
indicator?: "line" | "dot" | "dashed"
nameKey?: string
labelKey?: string
}
>(
(
{
@@ -147,7 +160,7 @@ const ChartTooltipContent = React.forwardRef<
if (labelFormatter) {
return (
<div className={cn("font-medium", labelClassName)}>
{labelFormatter(value, payload)}
{labelFormatter(value as string | number, payload!)}
</div>
)
}
@@ -192,7 +205,7 @@ const ChartTooltipContent = React.forwardRef<
return (
<div
key={item.dataKey}
key={String(item.dataKey)}
className={cn(
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
indicator === "dot" && "items-center"
@@ -260,11 +273,12 @@ const ChartLegend = RechartsPrimitive.Legend
const ChartLegendContent = React.forwardRef<
HTMLDivElement,
React.ComponentProps<"div"> &
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
hideIcon?: boolean
nameKey?: string
}
React.ComponentProps<"div"> & {
payload?: LegendPayload[]
verticalAlign?: "top" | "bottom" | "middle"
hideIcon?: boolean
nameKey?: string
}
>(
(
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey },