Skip to content

Add pre-commit hooks (ESLint + Ruff via Husky)#99

Open
meninoebom wants to merge 1 commit into
mainfrom
chore/pre-commit-hooks
Open

Add pre-commit hooks (ESLint + Ruff via Husky)#99
meninoebom wants to merge 1 commit into
mainfrom
chore/pre-commit-hooks

Conversation

@meninoebom
Copy link
Copy Markdown
Owner

Summary

  • Install husky and lint-staged at repo root to run pre-commit checks
  • JS/TS files (frontend/**/*.{ts,tsx,js,jsx}): ESLint with --fix via lint-staged (only staged files)
  • Python files (backend/**/*.py): ruff check + ruff format --check on staged files only

This keeps the commit hook fast by only checking staged files, and avoids blocking on pre-existing lint issues in auto-generated files (e.g., Alembic migrations).

Test plan

  • Stage a frontend .tsx file with a lint issue and verify ESLint catches/fixes it
  • Stage a backend .py file with a formatting issue and verify ruff blocks the commit
  • Commit with no staged JS/Python files and verify it passes cleanly

🤖 Generated with Claude Code

Install husky + lint-staged at repo root to run ESLint (--fix) on
staged frontend TS/TSX/JS/JSX files and ruff check + ruff format
--check on staged backend Python files before every commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@railway-app
Copy link
Copy Markdown

railway-app Bot commented Mar 12, 2026

🚅 Deployed to the tend-pr-99 environment in Tend

Service Status Web Updated (UTC)
Tend Backend ✅ Success (View Logs) Mar 12, 2026 at 11:24 pm
Tend Frontend ✅ Success (View Logs) Web Mar 12, 2026 at 11:23 pm

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