fix(ui): restore frontend verification after eslint cleanup
- Reader and metadata typing: - align ebook and cbx reader event, progress, dialog, and helper types with the stricter checks surfaced by the ESLint cleanup - replace unsafe non-null assertions and broad event assumptions with guarded access in reader, metadata, and shelf flows - Template and component compatibility: - tighten menu item typing for Angular template checking and normalize overlay and card click handlers to use explicit DOM event types - repair chart, preferences, and websocket factory typings that broke standalone typecheck and production build validation - Tests: - fix the magic shelf form-array assertion so the frontend test suite compiles cleanly under the stricter checker - Validation: - `just ui check` - `just ui typecheck` - `just ui test`
This commit is contained in:
+2
-4
@@ -6,8 +6,6 @@ import {ChartConfiguration, ChartData} from 'chart.js';
|
||||
import {BookService} from '../../../../../book/service/book.service';
|
||||
import {TranslocoDirective, TranslocoService} from '@jsverse/transloco';
|
||||
|
||||
type ReadingDebtChartData = ChartData<'bar' | 'line', number[], string>;
|
||||
|
||||
@Component({
|
||||
selector: 'app-reading-debt-chart',
|
||||
standalone: true,
|
||||
@@ -31,7 +29,7 @@ export class ReadingDebtChartComponent {
|
||||
public currentBacklog = 0;
|
||||
public trend = '';
|
||||
|
||||
public chartData: ReadingDebtChartData = {labels: [], datasets: []};
|
||||
public chartData: ChartData<'bar', number[], string> = {labels: [], datasets: []};
|
||||
|
||||
public chartOptions: ChartConfiguration<'bar'>['options'] = {
|
||||
responsive: true,
|
||||
@@ -159,7 +157,7 @@ export class ReadingDebtChartComponent {
|
||||
tension: 0.3,
|
||||
yAxisID: 'y1',
|
||||
order: 1
|
||||
} as ReadingDebtChartData['datasets'][number]
|
||||
} as unknown as ChartData<'bar', number[], string>['datasets'][number]
|
||||
]
|
||||
};
|
||||
this.hasData = true;
|
||||
|
||||
Reference in New Issue
Block a user