---
globs: tsconfig*.json, eslint.config.ts, pnpm-workspace.yaml, package.json, apps/**/package.json, packages/**/package.json, uno.config.ts, apps/**/uno.config.ts, vite.config.ts, apps/**/vite.config.ts, packages/**/vite.config.ts
---

## Tooling & Monorepo Configuration

- **Package management**:
  - Use **pnpm** and respect the existing workspace layout and `catalog` versions.
  - When adding dependencies:
    - Prefer catalog entries where available.
    - Avoid version drift between apps/packages unless there is a strong reason.
- **Node & TS versions**:
  - Keep compatibility with the Node and TypeScript versions declared in the root `package.json`.
  - Avoid using language features that require bumping these versions without updating the configuration and CI.

### Scripts & Build Pipeline

- Maintain the existing build and typecheck pipeline:
  - `packages:build` builds all packages.
  - `typecheck` builds packages and runs `tsc --noEmit` plus per-package typechecks.
  - `lint` and `lint:fix` must work across the entire repo.
- When adding new scripts:
  - Integrate them into the existing flows where appropriate (e.g. run before `build` or as part of CI).
  - Keep script names concise and descriptive; avoid overlapping names.

### ESLint & TSConfig

- ESLint:
  - Do **not** globally disable strict rules for convenience; scope exceptions narrowly (`eslint-disable-next-line`) and justify them.
  - Keep TypeScript, Vue, and UnoCSS plugins enabled unless there is a clear performance or correctness reason.
- TypeScript:
  - Preserve strictness; avoid relaxing compiler options without strong justification.
  - For path aliases or module resolution changes, ensure both Vite and `tsconfig` stay in sync.

### Vite & UnoCSS

- Vite:
  - Keep configs minimal and shared where possible.
  - Be mindful of bundle size impact when adding new plugins or heavy dependencies.
- UnoCSS:
  - Centralize design tokens and theme-level decisions in Uno configs rather than scattering magic values across components.

