mirror of
https://github.com/huge-dream/django-vue3-admin.git
synced 2026-10-12 20:26:38 +00:00
- 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)
21 lines
546 B
YAML
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
|