chore(ui): clear eslint mechanical style bucket

Replace loose template null checks with strict null and undefined comparisons and convert the remaining simple index loops to for-of iteration.

Keep behavior intact while clearing the low-risk mechanical lint backlog in templates and chart helpers.

Validation: just ui lint
This commit is contained in:
James Cox
2026-04-22 17:26:48 -04:00
committed by Zach Yale
parent 18784fd12d
commit ea15719b6c
7 changed files with 20 additions and 21 deletions
@@ -310,8 +310,7 @@ export class PublicationTimelineChartComponent {
// Golden Era: best 20-year window
let goldenEra = {start: 0, end: 0, count: 0};
if (years.length > 0) {
for (let i = 0; i < years.length; i++) {
const windowStart = years[i];
for (const windowStart of years) {
const windowEnd = windowStart + 19;
const windowCount = years.filter(y => y >= windowStart && y <= windowEnd).length;
if (windowCount > goldenEra.count) {
@@ -275,10 +275,10 @@ export class ReadingSessionTimelineComponent implements OnInit {
sessions.forEach(session => {
let placed = false;
for (let i = 0; i < tracks.length; i++) {
const lastSessionInTrack = tracks[i][tracks[i].length - 1];
for (const track of tracks) {
const lastSessionInTrack = track[track.length - 1];
if (session.startTime >= lastSessionInTrack.endTime) {
tracks[i].push(session);
track.push(session);
placed = true;
break;
}