Skip to content

Commit 43eeab3

Browse files
authored
chore(linting): add commitlint prompt and hook (#23)
setup the repository to conform to the Conventional Commits guidelines. Includes contribution documentation. NOTE: There is currently a bug in the footer-leading-blank rule that does not properly detect leading blank lines (https://github.com/marionebl/commitlint/issues/292) closes #12
1 parent 6bb07da commit 43eeab3

File tree

4 files changed

+386
-24
lines changed

4 files changed

+386
-24
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Contributing to Angular Redux
2+
3+
## Package Management
4+
5+
This repo utilizes [Yarn Workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) for package management. Please install and use [Yarn](https://yarnpkg.com/en/docs/getting-started) as your npm client for this project. The npm cli is not supported for package installation.
6+
7+
## Commit Message Guidelines
8+
9+
We follow the [Conventional Commits](https://conventionalcommits.org/) guidelines. These are enforced through the use of [commitlint](http://marionebl.github.io/commitlint). If you would like a more interactive way of formatting your commit messages, run `yarn commit` once your changes are staged.

commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
"packages/*"
55
],
66
"scripts": {
7-
"build": "lerna run build",
8-
"lint": "lerna run lint"
7+
"build": "lerna run build",
8+
"lint": "lerna run lint",
9+
"commit": "commit",
10+
"commitmsg": "commitlint -E GIT_PARAMS"
911
},
1012
"devDependencies": {
13+
"@commitlint/cli": "^7.0.0",
14+
"@commitlint/config-conventional": "^7.0.1",
15+
"@commitlint/prompt-cli": "^7.0.0",
16+
"husky": "^0.14.3",
1117
"lerna": "2.11.0"
1218
}
1319
}

0 commit comments

Comments
 (0)