Skip to content

Commit

Permalink
chore(linting): add commitlint prompt and hook (#23)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
smithad15 authored Jul 11, 2018
1 parent 6bb07da commit 43eeab3
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 24 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing to Angular Redux

## Package Management

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.

## Commit Message Guidelines

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.
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
};
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
"packages/*"
],
"scripts": {
"build": "lerna run build",
"lint": "lerna run lint"
"build": "lerna run build",
"lint": "lerna run lint",
"commit": "commit",
"commitmsg": "commitlint -E GIT_PARAMS"
},
"devDependencies": {
"@commitlint/cli": "^7.0.0",
"@commitlint/config-conventional": "^7.0.1",
"@commitlint/prompt-cli": "^7.0.0",
"husky": "^0.14.3",
"lerna": "2.11.0"
}
}
Loading

0 comments on commit 43eeab3

Please sign in to comment.