Skip to content

Commit

Permalink
chore: implement conventional commit standard (#586)
Browse files Browse the repository at this point in the history
* chore: add commitlint

* chore: add husky for linting before commits

* chore: use exact deps

* chore: add commitizen to project

* docs: add conventional commit entry to readme
  • Loading branch information
dubisdev authored Aug 31, 2022
1 parent ff02506 commit fdd497c
Show file tree
Hide file tree
Showing 5 changed files with 980 additions and 51 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ Use shortcut `ctrl+space` to open app window and type `Cerebro Settings`. There

## For developers

### Conventional Commit Format

The project is using conventional commit specification to keep track of changes. This helps us with the realeases and enforces a consistent style.
You can commit as usually or use the following commands that will help you to commit with the right style:

* `yarn cz`
* `yarn commit`

### Publish a release

CerebroApp is using GH actions to build the app and publish it to a release. To publish a new release follow the steps below:
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"release": "build -mwl --draft",
"dev": "run-p hot-server start-hot",
"postinstall": "electron-builder install-app-deps",
"package": "yarn build && npx electron-builder"
"package": "yarn build && npx electron-builder",
"prepare": "husky install",
"commit": "cz"
},
"build": {
"productName": "Cerebro",
Expand Down Expand Up @@ -144,11 +146,15 @@
"@babel/preset-env": "7.18.10",
"@babel/preset-react": "7.18.6",
"@babel/register": "7.18.9",
"@commitlint/cli": "17.1.2",
"@commitlint/config-conventional": "17.1.0",
"autoprefixer": "10.4.8",
"babel-loader": "8.2.5",
"commitizen": "4.2.5",
"copy-webpack-plugin": "6.4.0",
"cross-env": "7.0.3",
"css-loader": "5.2.7",
"cz-conventional-changelog": "3.3.0",
"electron": "19.0.14",
"electron-builder": "22.14.13",
"eslint": "8.23.0",
Expand All @@ -159,6 +165,7 @@
"eslint-plugin-react": "7.31.1",
"eslint-plugin-react-hooks": "4.6.0",
"express": "4.18.1",
"husky": "8.0.1",
"jest": "27.5.1",
"lodash-webpack-plugin": "0.11.6",
"mini-css-extract-plugin": "1.6.2",
Expand Down Expand Up @@ -196,5 +203,10 @@
},
"devEngines": {
"node": ">=16.x"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit fdd497c

Please sign in to comment.