From 8ab679bcbd07e2bcb16ebee0af3ea78f5ce010b5 Mon Sep 17 00:00:00 2001 From: Dylan <99700808+dylankilgore@users.noreply.github.com> Date: Mon, 4 Apr 2022 09:13:30 -0700 Subject: [PATCH] fix: commitlint: adds custom commitlint config (#25) --- packages/octuple/.husky/commit-msg | 4 ++++ packages/octuple/.husky/pre-commit | 2 -- packages/octuple/commitlint.config.js | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 packages/octuple/.husky/commit-msg create mode 100644 packages/octuple/commitlint.config.js diff --git a/packages/octuple/.husky/commit-msg b/packages/octuple/.husky/commit-msg new file mode 100755 index 000000000..d71a03b9f --- /dev/null +++ b/packages/octuple/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn commitlint --edit $1 diff --git a/packages/octuple/.husky/pre-commit b/packages/octuple/.husky/pre-commit index df3ab8d51..d2ae35e84 100755 --- a/packages/octuple/.husky/pre-commit +++ b/packages/octuple/.husky/pre-commit @@ -2,5 +2,3 @@ . "$(dirname "$0")/_/husky.sh" yarn lint-staged - -npx --no-install commitlint --edit "$1" diff --git a/packages/octuple/commitlint.config.js b/packages/octuple/commitlint.config.js new file mode 100644 index 000000000..925d069ac --- /dev/null +++ b/packages/octuple/commitlint.config.js @@ -0,0 +1,25 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'header-max-length': [0, 'always', 100], + 'subject-case': [0], + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + ], + ], + 'scope-empty': [0], + }, +};