Skip to content

feat: add pre-commit hooks for formatting and linting#993

Merged
Yunusabdul38 merged 1 commit into
Agora-Events:mainfrom
Abba073:feature/956-pre-commit-hooks
Jun 30, 2026
Merged

feat: add pre-commit hooks for formatting and linting#993
Yunusabdul38 merged 1 commit into
Agora-Events:mainfrom
Abba073:feature/956-pre-commit-hooks

Conversation

@Abba073

@Abba073 Abba073 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #956

Adds pre-commit hooks to enforce code formatting and linting at commit time, preventing unformatted code from reaching CI.

Changes

  • .pre-commit-config.yaml — defines hooks for:

    • pre-commit-hooks: trailing whitespace, EOF fixer, merge-conflict detector
    • rustfmt (local): cargo fmt --all -- --check
    • cargo clippy (local): --all-targets --all-features -D warnings
    • prettier (mirrors-prettier v3.1.0): JS/TS/CSS/JSON/MD files
    • eslint (local via pnpm): pnpm --filter web lint
  • .github/workflows/pre-commit.yml — CI job that runs pre-commit run --all-files on every push/PR to main and develop

  • DEVELOPMENT_SETUP.md — added section 11 documenting install, activation, hook table, manual run, auto-fix, and skip instructions

How to activate locally

pip install pre-commit
pre-commit install

From then on, every git commit will run the hooks automatically.

Acceptance Criteria

  • Commits that violate formatting are rejected locally
  • CI fails if a push contains unformatted code

- Add .pre-commit-config.yaml with hooks for rustfmt, cargo clippy,
  prettier (v3.1.0), and eslint
- Add .github/workflows/pre-commit.yml CI step that runs
  pre-commit run --all-files on push/PR to main and develop
- Document setup in DEVELOPMENT_SETUP.md (section 11)
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Abba073 is attempting to deploy a commit to the oseh-svg's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Abba073 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Yunusabdul38 Yunusabdul38 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for your contribution

@Yunusabdul38 Yunusabdul38 merged commit 37dbde2 into Agora-Events:main Jun 30, 2026
1 check failed
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.

DEVEX: Add pre‑commit hooks for formatting and linting

2 participants