Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ananthakumaran committed Jan 3, 2024
1 parent ade496f commit f4e82d8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 12 deletions.
10 changes: 8 additions & 2 deletions src/lib/gain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,14 @@ export function renderAccountOverview(points: Networth[], postings: Posting[], i
const hoverCircle = layer.append("circle").attr("r", "3").attr("fill", "none");
const t = tippy(hoverCircle.node(), { theme: "light", delay: 0, allowHTML: true });

const balanceVoronoiPoints = _.map(points, (d) => [x(d.date), y(d.balanceAmount)]);
const investmentVoronoiPoints = _.map(points, (d) => [x(d.date), y(d.netInvestmentAmount)]);
const balanceVoronoiPoints: Delaunay.Point[] = _.map(points, (d) => [
x(d.date),
y(d.balanceAmount)
]);
const investmentVoronoiPoints: Delaunay.Point[] = _.map(points, (d) => [
x(d.date),
y(d.netInvestmentAmount)
]);
const voronoi = Delaunay.from(balanceVoronoiPoints.concat(investmentVoronoiPoints)).voronoi([
0,
0,
Expand Down
5 changes: 4 additions & 1 deletion src/lib/goals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ export function renderProgress(
.attr("cx", (p) => x(p.date))
.attr("cy", (p) => y(p.value));

const voronoiPoints = _.map(points.concat(predictions), (p) => [x(p.date), y(p.value)]);
const voronoiPoints: Delaunay.Point[] = _.map(points.concat(predictions), (p) => [
x(p.date),
y(p.value)
]);
const voronoi = Delaunay.from(voronoiPoints).voronoi([0, 0, width, height]);
const hoverCircle = g.append("circle").attr("r", "3").attr("fill", "none");
const t = tippy(hoverCircle.node(), { theme: "light", delay: 0, allowHTML: true });
Expand Down
7 changes: 5 additions & 2 deletions src/lib/networth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ export function renderNetworth(
const hoverCircle = layer.append("circle").attr("r", "3").attr("fill", "none");
const t = tippy(hoverCircle.node(), { theme: "light", delay: 0, allowHTML: true });

const networthVoronoiPoints = _.map(points, (d) => [x(d.date), y(networth(d))]);
const investmentVoronoiPoints = _.map(points, (d) => [x(d.date), y(investment(d))]);
const networthVoronoiPoints: Delaunay.Point[] = _.map(points, (d) => [x(d.date), y(networth(d))]);
const investmentVoronoiPoints: Delaunay.Point[] = _.map(points, (d) => [
x(d.date),
y(investment(d))
]);
const voronoi = Delaunay.from(networthVoronoiPoints.concat(investmentVoronoiPoints)).voronoi([
0,
0,
Expand Down
5 changes: 4 additions & 1 deletion src/lib/savings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ export function renderProgress(
.attr("cx", (p) => x(p.date))
.attr("cy", (p) => y(p.value));

const voronoiPoints = _.map(points.concat(predictions), (p) => [x(p.date), y(p.value)]);
const voronoiPoints: Delaunay.Point[] = _.map(points.concat(predictions), (p) => [
x(p.date),
y(p.value)
]);
const voronoi = Delaunay.from(voronoiPoints).voronoi([0, 0, width, height]);
const hoverCircle = g.append("circle").attr("r", "3").attr("fill", "none");
const t = tippy(hoverCircle.node(), { theme: "light", delay: 0, allowHTML: true });
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/assets/gain/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
? COLORS.loss
: COLORS.secondary
: posting.account.startsWith("Income:CapitalGains")
? COLORS.gain
: COLORS.tertiary}
? COLORS.gain
: COLORS.tertiary}
/>
{/each}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/more/goals/retirement/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@
? COLORS.lossText
: COLORS.gainText
: posting.account.startsWith("Income:CapitalGains")
? COLORS.gainText
: COLORS.lossText}
? COLORS.gainText
: COLORS.lossText}
/>
{/each}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/more/goals/savings/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@
? COLORS.lossText
: COLORS.gainText
: posting.account.startsWith("Income:CapitalGains")
? COLORS.gainText
: COLORS.lossText}
? COLORS.gainText
: COLORS.lossText}
/>
{/each}
</div>
Expand Down

0 comments on commit f4e82d8

Please sign in to comment.