From 27c196d652ecc35127e0fad23f27064d36da60e6 Mon Sep 17 00:00:00 2001 From: Julian Lechner Date: Mon, 27 Apr 2026 18:14:05 +0200 Subject: [PATCH] fix: lint --- .claude/settings.local.json | 4 +--- src/app/home/home.component.spec.ts | 20 +++++++++++++------- src/app/imprint/imprint.component.spec.ts | 3 ++- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 1ce6f63..c3bcbdf 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,7 +1,5 @@ { "permissions": { - "allow": [ - "Bash(npx tsc *)" - ] + "allow": ["Bash(npx tsc *)"] } } diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts index 106d0d9..3e6cae7 100644 --- a/src/app/home/home.component.spec.ts +++ b/src/app/home/home.component.spec.ts @@ -173,7 +173,9 @@ describe('HomeComponent', (): void => { it('should advance the portrait index after 125 ms', fakeAsync((): void => { const zone = TestBed.inject(NgZone); - zone.runOutsideAngular((): void => { comp.showNextPortraitHighlight(); }); + zone.runOutsideAngular((): void => { + comp.showNextPortraitHighlight(); + }); tick(125); expect(comp.currentPortraitHighlightIndex).toBe(1); tick(125); @@ -182,7 +184,9 @@ describe('HomeComponent', (): void => { it('should reset isPortraitSwitching to false after 250 ms', fakeAsync((): void => { const zone = TestBed.inject(NgZone); - zone.runOutsideAngular((): void => { comp.showNextPortraitHighlight(); }); + zone.runOutsideAngular((): void => { + comp.showNextPortraitHighlight(); + }); tick(250); expect(comp.isPortraitSwitching).toBeFalse(); discardPeriodicTasks(); @@ -191,7 +195,9 @@ describe('HomeComponent', (): void => { it('should wrap portrait index from the last position back to 0', fakeAsync((): void => { comp.currentPortraitHighlightIndex = global.portraitHighlights.length - 1; const zone = TestBed.inject(NgZone); - zone.runOutsideAngular((): void => { comp.showNextPortraitHighlight(); }); + zone.runOutsideAngular((): void => { + comp.showNextPortraitHighlight(); + }); tick(125); expect(comp.currentPortraitHighlightIndex).toBe(0); tick(125); @@ -315,8 +321,8 @@ describe('HomeComponent', (): void => { document.body.appendChild(aboutEl); const el = fixture.nativeElement as HTMLElement; - const btn = Array.from(el.querySelectorAll('button')).find((b): boolean => - (b.textContent ?? '').trim() === 'About me', + const btn = Array.from(el.querySelectorAll('button')).find( + (b): boolean => (b.textContent ?? '').trim() === 'About me', ); btn?.click(); expect(scrollSpy).toHaveBeenCalled(); @@ -329,8 +335,8 @@ describe('HomeComponent', (): void => { document.body.appendChild(projectsEl); const el = fixture.nativeElement as HTMLElement; - const btn = Array.from(el.querySelectorAll('button')).find((b): boolean => - (b.textContent ?? '').trim() === 'View projects', + const btn = Array.from(el.querySelectorAll('button')).find( + (b): boolean => (b.textContent ?? '').trim() === 'View projects', ); btn?.click(); expect(scrollSpy).toHaveBeenCalled(); diff --git a/src/app/imprint/imprint.component.spec.ts b/src/app/imprint/imprint.component.spec.ts index 768148e..82b3144 100644 --- a/src/app/imprint/imprint.component.spec.ts +++ b/src/app/imprint/imprint.component.spec.ts @@ -177,7 +177,8 @@ describe('ImprintComponent', (): void => { }); it('should complete 500 normalizeText calls within 20 ms', (): void => { - const input = 'Ulmenstra\u00DFe \u00F6sterreich \u00E4hnlich \u00FCberall \u00C4gypten \u00DCbung'; + const input = + 'Ulmenstra\u00DFe \u00F6sterreich \u00E4hnlich \u00FCberall \u00C4gypten \u00DCbung'; const start = performance.now(); for (let i = 0; i < 500; i++) { comp.normalizeText(input);