Skip to content

Commit 0a08b45

Browse files
authored
build: add typescript no-unused checks (#1893)
Signed-off-by: Jakob Steiner <jakob.steiner@glasskube.eu>
1 parent c0379c9 commit 0a08b45

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

frontend/ui/src/app/app.routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const jwtParamRedirectGuard: CanActivateFn = (route: ActivatedRouteSnapshot) =>
4848
}
4949
};
5050

51-
const jwtAuthGuard: CanActivateFn = (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
51+
const jwtAuthGuard: CanActivateFn = (_: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
5252
const auth = inject(AuthService);
5353
const router = inject(Router);
5454
const claims = auth.getClaims();

frontend/ui/src/app/components/nav-bar/nav-bar.component.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,10 @@ import {DialogRef, OverlayService} from '../../services/overlay.service';
3737
import {SidebarService} from '../../services/sidebar.service';
3838
import {ToastService} from '../../services/toast.service';
3939
import {UsersService} from '../../services/users.service';
40-
import {Organization, OrganizationWithUserRole} from '../../types/organization';
40+
import {Organization} from '../../types/organization';
4141
import {ColorSchemeSwitcherComponent} from '../color-scheme-switcher/color-scheme-switcher.component';
4242
import {NavBarSubscriptionBannerComponent} from './nav-bar-subscription-banner/nav-bar-subscription-banner.component';
4343

44-
type SwitchOptions = {
45-
currentOrg: Organization;
46-
availableOrgs: OrganizationWithUserRole[];
47-
isVendorSomewhere: boolean;
48-
};
49-
5044
@Component({
5145
selector: 'app-nav-bar',
5246
standalone: true,

frontend/ui/src/app/deployments/deployment-targets.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ import {DeploymentModalComponent} from './deployment-modal.component';
3434
import {DeploymentTargetCardComponent} from './deployment-target-card/deployment-target-card.component';
3535
import {DeploymentWizardComponent} from './deployment-wizard/deployment-wizard.component';
3636

37-
type DeploymentWithNewerVersion = {dt: DeploymentTarget; d: DeploymentWithLatestRevision; version: ApplicationVersion};
38-
3937
export interface DeploymentTargetViewData extends DeploymentTarget {
4038
metrics?: DeploymentTargetLatestMetrics;
4139
}

frontend/ui/src/app/password-reset/password-reset.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Component, inject} from '@angular/core';
22
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from '@angular/forms';
3-
import {Router} from '@angular/router';
43
import {firstValueFrom, lastValueFrom} from 'rxjs';
54
import {getFormDisplayedError} from '../../util/errors';
65
import {AuthService} from '../services/auth.service';
@@ -14,7 +13,6 @@ import {SettingsService} from '../services/settings.service';
1413
export class PasswordResetComponent {
1514
private readonly settings = inject(SettingsService);
1615
private readonly auth = inject(AuthService);
17-
private readonly router = inject(Router);
1816

1917
public readonly form = new FormGroup(
2018
{

frontend/ui/tsconfig.app.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"extends": "../../tsconfig.json",
55
"compilerOptions": {
66
"outDir": "../../out-tsc/app",
7-
"types": []
7+
"types": [],
8+
"noUnusedLocals": true,
9+
"noUnusedParameters": true
810
},
911
"files": [
1012
"src/main.ts"

0 commit comments

Comments
 (0)