Skip to content

Commit

Permalink
chore: Add commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Jan 6, 2020
1 parent c71a26b commit 1218518
Show file tree
Hide file tree
Showing 3 changed files with 303 additions and 31 deletions.
29 changes: 29 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
parserPreset: 'conventional-changelog-conventionalcommits',
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'scope-case': [2, 'always', 'lower-case'],
'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',
'improvement',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"pascalcase": "^1.0.0"
},
"devDependencies": {
"@commitlint/cli": "^8.3.4",
"@commitlint/config-conventional": "^8.3.4",
"@semantic-release/github": "^5.5.5",
"@semantic-release/npm": "^5.3.4",
"babel-cli": "6.24.1",
Expand All @@ -60,6 +62,7 @@
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "npm run lint",
"pre-push": "npm run test"
}
Expand Down
Loading

0 comments on commit 1218518

Please sign in to comment.