From fd458404c3b0de1c5d63b6bcf825ada0dfdc33b7 Mon Sep 17 00:00:00 2001 From: Sebastian Blask Date: Sun, 3 Mar 2024 00:39:30 +1300 Subject: [PATCH] build: add commitlint pre-commit hook --- .commitlintrc.yml | 2 ++ .pre-commit-config.yaml | 9 +++++++++ package.json | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 .commitlintrc.yml diff --git a/.commitlintrc.yml b/.commitlintrc.yml new file mode 100644 index 0000000..f18450b --- /dev/null +++ b/.commitlintrc.yml @@ -0,0 +1,2 @@ +extends: + - "@commitlint/config-angular" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a11f635..0684198 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,3 +30,12 @@ repos: hooks: - id: actionlint + + - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook + rev: v9.13.0 + hooks: + - id: commitlint + stages: + - commit-msg + additional_dependencies: + - "@commitlint/config-angular" diff --git a/package.json b/package.json index 377ed1b..264bbc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,8 @@ { "author": "Sebastian Blask", "devDependencies": { + "@commitlint/cli": "^19.0.3", + "@commitlint/config-angular": "^19.0.3", "@eslint/js": "^8.54.0", "@stylistic/eslint-plugin-js": "^1.4.0", "eslint": "^8.54.0",