From d1aa34731b1deea62e27c820ee99221e2dd1137f Mon Sep 17 00:00:00 2001 From: dw-0 Date: Sat, 12 Oct 2024 20:25:16 +0200 Subject: [PATCH] refactor: re-introduce previously removed parameters, mark them as intentionally unused Signed-off-by: Dominik Willner --- apps/api/src/app/account/create-account.dto.ts | 2 +- apps/api/src/app/account/update-account.dto.ts | 2 +- apps/api/src/app/auth/google.strategy.ts | 8 +++++++- .../benchmark-comparator.component.ts | 4 ++-- .../investment-chart/investment-chart.component.ts | 4 ++-- libs/common/src/lib/chart-helper.ts | 2 +- libs/ui/src/lib/line-chart/line-chart.component.ts | 4 ++-- 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/api/src/app/account/create-account.dto.ts b/apps/api/src/app/account/create-account.dto.ts index 252f6b043..b331d4ec7 100644 --- a/apps/api/src/app/account/create-account.dto.ts +++ b/apps/api/src/app/account/create-account.dto.ts @@ -36,6 +36,6 @@ export class CreateAccountDto { name: string; @IsString() - @ValidateIf((value) => value !== null) + @ValidateIf((_object, value) => value !== null) platformId: string | null; } diff --git a/apps/api/src/app/account/update-account.dto.ts b/apps/api/src/app/account/update-account.dto.ts index 0f54b0fcb..3a721d873 100644 --- a/apps/api/src/app/account/update-account.dto.ts +++ b/apps/api/src/app/account/update-account.dto.ts @@ -35,6 +35,6 @@ export class UpdateAccountDto { name: string; @IsString() - @ValidateIf((value) => value !== null) + @ValidateIf((_object, value) => value !== null) platformId: string | null; } diff --git a/apps/api/src/app/auth/google.strategy.ts b/apps/api/src/app/auth/google.strategy.ts index 611e8a2a5..98dd9eac1 100644 --- a/apps/api/src/app/auth/google.strategy.ts +++ b/apps/api/src/app/auth/google.strategy.ts @@ -25,7 +25,13 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { }); } - public async validate(profile: Profile, done: Function) { + public async validate( + _request: any, + _token: string, + _refreshToken: string, + profile: Profile, + done: Function + ) { try { const jwt = await this.authService.validateOAuthLogin({ provider: Provider.GOOGLE, diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts index 3abf55d2d..dc80b4058 100644 --- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts +++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts @@ -29,9 +29,9 @@ import { SymbolProfile } from '@prisma/client'; import { Chart, ChartData, + LinearScale, LineController, LineElement, - LinearScale, PointElement, TimeScale, Tooltip, @@ -75,7 +75,7 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy { Tooltip ); - Tooltip.positioners['top'] = (position: TooltipPosition) => + Tooltip.positioners['top'] = (_elements, position: TooltipPosition) => getTooltipPositionerMapTop(this.chart, position); } diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index 327784a82..e84032060 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -29,9 +29,9 @@ import { BarElement, Chart, ChartData, + LinearScale, LineController, LineElement, - LinearScale, PointElement, TimeScale, Tooltip, @@ -80,7 +80,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { Tooltip ); - Tooltip.positioners['top'] = (position: TooltipPosition) => + Tooltip.positioners['top'] = (_elements, position: TooltipPosition) => getTooltipPositionerMapTop(this.chart, position); } diff --git a/libs/common/src/lib/chart-helper.ts b/libs/common/src/lib/chart-helper.ts index 047a02a82..4181ebbbf 100644 --- a/libs/common/src/lib/chart-helper.ts +++ b/libs/common/src/lib/chart-helper.ts @@ -103,7 +103,7 @@ export function getVerticalHoverLinePlugin( colorScheme?: ColorScheme ) { return { - afterDatasetsDraw: (chart, options) => { + afterDatasetsDraw: (chart, _, options) => { const active = chart.getActiveElements(); if (!active || active.length === 0) { diff --git a/libs/ui/src/lib/line-chart/line-chart.component.ts b/libs/ui/src/lib/line-chart/line-chart.component.ts index f35c01382..e48ead9d9 100644 --- a/libs/ui/src/lib/line-chart/line-chart.component.ts +++ b/libs/ui/src/lib/line-chart/line-chart.component.ts @@ -27,9 +27,9 @@ import { import { Chart, Filler, + LinearScale, LineController, LineElement, - LinearScale, PointElement, TimeScale, Tooltip, @@ -86,7 +86,7 @@ export class GfLineChartComponent Tooltip ); - Tooltip.positioners['top'] = (position: TooltipPosition) => + Tooltip.positioners['top'] = (_elements, position: TooltipPosition) => getTooltipPositionerMapTop(this.chart, position); }