Turborepo orchestrates tasks across the monorepo with dependency-aware scheduling and caching.
turbo.json){
"tasks": {
"build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
"lint": { "dependsOn": ["^lint"], "outputs": [] },
"typecheck": { "dependsOn": ["^typecheck"], "outputs": [] },
"test": { "outputs": [] },
"dev": { "cache": false, "persistent": true },
"start": { "cache": false },
"clean": { "cache": false }
}
}
^build means "build dependencies first" — ensures utils is built before apps.build outputs (dist/**) are cached. Lint, typecheck, and test produce no file outputs but still cache their pass/fail status.dev and start are not cached (cache: false).--affected FlagCI uses --affected to only run tasks on packages changed since the last commit on main:
pnpm lint --affected
pnpm typecheck --affected
pnpm test --affected
turbo.json declares globalDependencies: ["**/.env"] so that changes to .env files invalidate the cache. The build task passes SENTRY_AUTH_TOKEN through to the build environment.
@syntropy/tsconfig)Three presets in packages/tsconfig/:
| Config | Use case | Key settings |
|---|---|---|
base.json | All packages | ES2022 target, ESNext modules, bundler resolution, strict mode |
node-library.json | Internal packages | Extends base + composite, declaration, declarationMap |
react-app.json | React apps (Vite) | Extends base + jsx: react-jsx, noEmit |
Internal packages like utils use node-library.json which enables composite: true. This allows:
.ts filesAll packages use ESM exclusively:
"type": "module" in every package.json"module": "ESNext" + "moduleResolution": "bundler" in tsconfig"verbatimModuleSyntax": true — enforces explicit import type syntaxUltracite provides zero-config Biome presets for formatting and linting.
biome.json){
"extends": ["ultracite/biome/core", "ultracite/biome/react"],
"assist": {
"actions": {
"source": { "organizeImports": "on" }
}
}
}
| Command | Description |
|---|---|
pnpm check | Check for lint and formatting issues |
pnpm fix | Auto-fix all fixable issues |
pnpm lint:fix | Run biome check --fix . directly |
pnpm format | Run biome format --write . directly |
Lefthook manages Git hooks. Configuration in lefthook.yml:
pre-commit:
jobs:
- run: pnpm ultracite fix
glob:
- "**/*.{js,jsx,ts,tsx,json,jsonc,css}"
stage_fixed: true
stage_fixed: true — automatically re-stages files after auto-fixprepare script (lefthook install) on pnpm installVitest is the test runner. No shared config file — each package runs vitest run via its test script.
--passWithNoTests to avoid failing when no tests exist yet*.test.ts convention (co-located with source)manypkg validates dependency consistency across the monorepo.
pnpm check:deps # Check for issues
pnpm fix:deps # Auto-fix issues
The workspaceProtocol: "require" setting enforces that all internal dependencies use "workspace:*" — preventing packages from accidentally depending on a registry version of a sibling.