chore(dx): tighten feedback loop — root lint/test, husky gates, check.sh signal-to-noise#19
Merged
Merged
Conversation
….sh signal-to-noise - Root npm test composes both workspaces (api + web run their own vitest config, avoiding the Vite 5/6 hoisting conflict with Storybook) - Root npm lint runs biome check . for all files from one place - lint-staged: biome check --write on staged files, auto-restages safe fixes - .husky/pre-commit: lint-staged → tsc (api+web) → vitest (api+web); each step captures output and only prints on failure — failure message is the next action - check.sh rewritten: silent on pass, prints captured logs only for failed steps; summary line shows pass/fail/warn counts at a glance - apps/web/vitest.config.ts: use import.meta.dirname for alias path so config is CWD-agnostic when invoked from any directory - vitest added to root devDependencies (explicit, not relying on workspace hoist) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
husky v9 no longer needs #!/usr/bin/env sh or the _/husky.sh source line. They will fail in v10. Removing proactively. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
npm testcomposes both workspaces sequentially (apps/apithenapps/web), each running their own vitest config — avoids the Vite 5/6 hoisting conflict introduced by the root-level@sveltejs/vite-plugin-svelte@^4(Storybook constraint)npm run lintrunsbiome check .across all files from one placelint-stagedrunsbiome check --writeon staged files and auto-restages any safe fixes before the commit lands.husky/pre-commitnow covers three gates: lint-staged → tsc (both workspaces) → vitest (both workspaces); each step captures output and only prints on failure — the failure message is the next action, no scrolling requiredcheck.shrewritten: silent on pass, deferred failure detail printed at the bottom; summary line showsN passed, N failedat a glanceapps/web/vitest.config.ts:import.meta.dirnamefor the$env/dynamic/publicalias so the config is CWD-agnosticvitestadded to rootdevDependenciesexplicitly rather than relying on workspace hoistingWhy not a vitest workspace config?
Attempted but blocked:
sveltekit()plugin capturesprocess.cwd()at module load time and overrides Vite'sroot. Running it from repo root causes Vite 5 (root) vs Vite 6 (apps/web) type conflicts that break tsc. Composing via npm scripts is simpler and avoids touching the Storybook-sensitive Vite version split.Test plan
npm testpasses from repo rootnpm run lintpasses from repo root🤖 Generated with Claude Code