chore(pre-commit): add pre-commit

This commit is contained in:
MingxuanGame
2025-07-25 20:46:52 +08:00
parent f347b680b2
commit 46c19dddc1
14 changed files with 748 additions and 642 deletions

16
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,16 @@
default_install_hook_types: [pre-commit, prepare-commit-msg]
ci:
autofix_commit_msg: "chore(deps): auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: master
autoupdate_schedule: monthly
autoupdate_commit_msg: "chore(deps): auto update by pre-commit hooks"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.2
hooks:
- id: ruff-check
args: [--fix]
stages: [pre-commit]
- id: ruff-format
stages: [pre-commit]