ci: Integrate commitlint configuration and update PR workflow for conventional commit validation
This commit is contained in:
2 files changed
+46
-33
No files matched your search
@@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
// Allow all types (following the Conventional Commits specification)
|
||||
'type-enum': [
|
||||
2,
|
||||
'always',
|
||||
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'],
|
||||
],
|
||||
// Require type and description (cannot be empty)
|
||||
'type-empty': [2, 'never'],
|
||||
'subject-empty': [2, 'never'],
|
||||
// Limit the length of the Title (header) to 72 characters
|
||||
'header-max-length': [2, 'always', 72],
|
||||
// Require a blank line between title and body/footer (following the Conventional Commits specification)
|
||||
'body-leading-blank': [2, 'always'],
|
||||
'footer-leading-blank': [2, 'always'],
|
||||
// Limit the length of each line in body/description to 500 characters (optional)
|
||||
'body-max-line-length': [2, 'always', 500],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user