Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: setup conventional commits #8

Merged
merged 2 commits into from
Jul 10, 2022
Merged

Conversation

siuangie91
Copy link
Owner

All commits must be conventional.

Sets up a pre-commit hook that validates the commit message with CommitLint and Husky.

❌ Invalid commit message
This message does not follow the convention and therefore was flagged by Husky.

invalid

✅ Valid commit message
This message follows the convention.

valid

@siuangie91 siuangie91 linked an issue Jul 10, 2022 that may be closed by this pull request
@siuangie91 siuangie91 merged commit 0dd65e2 into main Jul 10, 2022
@siuangie91 siuangie91 deleted the setup-conventional-commits branch July 10, 2022 02:19
Comment on lines +1 to +8
module.exports = {
extends: ['@commitlint/config-conventional'],
'type-enum': [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert'],
],
};
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note

Set up using .cjs extension because of this error: conventional-changelog/commitlint#3251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up conventional commits
1 participant