|
| 1 | +# QueryLeaf Development Guide |
| 2 | + |
| 3 | +## Build & Test Commands |
| 4 | +- Full build: `yarn build` |
| 5 | +- Typecheck: `yarn typecheck` |
| 6 | +- Lint: `yarn lint` (fix: `yarn lint:fix`) |
| 7 | +- Format: `yarn format` (check: `yarn format:check`) |
| 8 | +- Run all tests: `yarn test` |
| 9 | +- Run individual package tests: `yarn test:lib`, `yarn test:cli`, `yarn test:server`, `yarn test:pg-server` |
| 10 | +- Run single test: `cd packages/[package] && npx jest -t "test name"` or `npx jest path/to/test.test.ts -t "test name"` |
| 11 | +- Integration tests: `yarn test:lib:integration` (requires Docker) |
| 12 | +- Documentation: `yarn docs:serve` (dev), `yarn docs:build` (build) |
| 13 | + |
| 14 | +## Code Style Guidelines |
| 15 | +- TypeScript with strict typing; avoid `any` when possible |
| 16 | +- Single quotes, trailing commas, 2-space indentation, 100 char line limit |
| 17 | +- Prefix unused variables with underscore (e.g., `_unused`) |
| 18 | +- Monorepo structure with packages: lib, cli, server, postgres-server |
| 19 | +- Descriptive variable/function names in camelCase |
| 20 | +- Error handling with proper try/catch blocks and meaningful error messages |
| 21 | +- Use async/await for asynchronous code |
| 22 | +- Follow existing patterns for similar functionality |
| 23 | +- Tests should cover both unit and integration cases |
0 commit comments