Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
arsforza committed Sep 21, 2023
1 parent e5c1c8b commit d305b5c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions interfaces/IBF-dashboard/src/app/auth/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion interfaces/IBF-dashboard/src/app/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ export class TooltipComponent {
});
await popover.present();

const { role } = await popover.onDidDismiss();
await popover.onDidDismiss();
}
}
14 changes: 7 additions & 7 deletions interfaces/IBF-dashboard/src/shared/utils.ts
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit d305b5c

Please sign in to comment.