From 845ad44b2d089f58117890674f9d505e245003e4 Mon Sep 17 00:00:00 2001 From: hophacker Date: Sun, 13 Mar 2022 00:36:57 +0800 Subject: [PATCH] feat: commitlint init script --- zsh/commitlint.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 zsh/commitlint.zsh diff --git a/zsh/commitlint.zsh b/zsh/commitlint.zsh new file mode 100644 index 0000000..255ff99 --- /dev/null +++ b/zsh/commitlint.zsh @@ -0,0 +1,6 @@ +commitlint_init() { + yarn add husky @commitlint/{config-conventional,cli} -D + echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js + yarn husky install + yarn husky add .husky/commit-msg 'yarn commitlint --edit $1' +}