Skip to content

ci: enforce black + prettier via pre-commit + lint workflow#15

Merged
rickstaa merged 2 commits into
mainfrom
rs/precommit-lint
Jul 6, 2026
Merged

ci: enforce black + prettier via pre-commit + lint workflow#15
rickstaa merged 2 commits into
mainfrom
rs/precommit-lint

Conversation

@rickstaa

@rickstaa rickstaa commented Jul 6, 2026

Copy link
Copy Markdown
Member

Enforce formatting so nothing merges unformatted — the low-friction standard for a Python + Markdown repo.

What

  • .pre-commit-config.yaml — black (Python), prettier (md/yaml/json), plus whitespace/EOF/yaml/merge-conflict checks. After pre-commit install, these run on git commit and auto-fix.
  • .github/workflows/lint.yml — runs the same hooks on every PR and push to main. The YAML config is the single source of truth for local and CI.
  • First formatting pass applied (emphasis markers, bracket spacing, JSON layout). No prose rewrapped — prettier's proseWrap: preserve leaves hand-wrapped paragraphs alone.

How devs use it

uvx pre-commit install   # once per clone; hooks then run on git commit

CI catches anyone who skips it locally. Make the lint check required in branch protection to gate merges.

rickstaa and others added 2 commits July 6, 2026 11:57
Add .pre-commit-config.yaml (black for Python; prettier for md/yaml/json;
whitespace/EOF/yaml/merge-conflict checks) so `git commit` auto-formats
locally after `pre-commit install`. A lint workflow runs the same hooks on
every PR and push to main, so the config is the single source of truth for
both. Also applies the first formatting pass (emphasis markers, bracket
spacing, JSON layout) so the repo is already clean under the new hooks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add CONTRIBUTING.md (issues, Conventional Commits, pre-commit formatters,
Discord) modeled on livepeer/explorer's guide, and link it from the README.
Shorten the .pre-commit-config.yaml header comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rickstaa rickstaa merged commit 6fb1c4c into main Jul 6, 2026
1 check passed
@rickstaa rickstaa deleted the rs/precommit-lint branch July 6, 2026 10:09
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