From ae0e1016803bc32457c15d19a82bd2b3b844ea54 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 24 Feb 2026 02:32:05 +0000 Subject: [PATCH] chore: replace blacken-docs with mdformat, add prettier for yaml Sync pre-commit config from deepmd-kit@69eb0c3bb10be0ace823a5240c9fef6d0bb26c08 Changes: - Replace blacken-docs with mdformat for markdown formatting - Add mdformat plugins: myst, ruff, web, config, beautysh, gfm-alerts - Add prettier for yaml formatting only Authored by OpenClaw (model: glm-5) --- .pre-commit-config.yaml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8ec1ab5..730660d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,10 +34,25 @@ repos: hooks: - id: velin args: ["--write"] -# Python inside docs -- repo: https://github.com/asottile/blacken-docs - rev: 1.20.0 + # markdown + - repo: https://github.com/hukkin/mdformat + rev: 1.0.0 hooks: - - id: blacken-docs + - id: mdformat + additional_dependencies: + # - mdformat-myst==0.3.0 + # See https://github.com/executablebooks/mdformat-myst/issues/13 + - "git+https://github.com/njzjz-bothub/mdformat-myst@d9c414e#egg=mdformat-myst" + - mdformat-ruff==0.1.3 + - mdformat-web==0.2.0 + - mdformat-config==0.2.1 + - mdformat-beautysh==1.0.0 + - mdformat-gfm-alerts==2.0.0 + # yaml + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + types_or: [yaml] ci: autoupdate_branch: devel