From eabe092d62a96e43f59404d82135406535fdb65f Mon Sep 17 00:00:00 2001 From: Mo Date: Mon, 13 Jun 2022 12:23:58 -0500 Subject: [PATCH] chore: add commitlint --- .husky/commit-msg | 4 ++++ .husky/pre-commit | 2 ++ commitlint.config.js | 3 +++ package.json | 12 +----------- 4 files changed, 10 insertions(+), 11 deletions(-) create mode 100755 .husky/commit-msg create mode 100755 .husky/pre-commit create mode 100644 commitlint.config.js diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 000000000..4c49ae6ae --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..2b2afa781 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" \ No newline at end of file diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..98ee7dfc2 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], +} diff --git a/package.json b/package.json index 12ff54660..1e4f6755f 100644 --- a/package.json +++ b/package.json @@ -47,15 +47,5 @@ "webpack": "^5.72.0", "webpack-cli": "^4.9.2" }, - "packageManager": "yarn@3.2.1", - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - } + "packageManager": "yarn@3.2.1" }