From 489724bff1f384fc3525b5a04e41afd6ba285e8e Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Thu, 6 Aug 2026 18:27:30 +0100 Subject: [PATCH] Sync Vale styles when ``.vale.ini`` changes Gating ``vale sync`` on reStructuredText files alone meant a commit that only bumped the pinned ClearProse package left the gitignored ``styles`` directory on the old rules until the next reStructuredText change. Co-Authored-By: Claude Opus 5 (1M context) --- .pre-commit-config.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4171919a..13c90215 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -295,12 +295,15 @@ repos: # directory. # Vale needs ``rst2html`` from Docutils on the ``PATH`` to parse # reStructuredText. + # ``vale sync`` also runs when ``.vale.ini`` changes, so a package + # bump takes effect without waiting for the next reStructuredText + # change. - id: vale-sync name: vale sync entry: uv run --extra=dev vale sync language: python pass_filenames: false - types_or: [rst] + files: (\.rst$|^\.vale\.ini$) additional_dependencies: - *uv_version stages: [pre-commit]