From 0fd148ffbb39ea883a7e7799aa1b87c93b31fa17 Mon Sep 17 00:00:00 2001 From: Sergey Krylov Date: Wed, 7 Oct 2026 14:18:14 +0300 Subject: [PATCH] chore: run commitlint in commit-msg hook Local commits now get the same commitlint --strict check as CI. --- .githooks/commit-msg | 2 ++ package.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 .githooks/commit-msg diff --git a/.githooks/commit-msg b/.githooks/commit-msg new file mode 100755 index 0000000..fcc7fea --- /dev/null +++ b/.githooks/commit-msg @@ -0,0 +1,2 @@ +#!/bin/sh +npx --no-install commitlint --edit "$1" --strict diff --git a/package.json b/package.json index 722676f..885321e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "verify": "git diff --check", "release:preview": "release-it --dry-run --ci", "release:prepare": "release-it --ci", - "commitlint": "commitlint" + "commitlint": "commitlint", + "prepare": "git config core.hooksPath .githooks" }, "devDependencies": { "@commitlint/cli": "21.2.2",