mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
* feat(hooks): add config protection hook to block linter config manipulation Agents frequently modify linter/formatter configs (.eslintrc, biome.json, .prettierrc, .ruff.toml, etc.) to make checks pass instead of fixing the actual code. This PreToolUse hook intercepts Write/Edit/MultiEdit calls targeting known config files and blocks them with a steering message that directs the agent to fix the source code instead. Covers: ESLint, Prettier, Biome, Ruff, ShellCheck, Stylelint, and Markdownlint configs. Fixes #733 * Address review: fix dead code, add missing configs, export run() - Removed pyproject.toml from PROTECTED_FILES (was dead code since it was also in PARTIAL_CONFIG_FILES). Added comment explaining why it's intentionally excluded. - Removed PARTIAL_CONFIG_FILES entirely (no longer needed). - Added missing ESLint v9 TypeScript flat configs: eslint.config.ts, eslint.config.mts, eslint.config.cts - Added missing Prettier ESM config: prettier.config.mjs - Exported run() function for in-process execution via run-with-flags, avoiding the spawnSync overhead (~50-100ms per call). * Handle stdin truncation gracefully, log warning instead of fail-open If stdin exceeds 1MB, the JSON would be malformed and the catch block would silently pass through. Now we detect truncation and log a warning. The in-process run() path is not affected. |
||
|---|---|---|
| .. | ||
| auto-tmux-dev.js | ||
| check-console-log.js | ||
| check-hook-enabled.js | ||
| config-protection.js | ||
| cost-tracker.js | ||
| doc-file-warning.js | ||
| evaluate-session.js | ||
| governance-capture.js | ||
| insaits-security-monitor.py | ||
| insaits-security-wrapper.js | ||
| mcp-health-check.js | ||
| post-bash-build-complete.js | ||
| post-bash-pr-created.js | ||
| post-edit-console-warn.js | ||
| post-edit-format.js | ||
| post-edit-typecheck.js | ||
| pre-bash-dev-server-block.js | ||
| pre-bash-git-push-reminder.js | ||
| pre-bash-tmux-reminder.js | ||
| pre-compact.js | ||
| pre-write-doc-warn.js | ||
| quality-gate.js | ||
| run-with-flags-shell.sh | ||
| run-with-flags.js | ||
| session-end-marker.js | ||
| session-end.js | ||
| session-start.js | ||
| suggest-compact.js | ||