fix(ci): make the root pnpm lint and check scripts actually run - #29
Merged
Conversation
`pnpm run lint` failed 100% of the time, and `pnpm run check` with it. Both were bare `vp` invocations at the repository root, which cannot work for the reason lint:js:app already documents: `vp` rediscovers packages/app/vite.config.ts and loads it with the root as cwd, SvelteKit's plugin resolves `src/app.html` against that, does not find it, and aborts before a single file is linted. `mise run lint:js` was unaffected -- it splits the run in two and passes `-C packages/app` for the half that needs it. But the pnpm scripts are not redundant: vite-plus is pinned in the workspace catalog specifically so `pnpm run lint` / `fmt` work on a clone that has not run `mise install` yet, so these are a real if secondary gate, and it was failing open. `lint` now mirrors the split, with `--deny-warnings` so the fallback is as strict as the gate it stands in for. `check` is a fan-out to `fmt:check && lint && typecheck` rather than the same split applied to `vp check`. `vp -C packages/app check` would format-check the app under the app's own config, and a second formatter opinion is the exact failure mode the root vite.config.ts header says a single formatter was chosen to remove. Verified the fix is not silently vacuous: a duplicate object key planted in packages/app/src/lib/ and again in packages/shared/src/ makes `pnpm run lint` fail with no-dupe-keys from each half in turn. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
pnpm run lintfailed 100% of the time on a clean tree, andpnpm run checkwith it:Both were bare
vpinvocations at the repository root, which cannot work for the reasonlint:js:appalready documents inmise.toml:vprediscoverspackages/app/vite.config.tsand loads it with the root as cwd, SvelteKit's plugin resolvessrc/app.htmlagainst that, doesn't find it, and aborts before a single file is linted. The rootvite.config.tsshort-circuits that discovery forvp fmt, but oxlint resolves vite configs through its own path and still walks into the nested one.mise run lint:jswas never affected — it splits the run and passes-C packages/appfor the half that needs it. But these scripts aren't redundant with it:vite-plusis pinned in the workspace catalog specifically sopnpm run lint/fmtkeep working on a clone that hasn't runmise installyet. So this was a real if secondary gate, and it was failing open.What changed
lintmirrors the split frommise.toml, using the catalog-pinnedvpso it still works without mise.--deny-warningsincluded so the fallback is as strict as the gate it stands in for.checkbecomes a fan-out tofmt:check && lint && typecheckrather than the same split applied tovp check.vp -C packages/app checkwould format-check the app under the app's own config, and a second formatter opinion is the exact failure mode the rootvite.config.tsheader says a single formatter was chosen to remove.mise.tomlgets a comment noting the path list is now duplicated. The existing comment argues that naming directories makes adding a package a visible decision; with two copies that only holds if it's written down, since a package added to one entry point and not the other is silently skipped.Verification
The clean exit was worth distrusting, since a linter that matches no files also exits 0. Planting a duplicate object key in
packages/app/src/lib/and again inpackages/shared/src/makespnpm run lintfail withno-dupe-keysfrom each half in turn, so both halves genuinely lint and--deny-warningsbites.pnpm run lint— exit 0 (was exit 1 before)pnpm run check— exit 0 end to endmise run lint:js/fmt:check:js— still green, behavior unchanged🤖 Generated with Claude Code