chore(ui): clear eslint empty-function bucket

- Frontend lifecycle cleanup:
  - remove empty `ngOnInit` stubs and redundant `OnInit` implementations from components that already initialize through signals or effects
  - drop related unused injections that only supported those empty hooks
- No-op handling:
  - replace empty catch and callback blocks with explicit no-op expressions or early returns so the existing behavior stays unchanged while satisfying lint
  - keep silent failure paths silent where the UI intentionally ignores those errors today
- Validation:
  - ran `just ui lint` and cleared the empty lifecycle, empty function, and `no-empty` 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 0d6f83bed0
commit 5dfd1e18d9
13 changed files with 20 additions and 58 deletions
@@ -1,4 +1,4 @@
import {Component, inject, OnInit, ViewChild, effect} from '@angular/core';
import {Component, inject, ViewChild, effect} from '@angular/core';
import {FileSelectEvent, FileUpload, FileUploadHandlerEvent} from 'primeng/fileupload';
import {Button} from 'primeng/button';
import {FormsModule} from '@angular/forms';
@@ -43,7 +43,7 @@ type FileRemoveCallback = (event: Event, index: number) => void;
templateUrl: './book-uploader.component.html',
styleUrl: './book-uploader.component.scss'
})
export class BookUploaderComponent implements OnInit {
export class BookUploaderComponent {
@ViewChild(FileUpload) fileUpload!: FileUpload;
files: UploadingFile[] = [];
@@ -84,9 +84,6 @@ export class BookUploaderComponent implements OnInit {
this.maxFileSizeDisplay = `${maxSizeMb} MB`;
});
ngOnInit(): void {
}
get selectedLibrary(): Library | null {
return this._selectedLibrary;
}
@@ -16,6 +16,7 @@ export class LocalStorageService {
try {
localStorage.setItem(key, JSON.stringify(value));
} catch {
return;
}
}
@@ -11,7 +11,7 @@ export class StartupService {
load(): Promise<void> {
if (this.authService.token()) {
return this.queryClient.fetchQuery(this.userService.getUserQueryOptions()).then(() => {});
return this.queryClient.fetchQuery(this.userService.getUserQueryOptions()).then(() => undefined);
}
return Promise.resolve();