Skip to content

Commit

Permalink
docs(*): update contribution guidelines
Browse files Browse the repository at this point in the history
improve commitizen config
  • Loading branch information
monitz87 committed Feb 21, 2022
1 parent ff43853 commit 6abdf96
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 154 deletions.
72 changes: 0 additions & 72 deletions .cz-config.js

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The package should be called `<something>-signing-manager` (i.e. `hashicorp-vaul

## Commits

This repo uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). For automated release versions to work properly, commits must have the affected package name as a scope. For example, if adding a new feature to the `local-signing-manager` package, the commit message should be `feat(local-signing-manager): sign raw messages`. Commits that affect more than one package can use `*` as a scope.
This repo uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). For automated release versions to work properly, commits must have the affected package name as a scope. For example, if adding a new feature to the `local-signing-manager` package, the commit message should be `feat(local-signing-manager): sign raw messages`. Commits that affect all packages can use `*` as a scope.

In order to ensure commits are properly formatted, we use husky to hijack the `git commit` command, so that it launches the commitizen CLI. Additionally, commit messages are validated with commitlint.

Expand Down
10 changes: 9 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
module.exports = {
extends: ['@commitlint/config-conventional', 'cz'],
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [
2,
'always',
['*', 'types', 'local-signing-manager', 'browser-extension-signing-manager'],
],
'scope-empty': [2, 'never'],
},
};
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@commitlint/cli": "^16.2.1",
"@commitlint/config-conventional": "^16.2.1",
"@commitlint/config-nx-scopes": "^16.2.1",
"@ng-easy/builders": "^5.1.1",
"@nrwl/cli": "13.8.2",
"@nrwl/devkit": "13.8.2",
Expand All @@ -42,10 +41,9 @@
"@types/require-from-string": "^1.2.1",
"@typescript-eslint/eslint-plugin": "~5.10.0",
"@typescript-eslint/parser": "~5.10.0",
"commitiquette": "^1.2.1",
"commitizen": "^4.2.4",
"commitlint-config-cz": "^0.13.3",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^6.3.0",
"eslint": "~8.7.0",
"eslint-config-prettier": "8.1.0",
"husky": "^7.0.4",
Expand All @@ -63,7 +61,7 @@
],
"config": {
"commitizen": {
"path": "./node_modules/cz-customizable"
"path": "commitiquette"
}
}
}

0 comments on commit 6abdf96

Please sign in to comment.