From cd1cd560fdc8ac6396068c2654be39fb0f0ac080 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Wed, 3 Jun 2026 15:51:44 +0900 Subject: [PATCH] fix(lint): allowlist lines with no Japanese characters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit prh (and other textlint rules) was incorrectly firing on lines that contain no Japanese characters at all — most notably on English-only paragraphs left untranslated by the d-additive defer flow during `/update-origin`. `pnpm lint --fix` would then partially replace tokens like `Signal Forms` with `シグナルフォーム` inside an otherwise pure-English sentence, producing nonsensical bilingual fragments like `シグナルフォームbuilds the field tree...`. Add a textlint filter allowlist pattern that matches any single line containing no Hiragana / Katakana / Han characters and excludes it from rule evaluation. Multi-line English paragraphs are handled line-by-line, so each pure-English line is skipped while truly mixed lines (Japanese prose containing `Signal Forms`) still trigger prh correctly. --- .textlintrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.textlintrc b/.textlintrc index df6ba601cd..602033c3b3 100644 --- a/.textlintrc +++ b/.textlintrc @@ -4,7 +4,8 @@ "allowlist": { "allow": [ "//m", - "/\\{#.*\\}/m" + "/\\{#.*\\}/m", + "/^[^\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}\\n]+$/mu" ] } },