Skip to content

Comments

Add pre-commit hooks with Ruff, ESLint, and Prettier#7

Open
jaseemjaskp wants to merge 3 commits intomainfrom
chore/pre-commit-hooks
Open

Add pre-commit hooks with Ruff, ESLint, and Prettier#7
jaseemjaskp wants to merge 3 commits intomainfrom
chore/pre-commit-hooks

Conversation

@jaseemjaskp
Copy link

Summary

  • Add pre-commit hooks using the pre-commit framework for automated code quality checks on every commit
  • Backend: Ruff lint + format for backend/ and code-explorer/ (Python 3.12, 120 char line length, isort)
  • Frontend: ESLint (migrated from .eslintrc.json to eslint.config.mjs flat config for ESLint 9 / Next.js 16 compatibility) + Prettier with Tailwind CSS class sorting plugin
  • General: trailing whitespace, EOF fixer, YAML/JSON validation, merge conflict detection, large file check (500KB)
  • Add CI lint workflow (.github/workflows/lint.yml) running Ruff + ESLint + Prettier on PRs and pushes to main
  • Add scripts/setup-hooks.sh for one-command developer onboarding
  • Apply one-time Ruff + Prettier formatting across the entire codebase (1007 files)

Test plan

  • pre-commit run --all-files passes all 10 hooks
  • Verify CI lint workflow passes on this PR
  • New developer runs bash scripts/setup-hooks.sh and hooks activate on commit

Set up automated code quality checks using the pre-commit framework:
- Backend: Ruff lint + format (backend/, code-explorer/)
- Frontend: ESLint (migrated to flat config) + Prettier with Tailwind plugin
- General: trailing whitespace, EOF fixer, YAML/JSON checks, merge conflict detection
- CI: GitHub Actions lint workflow for PRs and pushes to main
- Developer setup: scripts/setup-hooks.sh for one-command onboarding
One-time auto-format of all existing code:
- 579 Python files reformatted by Ruff (backend + code-explorer)
- Frontend files reformatted by Prettier with Tailwind class sorting
@jaseemjaskp jaseemjaskp requested a review from shuveb February 21, 2026 13:02
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