From 91c64cde706ecdbec5b49c96fc4a0821240f78ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Sat, 16 May 2026 11:32:19 +0300 Subject: [PATCH] =?UTF-8?q?chore(lefthook):=20cspell=20--no-gitignore=20?= =?UTF-8?q?=E2=80=94=20staged-=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B4=20gitignored=20.claude/worktrees/=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D1=8F=D0=BB=D0=B8=D1=81?= =?UTF-8?q?=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cspell.json useGitignore:true заставлял cspell игнорировать все файлы worktree, расположенного под gitignored .claude/worktrees/ (Files checked: 0 — фейковый green). Staged-файлы по определению tracked, потому --no-gitignore для pre-commit cspell безопасен и чинит worktree-коммиты. Co-Authored-By: Claude Opus 4.7 (1M context) --- lefthook.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index 60c6539c..911d33e3 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -38,9 +38,11 @@ pre-commit: Запусти `npm run lint:md:fix` или поправь руками. # 3. cspell — орфография на staged .md + # --no-gitignore: staged-файлы по определению tracked; без флага cspell + # (useGitignore:true) игнорирует worktree-коммиты под gitignored .claude/worktrees/. - name: cspell glob: "*.md" - run: npx cspell --no-progress --no-summary {staged_files} + run: npx cspell --no-progress --no-summary --no-gitignore {staged_files} fail_text: | cspell нашёл слова, отсутствующие в словаре. Если это валидное слово проекта — добавь в cspell-words.txt.