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], + }, +};