From bd7a710a74937950ff9c8362a5722bdfc136bdc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Doll=C3=A9?= Date: Mon, 13 Jun 2022 18:23:46 +0200 Subject: [PATCH] chore: add commitlint and commitizen You can now compose your commit message and description by running `yarn commit` --- .czrc | 3 +++ .husky/commit-msg | 6 ++++++ .husky/pre-commit | 2 +- commitlint.config.cjs | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .czrc create mode 100755 .husky/commit-msg create mode 100644 commitlint.config.cjs diff --git a/.czrc b/.czrc new file mode 100644 index 0000000..11f0406 --- /dev/null +++ b/.czrc @@ -0,0 +1,3 @@ +{ + "path": "@commitlint/cz-commitlint" +} diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..b366e96 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,6 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +[ -n "$CI" ] && exit 0 + +npx --no -- commitlint --verbose --edit diff --git a/.husky/pre-commit b/.husky/pre-commit index 450d658..f9f6d65 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh . "$(dirname "$0")/_/husky.sh" [ -n "$CI" ] && exit 0 diff --git a/commitlint.config.cjs b/commitlint.config.cjs new file mode 100644 index 0000000..69b4242 --- /dev/null +++ b/commitlint.config.cjs @@ -0,0 +1,3 @@ +module.exports = { + extends: ["@commitlint/config-conventional"], +};