1.0.5 • Published 3 years ago
@default-konfig/branch-linter v1.0.5
Branch linter config
Why ?
To enforce consistency in branch name by imposing a standard when a branch is pushed.
Installation :
Install package && dependencies :
npm i @default-konfig/branch-linter branch-name-lint -D
Put in npm script :
"lint-branch": "branch-name-lint ./node_modules/@default-konfig/branch-linter/settings.json",
Add script to husky pre-push :
npx husky add .husky/pre-push 'npm run lint-branch'
Modification
If you want to update the package, you need to:
- Make modification on repository.
- Go to project branch-linter directory.
- Create a new branch.
- Execute
npx branch-name-lint ./settings.json
in order to validate the new branch name.
Syntax
The adopted standard is who/type/name-feature/jira-issue-id
as defined in settings.json.
Example: samuelclo/feat/integrate-branch-linter/KOAPP-123
- Names : samuelclo|amalloggia|mobuis|n1c01a5|davidlefrancq|adscud|regisfontaine|tomyspagnoletti
- Types : feat|fix|hotfix|release
- Jira-issues-id: KOAPP-123 to learn more