Skip to content

Commit

Permalink
feat: add PR template, add commit lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozwiaczek committed Dec 4, 2020
1 parent 066220f commit ec30b38
Show file tree
Hide file tree
Showing 8 changed files with 581 additions and 26 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
dist/
.docusaurus/
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Overview of PR

<!-- Filling out the template is required. Be sure to add all applicable labels! -->
<!-- Give a general overview of the PR -->

## Technical & Architecture Changes

<!-- Explain any architecture changes/decisions here, if any-->
<!-- Number of new packages in package.json -->
<!-- Link any relevant documents -->
<!-- Screenshots (frontend) -->

## TODO

<!-- Any outstanding ToDos? -->
<!-- `- [ ] task` == todo -->
<!-- `- [x] task` == done -->
1 change: 1 addition & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
hooks: {
'pre-commit': 'lint-staged',
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
},
};
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
.docusaurus
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Installation](#-installation)
- [Prepare and fill secrets](#-prepare-and-fill-secrets)
- [Running the app](#-running-the-app)
- [Conventional Commits](#-conventional-commits)
- [Available scripts](#-available-scripts)
- [Useful docs](#-useful-docs)

Expand Down Expand Up @@ -44,6 +45,19 @@ Copy and paste .env.example into .env and fill all secrets.
yarn storybook
```

## Conventional Commits

Commitlint checks if your commit messages meet the [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/) format.

Example:

```git
feat(blog): add comment section
```

Common types according to commitlint-config-conventional (based on the the Angular convention) can be:
[conventional-commit-types](https://github.com/commitizen/conventional-commit-types/blob/master/index.json)

## Available scripts

To run script, in terminal type `yarn {script}`.
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@storybook/addon-actions": "^6.0.28",
"@storybook/addon-controls": "^6.0.28",
"@storybook/addon-essentials": "^6.0.28",
Expand Down

0 comments on commit ec30b38

Please sign in to comment.