Skip to content

Commit 4c27b16

Browse files
committed
chore(hooks): finalize cleanup and documentation updates
1 parent 22b813a commit 4c27b16

File tree

4 files changed

+15
-220
lines changed

4 files changed

+15
-220
lines changed

booster/.husky/pre-commit.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
#!/usr/bin/env zx
22

33
/**
4-
* Pre-commit hook - ZX TypeScript implementation for JS/TS projects
4+
* Pre-commit hook - ZX TypeScript implementation
55
*
6-
* Runs JS quality tools on staged files:
7-
* - ESLint (auto-fixes)
8-
* - Prettier (auto-fixes)
9-
* - Stylelint (auto-fixes)
6+
* Runs quality tools on staged files:
7+
* - PHP: Syntax Check, Rector, ECS, PHPStan, Psalm, Deptrac
8+
* - JS/TS: ESLint, Prettier, Stylelint
109
*
1110
* Environment Variables:
1211
* - SKIP_PRECOMMIT=1: Skip the entire pre-commit hook
1312
* - GIT_HOOKS_VERBOSE=1: Enable verbose output for debugging
14-
* - SKIP_ESLINT=1: Skip ESLint
15-
* - SKIP_PRETTIER=1: Skip Prettier
16-
* - SKIP_STYLELINT=1: Skip Stylelint
13+
* - SKIP_<TOOL_NAME>=1: Skip specific tool (e.g. SKIP_RECTOR, SKIP_ESLINT)
1714
*/
1815
import { generateDeptracImage, getStagedFiles, GitHook, log, runHook, runQualityTools } from './shared/index.ts'
1916
import { TOOLS } from './shared/tools.ts'

booster/.husky/shared/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const TOOLS: ToolConfig[] = [
7171
extensions: ['.php'],
7272
},
7373
{
74-
name: 'EasyCodingStandard',
74+
name: 'ECS',
7575
command: 'ecs',
7676
args: ['check', '--fix'],
7777
type: 'php',

booster/.husky/tests/utils.test.mjs

Lines changed: 0 additions & 209 deletions
This file was deleted.

docs/content/3.tools/4.git_hooks.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,28 @@ Git hooks are scripts that run automatically at specific points in your Git work
1414

1515
### Pre-commit (`pre-commit.ts`)
1616

17-
Runs PHP quality tools on staged files before committing:
18-
- **PHP Lint** - Syntax validation
17+
Runs quality tools on staged files before committing:
18+
- **PHP Syntax Check** - Syntax validation
1919
- **Rector** - Automatic refactoring and upgrades
2020
- **ECS** - Code style fixes (auto-fix)
2121
- **PHPStan** - Static analysis
2222
- **Psalm** - Static analysis with type checking
2323
- **Deptrac** - Architecture validation
24+
- **ESLint** - JS/TS linting (auto-fix)
25+
- **Prettier** - Code formatting (auto-fix)
26+
- **Stylelint** - CSS/SCSS linting (auto-fix)
2427

2528
**Environment Variables:**
2629
- `SKIP_PRECOMMIT=1` - Skip entire hook
30+
- `SKIP_PHP_SYNTAX_CHECK=1` - Skip PHP Syntax Check
2731
- `SKIP_RECTOR=1` - Skip Rector
2832
- `SKIP_ECS=1` - Skip ECS
2933
- `SKIP_PHPSTAN=1` - Skip PHPStan
3034
- `SKIP_PSALM=1` - Skip Psalm
3135
- `SKIP_DEPTRAC=1` - Skip Deptrac
36+
- `SKIP_ESLINT=1` - Skip ESLint
37+
- `SKIP_PRETTIER=1` - Skip Prettier
38+
- `SKIP_STYLELINT=1` - Skip Stylelint
3239
- `GIT_HOOKS_VERBOSE=1` - Enable verbose logging
3340

3441
### Pre-push (`pre-push.ts`)

0 commit comments

Comments
 (0)