Skip to content

fix(ci): make the root pnpm lint and check scripts actually run - #29

Merged
yashau merged 1 commit into
mainfrom
claude/fix-root-lint-scripts
Aug 20, 2026
Merged

fix(ci): make the root pnpm lint and check scripts actually run#29
yashau merged 1 commit into
mainfrom
claude/fix-root-lint-scripts

Conversation

@yashau

@yashau yashau commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Why

pnpm run lint failed 100% of the time on a clean tree, and pnpm run check with it:

x Failed to load config: packages/app/vite.config.ts
  | Error: src\app.html does not exist
Linting failed before analysis started

Both were bare vp invocations at the repository root, which cannot work for the reason lint:js:app already documents in mise.toml: vp rediscovers packages/app/vite.config.ts and loads it with the root as cwd, SvelteKit's plugin resolves src/app.html against that, doesn't find it, and aborts before a single file is linted. The root vite.config.ts short-circuits that discovery for vp fmt, but oxlint resolves vite configs through its own path and still walks into the nested one.

mise run lint:js was never affected — it splits the run and passes -C packages/app for the half that needs it. But these scripts aren't redundant with it: vite-plus is pinned in the workspace catalog specifically so pnpm run lint / fmt keep working on a clone that hasn't run mise install yet. So this was a real if secondary gate, and it was failing open.

What changed

lint mirrors the split from mise.toml, using the catalog-pinned vp so it still works without mise. --deny-warnings included so the fallback is as strict as the gate it stands in for.

check becomes 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.

mise.toml gets 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 in packages/shared/src/ makes pnpm run lint fail with no-dupe-keys from each half in turn, so both halves genuinely lint and --deny-warnings bites.

  • pnpm run lint — exit 0 (was exit 1 before)
  • pnpm run check — exit 0 end to end
  • mise run lint:js / fmt:check:js — still green, behavior unchanged
  • pre-push gate (typecheck, clippy, rust + js tests) — green

🤖 Generated with Claude Code

`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>
@yashau
yashau merged commit 0e51309 into main Aug 20, 2026
18 checks passed
@yashau
yashau deleted the claude/fix-root-lint-scripts branch August 20, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant