Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
chore(other): adds commitlint and commitzen (#52)
Browse files Browse the repository at this point in the history
Add commitlint and commitzen to the project to promote and enforce
conventional comments.

https://conventionalcommits.org
  • Loading branch information
waldenraines authored May 7, 2020
1 parent 74148a9 commit 6fff3b7
Show file tree
Hide file tree
Showing 4 changed files with 1,807 additions and 2,391 deletions.
6 changes: 6 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"@commitlint/config-conventional",
"cz"
]
}
59 changes: 59 additions & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const types = [
` feat: A new feature`,
` fix: A bug fix`,
` docs: Documentation only changes`,
` style: Changes that do not affect the meaning of the code
(white-space, formatting, missing semi-colons, etc)`,
` refactor: A code change that neither fixes a bug nor adds a feature`,
` perf: A code change that improves performance`,
` test: Adding missing tests`,
` revert: Revert to a commit`,
` WIP: Work in progress`,
` chore: Changes to the build process or auxiliary tools
and libraries such as documentation generation`
];

const messages = {
type: `Select the type of change that you're committing:`,

subject: `Write a SHORT, IMPERATIVE tense description of the change:\n`,

body: `Provide a LONGER description of the change (optional). Use "|" to break new line:\n`,

breaking: `Describe any BREAKING CHANGES (optional):\n`,

footer: ` List any RELATED ISSUES to this change (optional).\n`,

confirmCommit: `Are you sure you want to proceed with the commit above?`
};

const scopes = [
"card",
"clientpicker",
"createaddress",
"hermit",
"slices",
"testrunner",
"wallet",
"other",
];

module.exports = {
types: types.map((type) => ({
value: type.split(":")[0].trim(),
name: type
})),

scopes: scopes.map((scope) => ({
name: scope
})),

messages,

subjectLimit: 65,
allowCustomScopes: false,
allowTicketNumber: false,
allowBreakingChanges: ["feat", "fix"],
breakingPrefix: "BREAKING CHANGE:",
footerPrefix: "ISSUES:"
};
Loading

0 comments on commit 6fff3b7

Please sign in to comment.