require-repository-hook-arrays
Require each repository hook event entry in hooks to be an array.
Rule catalog ID: R058
Targeted pattern scopeâ
.github/hooks/**/*.json
What this rule reportsâ
- hook event values that are objects, strings, numbers, or other non-array JSON values
Why this rule existsâ
Each hook event is documented as an array of hook definitions. Enforcing that array shape keeps the JSON structure consistent and makes it possible to reason about multiple hooks on the same event.
â Incorrectâ
{ "version": 1, "hooks": { "sessionStart": {} } }
â Correctâ
{ "version": 1, "hooks": { "sessionStart": [] } }