Conversation
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: size-xs Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…and src/browser/ Replace all `any` types with proper typed alternatives: - D3 force simulation callbacks use proper node/link interfaces - Chart.js tooltip contexts use structural types - Global library declarations use typed imports - Record<string, any> replaced with Record<string, unknown> or Record<string, string> - Error catches use `unknown` type - (globalThis as any).X replaced with typed casts Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/78aa95e5-f033-4691-91f3-a8f29e9bcd60 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…ts, fix typedoc config - Promote @typescript-eslint/no-explicit-any from warn to error - Promote no-unused-vars from warn to error - Add missing script subdirectory entry points to knip.json - Add csv and markdown to typedoc highlight languages - Fix ChartConstructor type to accept HTMLCanvasElement - Remove duplicate ChartTooltipContext export from global-libs.ts - All 3327 tests pass, build succeeds, lint is clean Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/78aa95e5-f033-4691-91f3-a8f29e9bcd60 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
|
@copilot analyse and improve failing checks |
…ination - global-libs.ts: import ChartInstance from chart.js, add Defaults type for Chart.defaults, add PapaParseResult with errors field - Export ChartConstructor for reuse in all dashboard files - All dashboards: replace inline ChartConstructor type with import from global-libs.ts - Fix Chart instances stored as `Record<string, unknown>` → `Record<string, ChartLike>` (anomaly-detection, committees, election-cycle) - coalition-dashboard: add PartyNode type alias, use forceSimulation/forceLink generics, d3.drag<SVGGElement,PartyNode>(), fix PapaParse type for header:true, fix source.id string|object narrowing - committees-dashboard: use d3.forceSimulation<NetworkNode>/forceLink<NetworkNode,NetworkLink> generics, d3.drag<SVGGElement,NetworkNode>(), fix svg/simulation types with definite-assignment, fix catch error cast, fix string|0 parseFloat, fix CSVRow/ChartLike imports - election-cycle: fix PapaParse type for header:true, fix scaleBand ?? 0 fallback, fix bubble tooltip raw cast - ministry-dashboard: fix scaleThreshold<number,string>(), fix tooltip Selection<HTMLDivElement> type - party-dashboard: fix pie chart tooltip context (parsed: number, dataset with data[]) - politician-dashboard: double-assert BubblePoint via unknown - risk-dashboard: fix d3.zoom<SVGSVGElement,unknown>(), rules as string[], xScale(String(d.rule)) ?? 0, dispatch cancelable:true, forEach string type Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/82b8214d-3f98-4004-a10b-1c3c691bd3c7 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Fixed in commit
All 3327 tests pass, build succeeds, zero ESLint errors. |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
global-libs.ts: use actualChartInstancereturn type fromchart.js, addDefaultstype forChart.defaults, addPapaParseResultgeneric witherrorsfieldChartConstructorfromglobal-libs.tsinstead of duplicated inline typeRecord<string, unknown>→Record<string, ChartLike>) in anomaly-detection, committees, election-cyclecoalition-dashboard.ts:PartyNodealias,forceSimulation<CoalitionNode>,forceLink<CoalitionNode, CoalitionLink>,d3.drag<SVGGElement, PartyNode>(), PapaParseheader:truereturn type,source.idnarrowingcommittees-dashboard.ts: D3 simulation/drag generics, definite-assignment svg/simulation, catch cast, string-or-0, scaleBand?? 0election-cycle.ts: PapaParse type, scaleBand?? 0, bubble tooltip castministry-dashboard.ts:scaleThreshold<number,string>(), tooltipSelection<HTMLDivElement>party-dashboard.ts: pie tooltipparsed: number,dataset.data[]politician-dashboard.ts: double-assertBubblePointviaunknownrisk-dashboard.ts:d3.zoom<SVGSVGElement, unknown>(),rulesasstring[],dispatchwithcancelable