chore(ui): clear eslint no-unused-vars bucket

- Frontend lint cleanup:
  - remove unused imports, constants, locals, and callback parameters across the UI codebase
  - keep template and callback signatures intact where bindings still pass event arguments by explicitly consuming the values instead of changing behavior
- Metadata and reader surfaces:
  - trim dead symbols in the metadata editor, viewer, search, and reader flows without mixing in broader refactors
  - preserve existing runtime behavior while tightening the code paths that the ESLint bucket touches
- Validation:
  - ran `just ui lint` and cleared the `@typescript-eslint/no-unused-vars` bucket; the command still fails on the remaining ESLint backlog
  - ran `just ui check`; deps and typecheck pass, and the remaining failure is the outstanding ESLint backlog
This commit is contained in:
James Cox
2026-04-22 17:26:47 -04:00
committed by Zach Yale
parent c0dff27f78
commit 0d6f83bed0
38 changed files with 56 additions and 75 deletions
@@ -1,6 +1,5 @@
import {HttpErrorResponse, HttpEvent, HttpHandlerFn, HttpInterceptorFn, HttpRequest} from '@angular/common/http';
import {inject} from '@angular/core';
import {Router} from '@angular/router';
import {catchError, filter, switchMap, take} from 'rxjs/operators';
import {BehaviorSubject, Observable, throwError} from 'rxjs';
import {AuthService} from '../../shared/service/auth.service';
@@ -8,7 +7,6 @@ import {API_CONFIG} from '../config/api-config';
export const AuthInterceptorService: HttpInterceptorFn = (req, next: HttpHandlerFn) => {
const authService = inject(AuthService);
const router = inject(Router);
const token = authService.getInternalAccessToken();
const isApiRequest = req.url.startsWith(`${API_CONFIG.BASE_URL}/api/`);
@@ -18,7 +16,7 @@ export const AuthInterceptorService: HttpInterceptorFn = (req, next: HttpHandler
return next(authReq).pipe(
catchError((error: HttpErrorResponse) => {
if (error.status === 401) {
return handle401Error(authService, authReq, next, router);
return handle401Error(authService, authReq, next);
}
return throwError(() => error);
})
@@ -28,7 +26,7 @@ export const AuthInterceptorService: HttpInterceptorFn = (req, next: HttpHandler
let isRefreshing = false;
const refreshTokenSubject = new BehaviorSubject<string | null>(null);
function handle401Error(authService: AuthService, request: HttpRequest<unknown>, next: HttpHandlerFn, router: Router): Observable<HttpEvent<unknown>> {
function handle401Error(authService: AuthService, request: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>> {
if (!isRefreshing) {
isRefreshing = true;
refreshTokenSubject.next(null);
@@ -47,7 +45,7 @@ function handle401Error(authService: AuthService, request: HttpRequest<unknown>,
}),
catchError(err => {
isRefreshing = false;
forceLogout(authService, router);
forceLogout(authService);
return throwError(() => err);
})
);
@@ -64,6 +62,6 @@ function handle401Error(authService: AuthService, request: HttpRequest<unknown>,
);
}
function forceLogout(authService: AuthService, router: Router): void {
function forceLogout(authService: AuthService): void {
authService.logout();
}
+2 -2
View File
@@ -2,7 +2,7 @@ import {inject} from '@angular/core';
import {CanActivateFn, Router} from '@angular/router';
import {AuthService} from '../../shared/service/auth.service';
export const AuthGuard: CanActivateFn = (route, state) => {
export const AuthGuard: CanActivateFn = () => {
const router = inject(Router);
const authService = inject(AuthService);
@@ -20,7 +20,7 @@ export const AuthGuard: CanActivateFn = (route, state) => {
return false;
}
return true;
} catch (e) {
} catch {
localStorage.removeItem('accessToken_Internal');
router.navigate(['/login']);
return false;
@@ -2,8 +2,7 @@ import {inject, Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {firstValueFrom, Observable} from 'rxjs';
import {API_CONFIG} from '../config/api-config';
import {AppSettingsService, PublicAppSettings} from '../../shared/service/app-settings.service';
import {filter, take} from 'rxjs/operators';
import {AppSettingsService} from '../../shared/service/app-settings.service';
interface OidcPkceState {
codeVerifier: string;