Files
django-vue3-admin/backend/.pre-commit-config.yaml
T
lewis_yan 921a1e2179 feat(git): add pre-commit with ruff for backend
- Add .pre-commit-config.yaml with ruff (lint + format)
- Add pre-commit and ruff to requirements.txt
- Ruff replaces flake8 + black + isort (10-100x faster)
2026-04-03 09:19:32 +08:00

21 lines
546 B
YAML

# 后端 pre-commit hooks 配置
# 安装方式:pip install pre-commit && pre-commit install
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=5000']
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format