From 0243bea419915f44e0241c4153970fc21738260c Mon Sep 17 00:00:00 2001 From: dw-0 Date: Thu, 24 Oct 2024 16:57:20 +0200 Subject: [PATCH] fix: @typescript-eslint/no-empty-function Signed-off-by: Dominik Willner --- .eslintrc.json | 1 - apps/api/src/app/health/health.controller.ts | 3 --- .../admin-market-data/admin-market-data.component.ts | 6 +++--- .../admin-market-data/admin-market-data.service.ts | 3 +-- .../asset-profile-dialog/asset-profile-dialog.component.ts | 4 ++-- apps/client/src/app/services/user/user.service.ts | 2 +- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d3f7edea9..cdda2a982 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -144,7 +144,6 @@ // and can be remove once solved "@typescript-eslint/consistent-type-definitions": "warn", "@typescript-eslint/prefer-function-type": "warn", - "@typescript-eslint/no-empty-function": "warn", "@typescript-eslint/prefer-nullish-coalescing": "warn", // TODO: Requires strictNullChecks: true "@typescript-eslint/consistent-type-assertions": "warn", "@typescript-eslint/prefer-optional-chain": "warn", diff --git a/apps/api/src/app/health/health.controller.ts b/apps/api/src/app/health/health.controller.ts index 31bdb2e8f..40473d3c6 100644 --- a/apps/api/src/app/health/health.controller.ts +++ b/apps/api/src/app/health/health.controller.ts @@ -16,9 +16,6 @@ import { HealthService } from './health.service'; export class HealthController { public constructor(private readonly healthService: HealthService) {} - @Get() - public async getHealth() {} - @Get('data-enhancer/:name') public async getHealthOfDataEnhancer(@Param('name') name: string) { const hasResponse = diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts index d833ba7dd..777a08d6c 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.component.ts @@ -264,7 +264,7 @@ export class AdminMarketDataComponent this.adminService .gatherProfileData() .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + .subscribe(); } public onGatherProfileDataBySymbol({ @@ -274,14 +274,14 @@ export class AdminMarketDataComponent this.adminService .gatherProfileDataBySymbol({ dataSource, symbol }) .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + .subscribe(); } public onGatherSymbol({ dataSource, symbol }: AssetProfileIdentifier) { this.adminService .gatherSymbol({ dataSource, symbol }) .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + .subscribe(); } public onOpenAssetProfileDialog({ diff --git a/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts b/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts index 9695dc2a2..86965cd8a 100644 --- a/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts +++ b/apps/client/src/app/components/admin-market-data/admin-market-data.service.ts @@ -59,10 +59,9 @@ export class AdminMarketDataService { }), finalize(() => { window.location.reload(); - setTimeout(() => {}, 300); }) ) - .subscribe(() => {}); + .subscribe(); }, confirmType: ConfirmationDialogType.Warn, title: $localize`Do you really want to delete these profiles?` diff --git a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts index 7cb3aac08..aacf387e7 100644 --- a/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts +++ b/apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts @@ -190,14 +190,14 @@ export class AssetProfileDialog implements OnDestroy, OnInit { this.adminService .gatherProfileDataBySymbol({ dataSource, symbol }) .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + .subscribe(); } public onGatherSymbol({ dataSource, symbol }: AssetProfileIdentifier) { this.adminService .gatherSymbol({ dataSource, symbol }) .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + .subscribe(); } public onImportHistoricalData() { diff --git a/apps/client/src/app/services/user/user.service.ts b/apps/client/src/app/services/user/user.service.ts index eef0b2f41..a36f2a850 100644 --- a/apps/client/src/app/services/user/user.service.ts +++ b/apps/client/src/app/services/user/user.service.ts @@ -114,7 +114,7 @@ export class UserService extends ObservableStore { dialogRef .afterClosed() .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe(() => {}); + .subscribe(); } return user;