fix: resolve TypeScript and ESLint errors blocking CI #95
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-app!95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "94-fix-lint-and-typescript-errors-blocking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fix all 8 TypeScript and ESLint errors blocking the CI check+lint stage. No Docker image has ever been built because the pipeline fails before reaching the build step, leaving the pod in ImagePullBackOff.
Changes
src/routes/boards/[slug]/+page.svelte-- add explicitTouchEventandMouseEventtypes to inline event handler parameters (2 TypeScript errors)src/routes/+layout.svelte-- remove unusedcheckAuthimport alias (1 ESLint error)src/routes/graph/+page.svelte-- importSvelteSetfromsvelte/reactivityand use it foredgeSetandtypes; remove unusedsvelte-ignorecomment (3 ESLint errors)src/routes/notes/+page.svelte-- importSvelteSetand use it fortypesset (1 ESLint error)src/routes/search/+page.svelte-- remove unusedsearchErrorvariable, replace withconsole.errorin catch block (1 ESLint error)Test Plan
npm run checkpasses with 0 errors (1 pre-existing a11y warning)npm run lintpasses with 0 errorsReview Checklist
Related Notes
forgejo_admin/pal-e-platform #234pal-e-docs-- project this work belongs toQA Review
Scope: 5 files, +8/-10 lines. All changes target the 8 reported CI errors.
File-by-file
+layout.sveltecheckAuthimport aliasisAuthenticatednot used elsewhere in layout; auth state comes frominitKeycloak()return valueboards/[slug]/+page.svelteeparams asTouchEventandMouseEventontouchstartandonclickgraph/+page.svelteSvelteSet, use foredgeSetandtypes; remove unusedsvelte-ignoreSvelteSetis a drop-in forSetin these local contexts; thea11y_click_events_have_key_eventsignore was unnecessary sinceonkeydownhandler already existsnotes/+page.svelteSvelteSet, use fortypessearch/+page.sveltesearchErrorvariable, addconsole.errorin catchconsole.errorpreserves error visibility in devtoolsChecks
fix: ...)94-fix-lint-and-typescript-errors-blocking)Nits
None.
VERDICT: APPROVED
PR #95 Review
DOMAIN REVIEW
Tech stack: SvelteKit / TypeScript (Svelte 5 runes mode)
File-by-file analysis (5 files, +8/-10 lines):
src/routes/+layout.svelte-- RemovesisAuthenticated as checkAuthimport. Confirmed:checkAuthis never referenced in the script or template. The layout uses a localauthenticatedvariable set byinitKeycloak(). Safe removal.src/routes/boards/[slug]/+page.svelte-- Adds(e: TouchEvent)and(e: MouseEvent)type annotations to inline handlers. Verified against the handler signatures:onTouchStart(e: TouchEvent, item: BoardItem)at line 231 andonclickwhich receivesMouseEventper the DOM spec. Types are correct.src/routes/graph/+page.svelte-- ImportsSvelteSetfromsvelte/reactivity, changesedgeSetandtypesfromnew Set<string>()tonew SvelteSet<string>(). Also removes<!-- svelte-ignore a11y_click_events_have_key_events -->comment. The ignore removal is safe -- the<g>element already has anonkeydownhandler (lines 347-349), so the a11y rule is satisfied.src/routes/notes/+page.svelte-- SameSvelteSetpattern for thetypeslocal variable.src/routes/search/+page.svelte-- Removes unusedsearchErrorstate variable (was set but never read in the template), replaces the catch assignment withconsole.error('Search failed:', err). No user-visible behavior change -- the error was already invisible.BLOCKERS
None.
All changes are pure lint/type cleanup with no functional behavior changes. No new functionality was added, so the "new functionality must have tests" criterion does not apply. No user input handling changed. No secrets. No auth path modifications.
NITS
SvelteSet for non-reactive locals: In
graph/+page.svelte,edgeSetinsidefetchAllNoteLinks()is a local dedup set that never touches the reactive template -- plainSetwould suffice. Similarlytypesin bothgraph/+page.svelteandnotes/+page.svelteare local variables used to build arrays that get spread into reactive state (noteTypes,availableTypes).SvelteSetadds minor overhead here. However, if this is what the Svelte 5 linter requires in.sveltefiles to passsvelte-check, it's acceptable as lint compliance. Worth revisiting if performance profiling ever flags the graph page.Search error UX gap (pre-existing): The old
searchErrorwas never displayed in the template. The PR replaces it withconsole.error, which is equivalent. But the search page has no error state visible to the user at all -- a failed search silently produces no results. This is a pre-existing gap, not introduced by this PR, and out of scope for this fix.SOP COMPLIANCE
94-fix-lint-and-typescript-errors-blocking(issue #94)forgejo_admin/pal-e-platform #234PROCESS OBSERVATIONS
This PR unblocks CI image builds for pal-e-docs-app. The 8 lint/TS errors have been preventing Docker image creation, which means the app has been in ImagePullBackOff. Merging this directly improves deployment frequency (DORA DF) by enabling the CI pipeline to produce artifacts for the first time.
The pre-existing search error UX gap (nit #2) would make a good follow-up ticket if not already tracked.
VERDICT: APPROVED