fix(ci): run svelte-kit sync before lint to fix cache-hit tsconfig miss #568
Reference in New Issue
Block a user
Delete Branch "worktree-fix+ci-svelte-kit-sync-before-lint"
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?
Problem
CI lint fails on main (and all branches sharing the same
package-lock.jsonhash) with:frontend/tsconfig.jsonextends.svelte-kit/tsconfig.json, which is generated bysvelte-kit sync. In CI,svelte-kit synconly runs as a side-effect ofnpm ci(via thepreparelifecycle script). Butnpm ciis gated:On a cache miss (first run for a given
package-lock.jsonhash):npm ciruns →prepare→svelte-kit sync→.svelte-kit/tsconfig.jsonexists → lint passes.On a cache hit (every subsequent run across all branches):
npm ciis skipped →svelte-kit syncnever runs →.svelte-kit/tsconfig.jsonmissing → ESLint fails at tsconfig resolution.This explains why the previous PR was green (cache-miss run) but main and all other branches are now broken (cache-warm runs).
Fix
Add an unconditional
svelte-kit syncstep after Paraglide compile and before Lint. It always runs regardless of cache state, takes ~1 second, and is idempotent.Test plan