After forking the repo from GitHub:
git clone https://github.com/(your-name-here)/ui
cd ui
bun installThis repository includes a list of suggested VS Code extensions. It's a good idea to use VS Code and accept its suggestion to install them, as they'll help with development.
Alternatively, use Nix for a fully reproducible environment:
nix developRun tsdown locally to build source files from src/ into output files in lib/:
bun buildRun in watch mode for continuous rebuilds:
bun devBiome is used for formatting and linting. It runs automatically on staged files via a Husky pre-commit hook.
To manually format all files:
bun formatSeveral linting tools are configured:
bun lint(Biome): Lints and formats JavaScript/TypeScript source filesbun lint:knip(knip): Detects unused files, dependencies, and code exportsbun lint:spelling(cspell): Spell checks across all source files
Vitest is used for tests:
bun testWith coverage:
bun test --coverageconsole-fail-test is enabled for all test runs. Calls to
console.log,console.warn, and other console methods will cause a test to fail.
- Unit tests (
*.test.ts) — component styling and behavior - Performance regression tests (
*.perf.test.ts) — GPU-friendly transitions, DOM budgets, data-slot tracking - Source-level guards (
perf-guards.test.ts,quality-guards.test.ts) — scan all component files for anti-patterns - Export surface (
export-surface.test.ts) — snapshot of public API to catch accidental removals
This repository includes a VS Code launch configuration for debugging unit tests. To launch it, open a test file, then run Debug Current Test File from the VS Code Debug panel (or press F5).
Preview components locally:
bun storybookBuild a static Storybook:
bun build-storybookThe Storybook UI uses the ResQ dark theme by default with a toolbar toggle for light mode.
bun tscAdd --watch for continuous type checking:
bun tsc --watch