Skip to content

Commit

Permalink
chore(dev): 🧑‍💻 improve commit linting
Browse files Browse the repository at this point in the history
Improve commitlint experience, and update docs
  • Loading branch information
johannrichard committed Dec 28, 2022
1 parent b602949 commit f724931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
Contributions are welcome. Here's a few housekeeping rules:

- **opiniated repository**: many things happen by convention. This includes commit messages (conventional-commit) and release management (semantic-release), as well as formatting (prettier, eslint and typescript rules). Not to forget that the build and development process is managed with `yarn`.
- **development cycle**: as more people wish to contribute than just myself, I've created a `homebridge-dingz/next` branch. This is the main development branch, successful change integrations will trickle down from here to the `alpha`, `beta` and then `master` branches, triggering the respective semantic release. Submit your PR's against this branch.
- **testing**: `homebridge` is notoriously difficult to work with with respect to tests. There's little possibility to add automated tests and so there are none. Nevertheless, please test the functionality of the plug-in as good as possible. Ideally, you work on devices and device integrations that you can reasonably test. This includes, but is not limited, to different `dingz` configurations like blinds, lights, buttons and their automations in HomeKit etc.
- **development cycle**: as more people wish to contribute than just myself, I've created a `homebridge-dingz/next` branch. This is the main development branch, successful change integrations will trickle down from here to the `alpha`, `beta` and then `master` branches, triggering the respective semantic release. Submit your PR's against this branch.
- **testing**: `homebridge` is notoriously difficult to work with with respect to tests. There's little possibility to add automated tests and so there are none. Nevertheless, please test the functionality of the plug-in as good as possible. Ideally, you work on devices and device integrations that you can reasonably test. This includes, but is not limited, to different `dingz` configurations like blinds, lights, buttons and their automations in HomeKit etc.

I've worked on this plug-in mostly alone for the past few years so please allow me to get used to working with others as the maintainer. It's a new role for me too. ☺️

[Here](https://medium.com/neudesic-innovation/conventional-commits-a-better-way-78d6785c2e08)'s a good article describing the use of conventional commits and semantic-release. This repository aims to adhere to these rules as much as possible.
[Here](https://medium.com/neudesic-innovation/conventional-commits-a-better-way-78d6785c2e08)'s a good article describing the use of conventional commits and semantic-release. This repository aims to adhere to these rules as much as possible. Here's the gist of the commitlint config:

And last but not least: please be kind.
- **Types**: `build`, `change`, `chore`, `ci`, `deprecate`, `docs`, `feat`, `fix`, `perf`, `refactor`, `remove`, `revert`, `security`, `style`, `test`,
- **Scopes**: `dev`, `deps`, `deps-dev`, `github`, `platform`, `accessory`

If you use the [Conventional Commit](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits) extension for VSCode, you'll find normally find it picked the types and scopes up for you.

And last but not least: please be kind.
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
'scope-enum': [
2,
'always',
['deps-dev', 'github', 'platform', 'accessory'],
['dev', 'deps', 'deps-dev', 'github', 'platform', 'accessory'],
],
'type-enum': [
2,
Expand Down

0 comments on commit f724931

Please sign in to comment.