Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 2.16 KB

AGENTS.md

File metadata and controls

49 lines (35 loc) · 2.16 KB

Repository guidelines

Setup environment

Use Node.js from .nvmrc and pnpm from package.json. Run pnpm install from the repository root.

Project structure & module organization

  • Monorepo via the pnpm workspace.
  • packages/core (@rslib/core): CLI entry (rslib, --watch) and programmatic helpers (build, defineConfig, loadConfig).
  • packages/plugin-dts (rsbuild-plugin-dts): provides the dts configuration hook (e.g., { dts: { bundle: true } }).
  • packages/create-rslib (create-rslib): scaffolds new projects via pnpm dlx create-rslib or npx create-rslib.
  • Tests live in packages/*/tests (unit) and tests/ (integration, e2e); examples in examples/.
  • Key configuration files: rstack.config.ts, pnpm-workspace.yaml.

Build, test, and development commands

  • Install: pnpm install (all packages will be built in postinstall).
  • Build: pnpm build (all) and pnpm build:examples.
  • Watch dev: pnpm -C packages/core dev (or other package).
  • Lint/format: pnpm lint; auto-fix: pnpm format.
  • Type-check: pnpm lint.
  • Tests:
    • pnpm test runs the entire suites.
    • pnpm test:unit scopes to unit tests.
    • pnpm test:integration scopes to integration tests; add <pattern> to match specific cases.
    • pnpm test:e2e runs end-to-end tests.

Coding style & naming conventions

  • TypeScript + ESM; spaces; single quotes.
  • Rstack CLI is the canonical linting and formatting tool.
  • Run pnpm lint for linting and pnpm format for formatting.
  • Filenames should use camelCase or PascalCase.

Testing guidelines

  • Unit/integration: @rstest/core; E2E: @playwright/test.
  • Naming: *.test.ts/*.test.tsx; snapshots in __snapshots__/.
  • Placement: unit under packages/*/tests; integration under tests/integration; e2e under tests/e2e.
  • Target specific integration cases: pnpm test:integration <pattern> (faster than the full suite).

Commit & pull request guidelines

See .agents/skills/pr-creator/SKILL.md for the full branching, commit message, and PR creation workflow.

Security & configuration tips

  • Do not commit build artifacts (dist/, compiled/).