|
| 1 | +# SolidStart Agent Guidelines |
| 2 | + |
| 3 | +## Build/Test Commands |
| 4 | +- `pnpm build` - Build all packages |
| 5 | +- `pnpm test` - Run all tests |
| 6 | +- `pnpm test -- <pattern>` - Run specific test pattern |
| 7 | +- `pnpm --filter tests unit` - Run unit tests with Vitest |
| 8 | +- `pnpm --filter tests unit -- <file>` - Run single test file |
| 9 | +- `pnpm --filter tests e2e:run` - Run Cypress E2E tests |
| 10 | +- `pnpm --filter @solidjs/start typecheck` - Type check main package |
| 11 | +- `pnpm -r typecheck` - Type check all packages |
| 12 | +- `pnpm clean` - Clean all build artifacts |
| 13 | + |
| 14 | +## CI/CD & Release Process |
| 15 | +- Uses changesets for versioning - create `.changeset/<name>.md` files for releases |
| 16 | +- All PRs must pass typecheck, unit tests, and E2E tests (Chromium + Firefox) |
| 17 | +- Release workflow auto-publishes on main branch push with changesets |
| 18 | +- Continuous releases use `pkg-pr-new` for preview packages on PRs |
| 19 | + |
| 20 | +## Code Style & Architecture |
| 21 | +- **TypeScript**: Required, use ESNext target, strict typing, jsxImportSource: "solid-js" |
| 22 | +- **File Structure**: `/src/{client,server,shared,router,middleware}` - separate by runtime environment |
| 23 | +- **Exports**: Use `// @refresh skip` at top of non-reactive files, group related exports |
| 24 | +- **Imports**: Named imports, relative paths for local files, organize by: solid-js, external, internal |
| 25 | +- **Components**: Function declarations for components, arrow functions for utilities |
| 26 | +- **Error Handling**: Use ErrorBoundary patterns, proper TypeScript error types, console.error for logging |
| 27 | +- **Formatting**: Prettier with 2-space tabs, no trailing commas, double quotes, 100 char width |
| 28 | +- **Testing**: Vitest for unit tests, Cypress for E2E, use `describe.skip()` for problematic tests |
| 29 | +- **Server Functions**: Export server functions properly, use getServerFunctionMeta() for metadata |
0 commit comments