en un clic
mailpoet-dev-cycle
// Linting and code quality workflows for MailPoet development (PHP, JS/TS, CSS/SCSS). Use when fixing code style or following the development workflow.
// Linting and code quality workflows for MailPoet development (PHP, JS/TS, CSS/SCSS). Use when fixing code style or following the development workflow.
| 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. |
This skill covers linting, code quality, and building assets for MailPoet development. For testing, see the separate writing-tests skill.
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.
pnpm <task> from the repo root.pnpm <task> from mailpoet-premium/ when a premium package script exists../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.
| Document | Purpose |
|---|---|
| code-quality.md | JS/TS linting (ESLint), CSS/SCSS linting (Stylelint), Prettier formatting |
| php-coding-standards.md | PHP lint, PHPCS, PHPStan static analysis |
All commands below default to the free plugin. Run from the repo root.
# QA (all checks: PHP lint + PHPCS + ESLint + Stylelint)
pnpm qa
# PHP only (lint + PHPCS)
pnpm qa:php
# PHPStan static analysis
pnpm qa:phpstan
# JS/TS linting (ESLint + TypeScript check)
pnpm qa:js
# CSS/SCSS linting (Stylelint)
pnpm qa:css
# Prettier check / fix
pnpm qa:prettier
pnpm qa:fix
# Fix a single file (PHPCS or ESLint based on extension; Robo-only)
cd mailpoet && ./do qa:fix-file path/to/file.php
cd mailpoet && ./do qa:fix-file path/to/file.tsx
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]
Before committing, run these from the repo root:
pnpm qa -- all PHP and frontend QA checks passpnpm qa:fix -- formatting is cleanrunning-tests skill for commands)When working on mailpoet-premium/, substitute the directory:
cd mailpoet-premium && pnpm qa
cd mailpoet-premium && pnpm qa:phpstan
Use when investigating a failing test — reported via a CircleCI job/build URL, or output from a local test run. Triggers on phrases like "this test failed", "debug this CI failure", "why did the nightly fail?", "investigate the failure on <branch>", or any message pasting a CircleCI URL with failure context. Guides the investigator to diagnose, fix, and verify the fix locally. Stops there — committing, opening a PR, or writing a changelog is the caller's call (see `creating-pull-requests`, `writing-changelog`).
Use when running MailPoet tests — executing a full suite, running a single file or single test, running in debug/multisite mode, or shelling into the test container. Triggers on phrases like "run the unit tests", "run this test file", "execute the integration suite", "kick off acceptance tests", "rerun the failed tests". Does not cover authoring tests (see writing-tests) or investigating a failed CI run (see debugging-failed-tests).
Use when authoring tests for MailPoet — adding a new test case, picking the right test type, choosing a name, structuring the file, deciding what belongs in unit vs integration vs acceptance. For invoking the test runner (running a file, the whole suite, premium variants, debug mode) see running-tests. For investigating a CI failure see debugging-failed-tests.
Use when adding or changing SQL joins, WHERE comparisons, temporary tables, segment filters, subscriber synchronization, or WooCommerce queries that compare text columns across WordPress, WooCommerce, and MailPoet tables.
Use when a new WooCommerce or WordPress beta / release candidate is available and you need to test MailPoet's compatibility against it. Triggers on phrases like "test against WC beta", "test MailPoet on WP beta", "compatibility test", "new WooCommerce version", "new WordPress version".
ALWAYS use when asked to: create a PR, open a PR, make a PR, push and create PR, submit changes for review. Do NOT use gh pr create directly.