Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
feat(commitlint): add conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
fakenickels committed Oct 4, 2019
1 parent 0f101ce commit d536718
Show file tree
Hide file tree
Showing 3 changed files with 722 additions and 16 deletions.
32 changes: 32 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert'
]
]
}
};
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"license": "MIT",
"devDependencies": {
"@apollo/react-hooks": "^3.0.0",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"bs-platform": "^5.0.6",
"husky": "^3.0.5",
"lint-staged": "^9.4.0",
Expand All @@ -35,7 +37,8 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}
Loading

0 comments on commit d536718

Please sign in to comment.