gendesign/.pre-commit-config.yaml
bot-backend be63b249b5
Some checks failed
Deploy Trade-In / changes (push) Successful in 4s
Deploy Trade-In / test (push) Failing after 4s
Deploy Trade-In / build-backend (push) Has been skipped
Deploy Trade-In / build-frontend (push) Successful in 25s
Deploy Trade-In / deploy (push) Has been skipped
chore(tradein): close pre-commit ruff gap + add CI pytest gate (#666) (#675)
Co-authored-by: bot-backend <bot-backend@gendsgn.local>
Co-committed-by: bot-backend <bot-backend@gendsgn.local>
2026-05-29 19:18:48 +00:00

39 lines
1.2 KiB
YAML

# Local pre-commit hooks. Install once with:
# pip install pre-commit
# pre-commit install
#
# After install: every `git commit` runs these checks against staged files.
# Failures abort the commit.
repos:
# Generic hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: ^backend/alembic/script.py.mako$
- id: check-toml
- id: check-added-large-files
args: ["--maxkb=512"]
- id: check-merge-conflict
- id: detect-private-key
# Python — ruff (lint + format) on backend/ + tradein-mvp/backend/
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- id: ruff
args: [--fix]
files: ^(backend|tradein-mvp/backend)/
- id: ruff-format
files: ^(backend|tradein-mvp/backend)/
# Frontend — prettier on TS/TSX/JSON
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
files: ^frontend/.*\.(ts|tsx|js|jsx|json|css|md)$
exclude: ^frontend/(node_modules|\.next|package-lock\.json)/