This repository includes a complete development toolchain for code quality, testing, and documentation.
- ✅ Rector - Structural refactoring and syntax upgrades
- ✅ PHP CS Fixer - Advanced code formatting
- ✅ PHPCS/PHPCBF - WordPress coding standards
- ✅ PHPStan - Static analysis
- ✅ ESLint - JavaScript linting
- ✅ Prettier - Code formatting
- ✅ Stylelint - CSS linting
- ✅ Markdownlint - Documentation linting
- ✅ PHP Documentation Generator - Auto-generates class docs
- ✅ JSDoc + jsdoc-to-markdown - JavaScript API docs
- ✅ PHPUnit - PHP unit tests
- ✅ Playwright - E2E and accessibility tests
./bin/cleanup.sh # Fix everything (PHP + JS + CSS)npm run docs # Generate all documentationnpm test # E2E + accessibility tests
composer test # PHP unit tests + static analysisnpm run build # Build CSS + JS bundles# 1. Fix all code issues
./bin/cleanup.sh
# 2. Run tests
npm test
composer test
# 3. Generate docs
npm run docs
# 4. Build assets
npm run build# Check what would change (dry-run)
./bin/cleanup.sh --dry-run
composer rector:dry
composer phpfix:dry# 1. Write code with proper docblocks
# 2. Run cleanup
./bin/cleanup.sh
# 3. Generate docs
npm run docs
# 4. Run tests
npm test
composer test- CLEANUP-TOOLS.md - Code quality tools guide
- DOCUMENTATION.md - Documentation system guide
- TESTING.md - Testing framework guide
- ARCHITECTURE.md - System architecture
rector.php- Rector configuration.php-cs-fixer.dist.php- PHP CS Fixer rulesphpcs.xml.dist- PHPCS standardsphpstan.neon.dist- PHPStan settingseslint.config.js- ESLint rules.prettierrc- Prettier formattingstylelint.config.js- Stylelint rules
jsdoc.json- JSDoc configurationbin/generate-docs.php- PHP doc generatorbin/generate-js-docs.js- JS doc generatorbin/generate-all-docs.sh- Unified generator
roll-up.config.mjs- Rollup bundlerpostcss.config.cjs- PostCSS processorpackage.json- npm scriptscomposer.json- Composer scripts
- PSR-12 base standard
- WordPress Coding Standards for hooks/filters
- PHP 8.2+ syntax (strict types, typed properties)
- Tabs for indentation (WordPress convention)
- ES2022 modules
- 2 spaces indentation
- Single quotes for strings
- 100 char line length
- Standard config (stylelint-config-standard)
- 2 spaces indentation
- Logical property ordering
These tools are designed to run in CI pipelines:
# GitHub Actions example
- name: Install Dependencies
run: |
composer install
npm install
- name: Code Quality Checks
run: |
./bin/cleanup.sh --dry-run
composer phpstan
npm run lint
- name: Generate Docs
run: npm run docs
- name: Run Tests
run: |
composer test
npm test- Run cleanup before committing - Catches issues early
- Use dry-run mode - Preview changes before applying
- Keep docs updated - Run
npm run docsregularly - Check build size - Use
npm run size-check - Validate before pushing - Run
npm run lint && composer test
php -d memory_limit=2G vendor/bin/rectorchmod +x bin/*.php bin/*.sh bin/*.jsnpm run clean
npm run build# Ensure scripts are executable
chmod +x bin/*
# Install JS doc dependencies
npm install jsdoc jsdoc-to-markdown --save-devSee project documentation:
Starisian Technologies | starisian.com