woocommerce-dev-cycle
Run tests, linting, and quality checks for WooCommerce development. Use when running tests, fixing code style, or following the development workflow in WooCommerce projects.
When & Why to Use This Skill
The WooCommerce Development Cycle skill is a specialized toolkit designed to streamline the quality assurance process for WooCommerce developers. It automates essential tasks such as running PHP and JavaScript tests, performing code linting, and enforcing WordPress-specific coding standards. By providing a structured workflow—from initial code changes to final commits—this skill ensures high code quality, reduces technical debt, and accelerates the development lifecycle within the WooCommerce ecosystem.
Use Cases
- Automated Testing: Quickly run PHPUnit and JavaScript tests using pnpm to verify that new features or bug fixes don't break existing WooCommerce functionality.
- Code Style Enforcement: Automatically detect and fix linting errors in PHP and JavaScript files to maintain consistency with WooCommerce and WordPress development standards.
- Workflow Standardization: Guide developers through a rigorous 'test-lint-fix-commit' cycle to ensure that only high-quality, verified code reaches the repository.
- Documentation Quality: Utilize built-in markdown linting to ensure project documentation is correctly formatted and professional.
- Environment Troubleshooting: Leverage detailed test output and environment setup guidance to resolve complex integration issues between WordPress and WooCommerce.
| name | woocommerce-dev-cycle |
|---|---|
| description | Run tests, linting, and quality checks for WooCommerce development. Use when running tests, fixing code style, or following the development workflow in WooCommerce projects. |
WooCommerce Development Cycle
This skill provides guidance for the WooCommerce development workflow, including running tests, code quality checks, and troubleshooting.
Instructions
Follow these guidelines for WooCommerce development workflow:
- Running tests: See running-tests.md for PHP and JavaScript test commands, test environment setup, and troubleshooting
- Code quality: See code-quality.md for linting and code style fixes
- PHP linting patterns: See php-linting-patterns.md for common PHP linting issues and fixes
- Markdown linting: See markdown-linting.md for markdown file linting and formatting
Development Workflow
The standard development workflow:
- Make code changes
- Run relevant tests:
pnpm run test:php:env -- --filter YourTestClass - Run linting/type checking:
pnpm run lint:changes:branch:php - Fix any issues:
pnpm run lint:php:fix - Commit changes only after tests pass
Note: WooCommerce uses pnpm for its build system. For other Node.js projects, prefer bun over npm/pnpm.
Key Principles
- Always run tests after making changes to verify functionality
- Use specific test filters to run relevant tests during development
- Fix linting errors solely for code in your current branch
- Test failures provide detailed output showing expected vs actual values
- The test environment handles WordPress/WooCommerce setup automatically