This repository is a monorepo containing three independent projects:
- fumadocs/: Next.js documentation site
- starlight/: Astro documentation site
- tools/: React+Vite utility application
- Node.js: 20.x or later (24.x for starlight)
- pnpm: 10.22.0 (specified in package.json)
- uv: Latest version (for pre-commit)
- pre-commit: 4.4.0 (installed via uv)
Each project has its own dependencies. Install them separately:
# Install fumadocs dependencies
cd fumadocs && pnpm install
# Install starlight dependencies
cd starlight && pnpm install
# Install tools dependencies
cd tools && pnpm installPre-commit hooks are configured per-project but share the same Git repository. Install them with:
# Install in fumadocs
cd fumadocs && pnpm run prepare
# Install in starlight
cd starlight && pnpm run prepare
# Install in tools
cd tools && pnpm run prepareManual installation (if prepare script fails):
cd fumadocs && pre-commit install --hook-type pre-commit --hook-type commit-msg
cd starlight && pre-commit install --hook-type pre-commit --hook-type commit-msg
cd tools && pre-commit install --hook-type pre-commit --hook-type commit-msgAll projects use the following tools for code quality:
Biome is a fast, modern linter and formatter that replaces ESLint + Prettier.
- Configuration:
biome.jsonin each project directory - Run linting:
pnpm lint - Run formatting:
pnpm format - Fix issues automatically: Pre-commit hooks run Biome with
--writeflag
Type checking ensures type safety across all projects.
- Run type check:
pnpm typecheck - fumadocs & tools: Uses
tsc --noEmit - starlight: Uses
astro check
Pre-commit hooks run automatically before each commit and enforce:
- Standard checks: JSON/YAML validation, trailing whitespace, large files
- Secret scanning: Gitleaks detects accidentally committed secrets
- Spell checking: Codespell checks for typos in code and documentation
- Biome: Linting and formatting
- Type checking: TypeScript/Astro validation
- Commit message linting: Enforces conventional commits
Run manually:
# Run all hooks
cd fumadocs && pre-commit run --all-files
# Run specific hook
cd fumadocs && pre-commit run biome-check --all-filesBypass hooks (use sparingly):
git commit --no-verify -m "message"This repository follows Conventional Commits.
<type>(<scope>): <subject>
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system or dependency changesci: CI/CD configuration changeschore: Other changes that don't modify src or test filesrevert: Reverts a previous commit
starlight: Changes specific to the starlight projectfumadocs: Changes specific to the fumadocs projecttools: Changes specific to the tools projectdeps: Dependency updatesci: CI/CD changesconfig: Configuration changes
# Good commit messages
git commit -m "feat(starlight): add dark mode toggle"
git commit -m "fix(fumadocs): resolve navigation issue on mobile"
git commit -m "docs(tools): update README with usage examples"
git commit -m "chore(deps): update dependencies across all projects"
# Bad commit messages (will be rejected)
git commit -m "updated stuff"
git commit -m "Fix bug"
git commit -m "WIP"# Start development server
cd <project> && pnpm dev
# Run linting
pnpm lint
# Run formatting
pnpm format
# Run type checking
pnpm typecheck
# Run all checks
pnpm check
# Build for production
pnpm buildEach project has these npm scripts:
| Script | Description |
|---|---|
dev |
Start development server |
build |
Build for production |
lint |
Run Biome linting |
format |
Run Biome formatting with auto-fix |
typecheck |
Run TypeScript type checking |
check |
Run lint + typecheck |
prepare |
Install pre-commit hooks |
Runs on every PR and push to main/master:
- Quality checks: Run pre-commit hooks on all files
- Build verification: Build all three projects in parallel
- Type checking: Run TypeScript/Astro checks in parallel
- Security audit: Run pnpm audit (on push only)
Allows interactive engagement with Claude Code via:
- Issue comments containing
@claude - PR review comments containing
@claude - Issue titles/bodies containing
@claude
Automatically reviews PRs with:
- Code quality feedback
- Pre-commit compliance checks
- Performance and security analysis
- Test coverage recommendations
- Path filtering: Workflows only run when relevant files change
- Concurrency: Old workflow runs are cancelled when new commits are pushed
- Caching: pnpm dependencies and pre-commit environments are cached for speed
Problem: Hooks fail on commit
Solution:
- Review the error message carefully
- Fix the issues reported
- Run
pre-commit run --all-filesto verify fixes - Commit again
Common issues:
- Biome errors: Run
pnpm formatto auto-fix formatting issues - Type errors: Run
pnpm typecheckto see detailed errors - Commit message: Ensure it follows conventional commit format
- Secrets detected: Remove sensitive data before committing
Problem: Hooks not running
Solution:
# Re-install hooks
cd <project>
pre-commit uninstall
pre-commit install --hook-type pre-commit --hook-type commit-msg
# Verify installation
pre-commit run --all-filesProblem: Biome reports unexpected errors
Solution:
- Check
biome.jsonconfiguration - Ensure
@biomejs/biome@2.3.5is installed - Run
pnpm formatbefore committing - Check file patterns in
.pre-commit-config.yaml
Problem: Type errors in pre-commit
Solution:
- Run
pnpm typecheckdirectly to see detailed errors - Fix type issues in your code
- Ensure all dependencies are installed
- Check
tsconfig.jsonconfiguration
- Open an issue for bugs or feature requests
- Ask questions in PR comments
- Tag
@claudein issues for interactive assistance