| name | mailpoet-dev-cycle |
| description | Linting and code quality workflows for MailPoet development (PHP, JS/TS, CSS/SCSS). Use when fixing code style or following the development workflow. |
MailPoet Development Cycle
This skill covers linting, code quality, and building assets for MailPoet development. For testing, see the separate writing-tests skill.
Working Directory
This is a monorepo. Prefer the root pnpm scripts for common build and QA work; they wrap the plugin-level Robo tasks from the correct directory.
- Free plugin (default): run
pnpm <task> from the repo root.
- Premium plugin: run
pnpm <task> from mailpoet-premium/ when a premium package script exists.
- Robo-only helpers: run
./do from the relevant plugin directory only when no pnpm wrapper exists.
Unless you are explicitly working on the premium plugin, always default to the free plugin directory.
When to Use This Skill
- Before committing code changes
- When running linting or code quality checks
- When setting up the development environment
- When building frontend assets
- When fixing CI failures related to code quality
Skill Contents
Quick Reference
All commands below default to the free plugin. Run from the repo root.
pnpm qa
pnpm qa:php
pnpm qa:phpstan
pnpm qa:js
pnpm qa:css
pnpm qa:prettier
pnpm qa:fix
cd mailpoet && ./do qa:fix-file path/to/file.php
cd mailpoet && ./do qa:fix-file path/to/file.tsx
Development Workflow
graph TD
A[Make Changes] --> B[Run Linting]
B --> C{Linting Passes?}
C -->|No| D[Fix Issues]
D --> B
C -->|Yes| E[Run Tests]
E --> F{Tests Pass?}
F -->|No| G[Fix Tests]
G --> E
F -->|Yes| H[Run Prettier]
H --> I{Prettier Clean?}
I -->|No| J["pnpm qa:fix"]
J --> H
I -->|Yes| K[Commit]
Pre-Commit Checklist
Before committing, run these from the repo root:
Premium Plugin
When working on mailpoet-premium/, substitute the directory:
cd mailpoet-premium && pnpm qa
cd mailpoet-premium && pnpm qa:phpstan