From 4d214e0748553a1303ebd87be46daade2c9eb781 Mon Sep 17 00:00:00 2001 From: willyfh Date: Mon, 24 Aug 2026 08:14:00 +0900 Subject: [PATCH] fix: pin prettier as a local hook so autoupdate can't propose alpha bumps pre-commit.ci's autoupdate always jumps to the highest available tag on the mirrors-prettier repo, which only has v4 alpha pre-releases past v3.1.0 since prettier hasn't cut a stable v4 yet. This has repeatedly produced broken autoupdate PRs (#168, #188, #192, #200). Converting the hook to a local, npm-pinned hook removes it from autoupdate's scope entirely. --- .pre-commit-config.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 642f8ac..da3d089 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,10 +18,20 @@ repos: additional_dependencies: [types-PyYAML] exclude: "tests" - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + # A `local` hook instead of the `mirrors-prettier` repo mirror: that mirror only has alpha + # pre-releases past v3.1.0 (prettier hasn't cut a stable v4 yet), and pre-commit.ci's autoupdate + # always jumps to the highest available tag regardless of pre-release status - repeatedly + # proposing a broken v4.0.0-alpha.x bump (see #168, #188, #192, #200). A `local` hook has no + # `rev` for autoupdate to touch, so it's pinned here until manually bumped to a real stable + # release. + - repo: local hooks: - id: prettier + name: prettier + entry: prettier --write --list-different --ignore-unknown + language: node + types: [text] + additional_dependencies: ["prettier@3.1.0"] - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.49.1