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,8 +1,8 @@
import {Component, effect, ElementRef, HostListener, inject, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {CommonModule} from '@angular/common';
import {forkJoin, from, Observable, Subject} from 'rxjs';
import {debounceTime, map, switchMap, takeUntil, timeout} from 'rxjs/operators';
import {forkJoin, from, Subject} from 'rxjs';
import {debounceTime, map, switchMap, takeUntil} from 'rxjs/operators';
import {PageTitleService} from "../../../shared/service/page-title.service";
import {CbxReaderService} from '../../book/service/cbx-reader.service';
import {BookService} from '../../book/service/book.service';
@@ -1058,7 +1058,7 @@ export class CbxReaderComponent implements OnInit, OnDestroy {
}
@HostListener('document:mouseleave', ['$event'])
onMouseLeave(event: MouseEvent): void {
onMouseLeave(): void {
this.visibilityManager.handleMouseLeave();
if (this.isMagnifierActive) {
this.hideMagnifier();
@@ -273,6 +273,7 @@ export class ReaderEventService {
}
private handleTouchStart(event: TouchEvent, _doc: Document): void {
void _doc;
if (event.touches.length !== 1) return;
const touch = event.touches[0];
@@ -424,12 +424,12 @@ export class EbookReaderComponent implements OnInit, OnDestroy {
}
@HostListener('document:mouseleave', ['$event'])
onMouseLeave(event: MouseEvent): void {
onMouseLeave(): void {
this.visibilityManager.handleMouseLeave();
}
@HostListener('window:resize', ['$event'])
onWindowResize(event: Event): void {
onWindowResize(): void {
this.visibilityManager.updateWindowHeight(window.innerHeight);
}
@@ -178,7 +178,7 @@ export class ReaderLeftSidebarService {
isSearching: false,
progress: 1
});
} catch (error) {
} catch {
this._searchState.update(current => ({...current, isSearching: false}));
}
}
@@ -219,7 +219,11 @@ export class PdfReaderComponent implements OnInit, OnDestroy {
}
const serialized = this.pdfViewerService.getSerializedAnnotations();
if (serialized && serialized.length > 0) {
const cleaned = serialized.map(({id, ...rest}: any) => rest);
const cleaned = serialized.map((annotation: any) => {
const {id, ...rest} = annotation;
void id;
return rest;
});
const data = JSON.stringify(cleaned);
this.pdfAnnotationService.saveAnnotations(this.bookId, data).subscribe();
}