chore: add pre-commit guardrails #6

Merged
Noel merged 3 commits from feat/pre-commit-hooks into main 2026-10-18 17:25:59 +00:00
3 Commits
Author SHA1 Message Date
Noel Sabia 81d658a871 fix: pass staged filenames to the eslint pre-commit hook
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Canceled after 15s
PR Check / Secret scan (gitleaks) (pull_request) Canceled after 0s
PR Check / Dependency audit (pull_request) Canceled after 0s
PR Check / Dockerfile lint (droast) (pull_request) Canceled after 0s
PR Check / AI code review (opencode) (pull_request) Canceled after 0s
Validated from review comment 82 on this PR: the 'bash -c' wrapper
consumed the first staged filename as $0 and the command never
referenced $@, so eslint received zero file arguments and linted the
whole repo - --fix silently rewrote unstaged files and WIP lint errors
blocked unrelated commits. The entry now receives filenames directly
from pre-commit (empirically verified with an arg probe); documented
the re-stage loop for --fix and dropped the redundant 'types: [file]'
filter.
2026-10-18 19:25:06 +02:00
Noel 8fa8eb63b2 Merge branch 'main' into feat/pre-commit-hooks
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 35s
PR Check / Typecheck (pull_request) Successful in 38s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 5s
PR Check / Dependency audit (pull_request) Failing after 8s
PR Check / Dockerfile lint (droast) (pull_request) Failing after 5s
PR Check / AI code review (opencode) (pull_request) Successful in 1m19s
2026-10-18 16:25:25 +00:00
Noel Sabia ab7626d5f7 chore: add pre-commit guardrails
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / ESLint (pull_request) Successful in 34s
PR Check / Typecheck (pull_request) Successful in 37s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Successful in 8s
PR Check / AI code review (opencode) (pull_request) Failing after 11s
- gitleaks: block secrets before they enter history
- pre-commit-hooks: whitespace/eof hygiene, yaml/json/toml checks,
  merge-conflict markers, large files, private keys
- commitizen (commit-msg stage): enforce conventional commits so
  release-please always sees releaseable messages
- actionlint: validate workflow files offline
- eslint --fix on staged files (local hook, needs pnpm install)
2026-10-18 18:15:44 +02:00