Skip to content

Commit

Permalink
feat: upgrade husky and add conventional commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-ellery committed Mar 3, 2022
1 parent b40e59d commit caf8246
Show file tree
Hide file tree
Showing 5 changed files with 824 additions and 172 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run eslint && npm run test
31 changes: 31 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
extends: ['@commitlint/config-conventional'],

rules: {
'body-case': [0],
'subject-case': [0],
'header-max-length': [0],
'type-enum': [
2,
'always',
[
// Conventional Commit types
'feat',
'feature',
'fix',
'perf',
'revert',
'docs',
'style',
'chore',
'refactor',
'test',
'build',
'ci',
// react-slider specific types
'a11y',
'deprecate',
],
],
},
};
Loading

0 comments on commit caf8246

Please sign in to comment.