Development
Guide for contributors and local development of the plugin itself.
Guide for contributors and local development of the plugin itself.
Prerequisites
- Node.js
^18.20.2or>=20.9.0 - pnpm
^9or^10
Commands
Run a single test by pattern: pnpm vitest -t "conflict detection"
Project Structure
Key Conventions
- ESM throughout —
"type": "module"in package.json. Use.jsextensions in import paths even for TypeScript files. - Prettier — single quotes, no semicolons, trailing commas, 100-char line width.
- TypeScript strict mode — types-only emit via
tsc; actual transpilation via SWC. - Peer dependencies — all peer dependencies (payload, react, next) are devDependencies — peer dependencies are
payload ^3.79.0,@payloadcms/ui ^3.79.0,@payloadcms/translations ^3.79.0. - Object property ordering — alphabetically ordered (enforced by
perfectionist/sort-objects). Note:idis treated as a top group and sorts before all other keys.