no-ignored-hook-matcher
Disallow matcher fields on Codex hook events that ignore them.
Rule catalog ID: R009
Targeted pattern scope
**/.codex/hooks.json- inline
[hooks]tables in**/.codex/config.toml
What this rule reports
- Codex ignores matcher on {{eventName}} hooks. Remove it so the configuration does not imply filtering that never occurs.
Why this rule exists
Disallow matcher fields on Codex hook events that ignore them.
❌ Incorrect
A file in the targeted scope that produces any diagnostic listed above is incorrect for this rule.
✅ Correct
A file is correct when it uses the documented Codex structure and produces no diagnostic from this rule.
Behavior and migration notes
Included in:
codex.configs.recommendedcodex.configs.strictcodex.configs.all
ESLint flat config example
The preset layers supply the correct Markdown, TOML, or JSON language configuration. Override the rule only in a later matching flat-config entry:
import codex from "@typpi/eslint-plugin-codex";
export default [
...codex.configs.recommended,
{
rules: { "codex/no-ignored-hook-matcher": "error" },
},
];