Code Issues Pull Requests Actions Packages Projects Releases 15 Wiki Activity Security Code Quality

ci: Integrate commitlint configuration and update PR workflow for conventional commit validation

This commit is contained in:
tienbh committed 2026-11-26 18:06:38 +07:00 Verified
1 parent 0e55734bdf
commit a1146a4d07
2 files changed
+46 -33

No files matched your search

+22
View File
@@ -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],
},
};