Skip to main content

code-quality

Runs linting and static analysis on PHP/CSS/JS using phpcs, phpstan, and rector. Use when checking code style, fixing lint errors, or running static analysis.

소스 정보

저장소
bonny/WordPress-Simple-History
최근 소스 활동
2026년 7월 27일 15:12
감지된 SKILL.md 언어
영어
스타
317
포크
74

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
6 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
code-quality
description
Runs linting and static analysis on PHP/CSS/JS using phpcs, phpstan, and rector. Use when checking code style, fixing lint errors, or running static analysis.
allowed-tools
Read, Grep, Glob, Bash
# Code Quality Standards ## Quick Commands ```bash composer lint # Check PHP style (local, fastest) composer lint-fix # Auto-fix PHP issues (local) npm run php:lint # Same check, in Docker npm run php:lint-fix # Same fix, in Docker npm run php:phpstan # Static analysis npm run lint:js # JavaScript npm run lint:css # CSS ``` Always run phpstan via `npm run php:phpstan`. Bare `vendor/bin/phpstan analyse` crashes a worker at the default 128M and still crashes at 1G; the npm script passes the 2048M that actually works. ## Project-Specific Rules | Area | Standard | | ------------------ | ------------------------------------------ | | PHP | 7.4+, WordPress Coding Standards | | Prefixes | `sh`, `simplehistory`, `simple_history` | | Text domain | `simple-history` | | CSS naming | SuitCSS: `sh-ComponentName-subpart` | | Array syntax | Short `[]` not `array()` | | Control structures | Always use braces `{}`, never colon syntax | ## Essential Principles 1. **Always escape output** - Use WordPress escaping functions 2. **Prefix everything** - All hooks, functions, classes 3. **Run tools after changes** - phpcs/phpstan before committing ## Detailed Guidelines - [php-standards.md](php-standards.md) - PHP style, happy path, early returns - [css-standards.md](css-standards.md) - SuitCSS naming conventions - [js-standards.md](js-standards.md) - JavaScript conventions - [tooling.md](tooling.md) - phpcs, phpstan, rector usage - [design-principles.md](design-principles.md) - DRY, YAGNI, refactoring patterns ## Related Files - `phpcs.xml.dist` - PHP_CodeSniffer config - `phpstan.neon` - PHPStan config
GitHub에서 보기