From d305b5c6bc92dbfa254858c0deab02817836d663 Mon Sep 17 00:00:00 2001 From: arsforza Date: Thu, 21 Sep 2023 16:24:58 +0200 Subject: [PATCH] fix: lint --- .../IBF-dashboard/src/app/auth/auth.guard.ts | 4 ++-- .../IBF-dashboard/src/app/auth/auth.service.ts | 2 +- .../app/components/tooltip/tooltip.component.ts | 2 +- interfaces/IBF-dashboard/src/shared/utils.ts | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts b/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts index 85fe8b45e..b93371284 100644 --- a/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts +++ b/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts @@ -25,10 +25,10 @@ export class AuthGuard implements CanActivate { | UrlTree { const url: string = state.url; - return this.checkLogin(url, next); + return this.checkLogin(url); } - checkLogin(url: string, route: ActivatedRouteSnapshot): boolean { + checkLogin(url: string): boolean { if (this.authService.isLoggedIn()) { return true; } diff --git a/interfaces/IBF-dashboard/src/app/auth/auth.service.ts b/interfaces/IBF-dashboard/src/app/auth/auth.service.ts index 0d3f1c853..373ae3823 100644 --- a/interfaces/IBF-dashboard/src/app/auth/auth.service.ts +++ b/interfaces/IBF-dashboard/src/app/auth/auth.service.ts @@ -151,7 +151,7 @@ export class AuthService implements OnDestroy { .subscribe(this.onPasswordChanged, this.onChangePasswordError); } - private onPasswordChanged = async (res) => { + private onPasswordChanged = async () => { const toast = await this.toastController.create({ message: `Password changed successfully`, duration: 5000, diff --git a/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts b/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts index 8fa7126a0..5e404f8c1 100644 --- a/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts @@ -26,6 +26,6 @@ export class TooltipComponent { }); await popover.present(); - const { role } = await popover.onDidDismiss(); + await popover.onDidDismiss(); } } diff --git a/interfaces/IBF-dashboard/src/shared/utils.ts b/interfaces/IBF-dashboard/src/shared/utils.ts index 93bdcd853..a2f942c97 100644 --- a/interfaces/IBF-dashboard/src/shared/utils.ts +++ b/interfaces/IBF-dashboard/src/shared/utils.ts @@ -1,16 +1,16 @@ // sort array ascending const asc = (arr) => arr.sort((a, b) => a - b); -const sum = (arr) => arr.reduce((a, b) => a + b, 0); +// const sum = (arr) => arr.reduce((a, b) => a + b, 0); -const mean = (arr) => sum(arr) / arr.length; +// const mean = (arr) => sum(arr) / arr.length; // sample standard deviation -const std = (arr) => { - const mu = mean(arr); - const diffArr = arr.map((a) => (a - mu) ** 2); - return Math.sqrt(sum(diffArr) / (arr.length - 1)); -}; +// const std = (arr) => { +// const mu = mean(arr); +// const diffArr = arr.map((a) => (a - mu) ** 2); +// return Math.sqrt(sum(diffArr) / (arr.length - 1)); +// }; export const quantile = (arr, q) => { const sorted = asc(arr);