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:
+1
-2
@@ -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) {
|
||||
|
||||
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user