mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
First shot at a rules file (#119)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
84380bb436
commit
abe1030c61
1 changed files with 31 additions and 0 deletions
31
.roo/rules/rules.md
Normal file
31
.roo/rules/rules.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Roo Code Cloud - Development Guidelines
|
||||
|
||||
## Testing & Formatting
|
||||
|
||||
- **Test**: `pnpm test` (runs all tests via Turbo)
|
||||
- **Test single file**: `pnpm test path/to/file.test.ts`
|
||||
- **Lint**: `pnpm lint` (ESLint with TypeScript support)
|
||||
- **Type check**: `pnpm check-types`
|
||||
- **Format**: Files are auto-formatted on commit via lint-staged
|
||||
|
||||
## Database & Migrations
|
||||
|
||||
- **Push schema**: `pnpm db:push` (applies schema directly, no migration files)
|
||||
- **Generate migration**: `pnpm --filter @roo-code-cloud/db db:generate`
|
||||
- **Run migrations**: `pnpm --filter @roo-code-cloud/db db:migrate`
|
||||
- **Reset DB**: `pnpm db:reset` (drops all data and recreates)
|
||||
- **Schema location**: `packages/db/src/schema.ts`
|
||||
- **Migration files**: `packages/db/drizzle/*.sql`
|
||||
|
||||
## Code Style
|
||||
|
||||
- **TypeScript**: Strict mode enabled, use explicit types
|
||||
- **Imports**: Use absolute imports with `@/` for src directory
|
||||
- **Async/Await**: Prefer over promises, use try-catch for error handling
|
||||
- **Naming**: camelCase for variables/functions, PascalCase for types/components
|
||||
- **Comments**: Use JSDoc for public APIs, inline comments for complex logic
|
||||
- **Error Handling**: Return discriminated unions `{ success: true; data: T } | { success: false; error: string }` for actions
|
||||
- **Database**: Use Drizzle ORM with type-safe queries
|
||||
- **Testing**: Vitest with globals, mock external dependencies
|
||||
- **React**: Functional components with hooks, server components by default
|
||||
- **Formatting**: Prettier with default settings (via lint-staged)
|
||||
Loading…
Add table
Reference in a new issue