Skip to content

chore: extend pre-commit with hygiene hooks, prettier, and .prettierignore#8

Merged
clappingmonkey merged 1 commit into
mainfrom
chore/extend-pre-commit
Jul 8, 2026
Merged

chore: extend pre-commit with hygiene hooks, prettier, and .prettierignore#8
clappingmonkey merged 1 commit into
mainfrom
chore/extend-pre-commit

Conversation

@clappingmonkey

Copy link
Copy Markdown
Owner

What does this PR do?

Extends the pre-commit configuration with standard file hygiene hooks and Prettier formatting for Markdown/YAML files.

New hooks

pre-commit/pre-commit-hooks v6.0.0:

  • trailing-whitespace — strips trailing whitespace
  • end-of-file-fixer — ensures files end with newline
  • check-yaml — validates YAML syntax
  • check-merge-conflict — detects conflict markers
  • check-added-large-files — prevents >500KB commits
  • check-case-conflict — prevents case-insensitive filename clashes

rbubley/mirrors-prettier v3.9.4 (active fork — pre-commit/mirrors-prettier archived 2024):

  • prettier hook scoped to types_or: [markdown, yaml]
  • No .prettierrc needed — prettier defaults are fine (bazel-contrib convention)

New files

  • .prettierignore — excludes Bazel files, generated/cache, Odin source, plain text, and personal files from prettier

Auto-fixed files (formatting only, no semantic changes)

  • README.md — table column alignment
  • COMPATIBILITY.md — table column alignment
  • .github/workflows/scorecard.yaml — removed extra spaces before inline comment

Hook ordering

  1. File hygiene (trailing-whitespace, end-of-file, check-yaml, etc.)
  2. Buildifier (Starlark formatting + lint)
  3. Typos (spell check)
  4. Prettier (Markdown + YAML formatting)

How was it tested?

  • .venv/bin/pre-commit run --all-files — all 10 hooks pass
  • bazel build //... in root workspace — passes
  • cd e2e/smoke && bazel build //... — passes
  • Adversarial review by @change-validatorAPPROVE, no issues found

Checklist

  • PR title follows conventional commit format
  • CI passes (check.yaml — lint + test matrix)
  • No tests needed (configuration + formatting only)
  • No breaking changes

@clappingmonkey clappingmonkey merged commit bb2ddb0 into main Jul 8, 2026
14 checks passed
@clappingmonkey clappingmonkey deleted the chore/extend-pre-commit branch July 8, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant