From 7ac3b0770c1bdf51f4397b7c13d15c0aace92d53 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Thu, 21 May 2026 08:32:02 +0200 Subject: [PATCH 1/5] chore(hooks): drop deprecated husky.sh sourcing Remove the legacy Husky prologue lines from pre-commit and commit-msg. Those lines are deprecated and would fail in Husky v10. --- .husky/commit-msg | 3 --- .husky/pre-commit | 3 --- 2 files changed, 6 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 0bd658f49..70bd3dd23 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npx --no-install commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit index 8b91b2a38..a56b7b90b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,2 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - # npm run yaml # npm test From 7b607d607d7308dbcceb708f4f3bcdf835ad593a Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Thu, 21 May 2026 08:32:03 +0200 Subject: [PATCH 2/5] chore(husky): use modern prepare command Replace `husky install` in the prepare script with `husky` to match current Husky recommendations and avoid deprecation churn in future upgrades. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db28004d3..20700eeb6 100644 --- a/package.json +++ b/package.json @@ -219,7 +219,7 @@ "webpack": "webpack", "webpack:analyze": "webpack", "yaml": "node scripts/holidays2json.cjs", - "prepare": "husky install" + "prepare": "husky" }, "commitlint": { "extends": [ From 323b9d4026ea601348b6085f765024bde7253c71 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Thu, 21 May 2026 08:32:03 +0200 Subject: [PATCH 3/5] chore(commitlint): centralize rules in config Keep commitlint configuration in a single place to prevent drift between package.json and commitlint.config.cjs. This makes hook behavior predictable and easier to maintain. --- commitlint.config.cjs | 22 +++++++++++++++++++++- package.json | 32 -------------------------------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/commitlint.config.cjs b/commitlint.config.cjs index 4fedde6da..7fc454024 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1 +1,21 @@ -module.exports = { extends: ['@commitlint/config-conventional'] } +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [ + 2, + 'always', + [ + 'break', + 'feat', + 'fix', + 'chore', + 'docs', + 'refactor', + 'revert', + 'test' + ] + ], + 'subject-case': [2, 'never', ['start-case', 'pascal-case']], + 'scope-case': [0] + } +} diff --git a/package.json b/package.json index 20700eeb6..9bd254fd0 100644 --- a/package.json +++ b/package.json @@ -221,38 +221,6 @@ "yaml": "node scripts/holidays2json.cjs", "prepare": "husky" }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ], - "rules": { - "type-enum": [ - 2, - "always", - [ - "break", - "feat", - "fix", - "chore", - "docs", - "refactor", - "revert", - "test" - ] - ], - "subject-case": [ - 2, - "never", - [ - "start-case", - "pascal-case" - ] - ], - "scope-case": [ - 0 - ] - } - }, "browserslist": [ "> 1%", "last 2 versions", From 16250716c400f43c159342138798d2b3b62e028a Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Thu, 21 May 2026 08:32:04 +0200 Subject: [PATCH 4/5] chore(hooks): call commitlint directly Use the commitlint binary from PATH instead of npx --no-install. Husky already prepends node_modules/.bin, so this reduces startup overhead and keeps the hook simpler. --- .husky/commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 70bd3dd23..284b65c58 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1 @@ -npx --no-install commitlint --edit "$1" +commitlint --edit "$1" From 5fab901572b35930724e45b813c016ab25290ed2 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Thu, 21 May 2026 08:32:04 +0200 Subject: [PATCH 5/5] chore(hooks): run lint on pre-commit Add an active pre-commit check instead of leaving a no-op hook. Running lint before commit catches style and quality issues early and keeps the branch history cleaner. --- .husky/pre-commit | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100755 => 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100755 new mode 100644 index a56b7b90b..3867a0feb --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1 @@ -# npm run yaml -# npm test +npm run lint