From e36d3331b92b79814012e154d5cb527ceea4d1f0 Mon Sep 17 00:00:00 2001 From: bubkoo Date: Tue, 21 Sep 2021 11:00:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=9B=A0=EF=B8=8F=20git=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/.gitignore | 1 + .husky/commit-msg | 5 +++++ .husky/common.sh | 1 + .husky/pre-commit | 5 +++++ .husky/prepare-commit-msg | 5 +++++ 5 files changed, 17 insertions(+) create mode 100644 .husky/.gitignore create mode 100755 .husky/commit-msg create mode 100644 .husky/common.sh create mode 100755 .husky/pre-commit create mode 100755 .husky/prepare-commit-msg diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..4861120 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/common.sh" + +yarn commitlint --edit "$1" diff --git a/.husky/common.sh b/.husky/common.sh new file mode 100644 index 0000000..fa11a6a --- /dev/null +++ b/.husky/common.sh @@ -0,0 +1 @@ +echo diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..eb6e8c1 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/common.sh" + +yarn lint-staged diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100755 index 0000000..479439f --- /dev/null +++ b/.husky/prepare-commit-msg @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" +. "$(dirname "$0")/common.sh" + +yarn devmoji -e --lint