Skip to content

Commit a6b7486

Browse files
committed
fix: remove redundant tools
1 parent 9088e5f commit a6b7486

File tree

10 files changed

+90
-2128
lines changed

10 files changed

+90
-2128
lines changed

booster/.git-hooks.config.schema.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@
6666
"$ref": "#/definitions/toolOverride",
6767
"description": "Markdownlint - Markdown style checker (group: lint)"
6868
},
69-
"jscpd": {
70-
"$ref": "#/definitions/toolOverride",
71-
"description": "jscpd - Copy/paste detector (group: analysis)"
72-
},
73-
"Knip": {
74-
"$ref": "#/definitions/toolOverride",
75-
"description": "Knip - Unused files and dependencies finder (group: analysis)"
76-
},
7769
"Flatten JSON": {
7870
"$ref": "#/definitions/toolOverride",
7971
"description": "Flatten JSON - Normalizes JSON files (group: format)"
@@ -82,14 +74,6 @@
8274
"$ref": "#/definitions/toolOverride",
8375
"description": "PHP Syntax Check - PHP lint (group: lint)"
8476
},
85-
"Composer Validate": {
86-
"$ref": "#/definitions/toolOverride",
87-
"description": "Composer Validate - Validates composer.json and composer.lock (group: lint)"
88-
},
89-
"PHP Security Checker": {
90-
"$ref": "#/definitions/toolOverride",
91-
"description": "PHP Security Checker - Checks installed packages for known vulnerabilities (group: security)"
92-
},
9377
"Rector": {
9478
"$ref": "#/definitions/toolOverride",
9579
"description": "Rector - PHP code refactoring (group: refactor)"

booster/.husky/README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ To add a new tool, add a `ToolConfig` object to the `TOOLS` array. To override o
3131

3232
### Configuration Object (`ToolConfig`)
3333

34-
| Property | Type | Description |
35-
| ---------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------ |
36-
| `name` | `string` | Display name of the tool (used in logs and skip-variable derivation). |
37-
| `command` | `string` | The binary command to run (e.g., `eslint`, `rector`). |
38-
| `commandAlternatives` | `string[]` | (Optional) Fallback commands tried in order if `command` is not found (e.g., `['psalm.phar']`). |
39-
| `type` | `'node' \| 'php' \| 'system'` | Where to resolve the binary: `node_modules/.bin`, `vendor/bin`, or system `PATH`. |
40-
| `args` | `string[]` | (Optional) Arguments to pass to the command. |
41-
| `extensions` | `string[]` | (Optional) Only run on files with these extensions. |
42-
| `stagesFilesAfter` | `boolean` | (Optional) If `true`, re-stages files after execution (useful for auto-fixers). |
43-
| `passFiles` | `boolean` | (Optional) If `false`, does not pass staged files to the command. Default is `true`. |
44-
| `runForEachFile` | `boolean` | (Optional) If `true`, runs the command once per file instead of passing all files at once. |
45-
| `description` | `string` | (Optional) Custom log message shown while the tool is running. |
46-
| `onFailure` | `'continue' \| 'stop'` | (Optional) What happens when this tool fails. Default is `'continue'`. Use `'stop'` for syntax checks that must pass before other tools run. |
47-
| `group` | `'format' \| 'lint' \| 'analysis' \| 'refactor'` | (Optional) Tool category for selective execution via `HOOKS_ONLY`. |
34+
| Property | Type | Description |
35+
| --------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
36+
| `name` | `string` | Display name of the tool (used in logs and skip-variable derivation). |
37+
| `command` | `string` | The binary command to run (e.g., `eslint`, `rector`). |
38+
| `commandAlternatives` | `string[]` | (Optional) Fallback commands tried in order if `command` is not found (e.g., `['psalm.phar']`). |
39+
| `type` | `'node' \| 'php' \| 'system'` | Where to resolve the binary: `node_modules/.bin`, `vendor/bin`, or system `PATH`. |
40+
| `args` | `string[]` | (Optional) Arguments to pass to the command. |
41+
| `extensions` | `string[]` | (Optional) Only run on files with these extensions. |
42+
| `stagesFilesAfter` | `boolean` | (Optional) If `true`, re-stages files after execution (useful for auto-fixers). |
43+
| `passFiles` | `boolean` | (Optional) If `false`, does not pass staged files to the command. Default is `true`. |
44+
| `runForEachFile` | `boolean` | (Optional) If `true`, runs the command once per file instead of passing all files at once. |
45+
| `description` | `string` | (Optional) Custom log message shown while the tool is running. |
46+
| `onFailure` | `'continue' \| 'stop'` | (Optional) What happens when this tool fails. Default is `'continue'`. Use `'stop'` for syntax checks that must pass before other tools run. |
47+
| `group` | `'format' \| 'lint' \| 'analysis' \| 'refactor'` | (Optional) Tool category for selective execution via `HOOKS_ONLY`. |
4848

4949
### Example
5050

@@ -94,16 +94,16 @@ Create a `.git-hooks.config.json` file (or `.githooks.json`) in the project root
9494

9595
### Config File Schema
9696

97-
| Field | Type | Description |
98-
| ------------------ | --------- | ------------------------------------------------------------------------------ |
99-
| `verbose` | `boolean` | Enable verbose logging (same as `GIT_HOOKS_VERBOSE=1`). |
100-
| `skip.preCommit` | `boolean` | Skip the entire pre-commit hook. |
101-
| `skip.prePush` | `boolean` | Skip the entire pre-push hook. |
102-
| `skip.commitMsg` | `boolean` | Skip the entire commit-msg hook. |
103-
| `skip.tests` | `boolean` | Skip tests in pre-push (Pest). |
104-
| `skip.artifacts` | `boolean` | Skip artifact generation in pre-push (Deptrac image, API docs). |
105-
| `tools.<Name>` | `object` | Override properties of an existing tool, or define a new custom tool by name. |
106-
| `tools.<Name>.enabled` | `boolean` | Set to `false` to disable a tool entirely. |
97+
| Field | Type | Description |
98+
| ------------------ | --------- | ----------------------------------------------------------------------------- |
99+
| `verbose` | `boolean` | Enable verbose logging (same as `GIT_HOOKS_VERBOSE=1`). |
100+
| `skip.preCommit` | `boolean` | Skip the entire pre-commit hook. |
101+
| `skip.prePush` | `boolean` | Skip the entire pre-push hook. |
102+
| `skip.commitMsg` | `boolean` | Skip the entire commit-msg hook. |
103+
| `skip.tests` | `boolean` | Skip tests in pre-push (Pest). |
104+
| `skip.artifacts` | `boolean` | Skip artifact generation in pre-push (Deptrac image, API docs). |
105+
| `tools.<Name>` | `object` | Override properties of an existing tool, or define a new custom tool by name. |
106+
| `tools.<Name>.enabled` | `boolean` | Set to `false` to disable a tool entirely. |
107107

108108
## Selective Execution (`HOOKS_ONLY`)
109109

@@ -169,13 +169,13 @@ You can control hook behavior with environment variables. These can be set in yo
169169
170170
### General
171171

172-
| Variable | Description |
173-
| --------------------- | ----------------------------------------------------------------------------------------------- |
174-
| `GIT_HOOKS_VERBOSE` | Set to `1` or `true` to enable verbose logging (shows executed commands). |
175-
| `GIT_HOOKS_ENV_FILE` | Path to a custom env file to load at hook startup (overrides `.git-hooks.env` / `.env`). |
176-
| `GIT_HOOKS_CONFIG` | Path to a custom config file (overrides the default `.git-hooks.config.json` lookup). |
177-
| `HOOKS_ONLY` | Comma-separated list of tool groups to run (e.g., `lint,format`). Skips all other groups. |
178-
| `DDEV_PHP` | Set to `false` or `0` to force PHP tools to run on the host even if DDEV is detected. |
172+
| Variable | Description |
173+
| -------------------- | --------------------------------------------------------------------------------------- |
174+
| `GIT_HOOKS_VERBOSE` | Set to `1` or `true` to enable verbose logging (shows executed commands). |
175+
| `GIT_HOOKS_ENV_FILE` | Path to a custom env file to load at hook startup (overrides `.git-hooks.env` / `.env`).|
176+
| `GIT_HOOKS_CONFIG` | Path to a custom config file (overrides the default `.git-hooks.config.json` lookup). |
177+
| `HOOKS_ONLY` | Comma-separated list of tool groups to run (e.g., `lint,format`). Skips all other groups.|
178+
| `DDEV_PHP` | Set to `false` or `0` to force PHP tools to run on the host even if DDEV is detected. |
179179

180180
### Hook-level skips
181181

booster/.husky/shared/tools.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import type { ToolConfig } from './types.ts'
1212
* - 'format': Formatting tools (Prettier, ECS)
1313
* - 'lint': Linting tools (ESLint, Stylelint, PHP Syntax, TypeScript)
1414
* - 'analysis': Static analysis (PHPStan, Psalm, Deptrac)
15-
* - 'security': Security tools (PHP Security Checker)
1615
* - 'refactor': Code refactoring (Rector)
1716
*/
1817

@@ -90,23 +89,6 @@ export const TOOLS: ToolConfig[] = [
9089
extensions: ['.md'],
9190
group: 'lint',
9291
},
93-
{
94-
name: 'jscpd',
95-
command: 'jscpd',
96-
args: ['--ignore', '**/*.d.ts,**/node_modules/**,**/vendor/**,**/.ddev/**,**/var/**,**/public/**,**/storage/**,**/tests/_output/**'],
97-
type: 'node',
98-
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue', '.css', '.scss'],
99-
passFiles: false, // Runs on whole project by default
100-
group: 'analysis',
101-
},
102-
{
103-
name: 'Knip',
104-
command: 'knip',
105-
args: ['--no-exit-code'],
106-
type: 'node',
107-
passFiles: false, // Analyzes project structure
108-
group: 'analysis',
109-
},
11092

11193
// PHP Tools
11294
{
@@ -128,26 +110,6 @@ export const TOOLS: ToolConfig[] = [
128110
extensions: ['.php'],
129111
group: 'refactor',
130112
},
131-
{
132-
name: 'Composer Validate',
133-
command: 'composer',
134-
args: ['validate', '--strict', '--ansi'],
135-
type: 'php',
136-
passFiles: false, // Runs on composer.json
137-
extensions: ['composer.json', 'composer.lock'],
138-
// Only run if composer.json exists
139-
includePatterns: ['composer.json'],
140-
group: 'lint',
141-
},
142-
{
143-
name: 'PHP Security Checker',
144-
command: 'security-checker',
145-
args: ['security:check', '--ansi'],
146-
type: 'php',
147-
passFiles: false, // Runs on composer.lock
148-
extensions: ['composer.lock'],
149-
group: 'security',
150-
},
151113
{
152114
name: 'ECS',
153115
command: 'ecs',

booster/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"phpstan/phpstan": "^2.1.39",
1414
"symplify/easy-coding-standard": "^13.0.4",
1515
"zircote/swagger-php": "^6.0.5",
16-
"enlightn/security-checker": "^2.0",
1716
"psalm/phar": "^6.15.1",
1817
"deptrac/deptrac": "^4.6.0"
1918
},

booster/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
"eslint-config-prettier": "^10.1.8",
2121
"eslint-plugin-prettier": "^5.5.5",
2222
"husky": "^9.1.7",
23-
"jscpd": "^4.0.8",
24-
"knip": "^5.85.0",
23+
"jiti": "^1.21.6",
2524
"markdownlint-cli2": "^0.21.0",
2625
"prettier": "^3.8.1",
2726
"typescript": "^5.9.3",

0 commit comments

Comments
 (0)