Files
dwellops-platform/.cursor/rules/02-monorepo-and-dependencies.mdc
2026-03-10 21:30:52 -03:00

30 lines
1.1 KiB
Plaintext

---
description: pnpm workspaces, dependency rules, and shared package direction
alwaysApply: true
---
Shared package and dependency standards for the monorepo.
## Package management
- Use `pnpm` workspaces.
- Prefer workspace packages for shared logic rather than duplication between apps.
- Reusable logic should be extracted into `packages/*` only when there is a clear second use case or a foundational shared concern.
## Dependency rules
- Prefer fewer dependencies.
- Do not introduce a package solely for convenience if existing platform APIs or current project dependencies can solve the problem cleanly.
- Any new dependency must be justified briefly in code comments, PR notes, or task summary when it is not obvious.
- Use the latest stable non-beta version when adding dependencies.
- Prefer mature, actively maintained packages with strong TypeScript support.
## Shared package direction
Prefer dedicated packages for:
- UI primitives
- shared types
- shared schemas
- configuration
- internationalization helpers
- eslint config
- tsconfig
- test utilities when broadly reused