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:
+2
-10
@@ -7,13 +7,6 @@ import {BookService} from '../../../../../book/service/book.service';
|
||||
import {Book} from '../../../../../book/model/book.model';
|
||||
import {TranslocoDirective, TranslocoService} from '@jsverse/transloco';
|
||||
|
||||
interface ScoreRange {
|
||||
label: string;
|
||||
min: number;
|
||||
max: number;
|
||||
color: string;
|
||||
}
|
||||
|
||||
interface ScoreStats {
|
||||
range: string;
|
||||
count: number;
|
||||
@@ -22,10 +15,9 @@ interface ScoreStats {
|
||||
}
|
||||
|
||||
type ScoreChartData = ChartData<'doughnut', number[], string>;
|
||||
type ScoreRangeKey = 'excellent' | 'good' | 'fair' | 'poor' | 'veryPoor';
|
||||
|
||||
const SCORE_RANGE_KEYS = ['excellent', 'good', 'fair', 'poor', 'veryPoor'] as const;
|
||||
|
||||
const SCORE_RANGE_DEFS: { key: typeof SCORE_RANGE_KEYS[number]; min: number; max: number; color: string }[] = [
|
||||
const SCORE_RANGE_DEFS: { key: ScoreRangeKey; min: number; max: number; color: string }[] = [
|
||||
{key: 'excellent', min: 90, max: 100, color: '#16A34A'},
|
||||
{key: 'good', min: 70, max: 89, color: '#22C55E'},
|
||||
{key: 'fair', min: 50, max: 69, color: '#F59E0B'},
|
||||
|
||||
+1
-1
@@ -334,7 +334,7 @@ export class PublicationTimelineChartComponent {
|
||||
|
||||
// Rarity Score: % of books in decades with fewer than 3 books
|
||||
let rareBooks = 0;
|
||||
for (const [_, count] of decadeCounts) {
|
||||
for (const count of decadeCounts.values()) {
|
||||
if (count < 3) rareBooks += count;
|
||||
}
|
||||
const rarityScore = years.length > 0 ? Math.round((rareBooks / years.length) * 100) : 0;
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ export class RatingTasteChartComponent {
|
||||
};
|
||||
|
||||
const datasets = Array.from(dataPoints.entries())
|
||||
.filter(([_, points]) => points.length > 0)
|
||||
.filter(([, points]) => points.length > 0)
|
||||
.map(([label, points]) => ({
|
||||
label: `${label} (${points.length})`,
|
||||
data: points,
|
||||
|
||||
Reference in New Issue
Block a user