Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
10 changes: 10 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')

if [ $BRANCH_NAME != '(no branch)' ]
then
# don't run hook when rebasing
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit
fi
33 changes: 33 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// don't care about line length
// 200 seems generous, also just warn
'header-max-length': [1, 'always', 200],
'body-max-line-length': [1, 'always', 200],
'footer-max-line-length': [1, 'always', 200],
// don't care about case
'header-case': [0, 'always', 'lower-case'],
'subject-case': [0, 'always', 'lower-case'],
'body-case': [0, 'always', 'lower-case'],
// don't care about trailing full-stop.
'subject-full-stop': [0, 'never', '.'],
'header-full-stop': [0, 'never', '.'],
// valid types + descriptions
// feel free to add more types as necessary
'type-enum': [2, 'always', [
'build', // Changes that affect the build system
'ci', // Changes to our CI configuration files and scripts.
'docs', // Documentation only changes
'feat', // A new feature
'fix', // A bug fix
'perf', // A code change that improves performance
'refactor', // A code change that neither fixes a bug nor adds a feature
'style', // Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
'test', // Adding missing tests or correcting existing tests
'revert', // git revert
'deps', // Changes that affect external dependencies e.g. refreshing package-lock, updating deps.
'deploy', // for gh-pages
]],
}
}
Loading