-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commit): enhance commitlint configuration
Improved commitlint configuration with better documentation and additional rules - Added detailed comments for each commit type - Added new rules for body and footer formatting - Improved overall code documentation
- Loading branch information
1 parent
ba61b4c
commit c5390bd
Showing
2 changed files
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,35 @@ | ||
/** | ||
* Commitlint configuration for enforcing Angular commit convention | ||
* See: https://github.com/conventional-changelog/commitlint | ||
*/ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [ | ||
2, | ||
'always', | ||
[ | ||
'feat', // New feature | ||
'fix', // Bug fix | ||
'docs', // Documentation only changes | ||
'style', // Changes that do not affect the meaning of the code | ||
'refactor',// A code change that neither fixes a bug nor adds a feature | ||
'perf', // A code change that improves performance | ||
'test', // Adding missing tests or correcting existing tests | ||
'build', // Changes that affect the build system or external dependencies | ||
'ci', // Changes to our CI configuration files and scripts | ||
'chore', // Other changes that don't modify src or test files | ||
'revert', // Reverts a previous commit | ||
'feat', // New feature for the user | ||
'fix', // Bug fix for the user | ||
'docs', // Documentation only changes | ||
'style', // Changes that do not affect the meaning of the code (white-space, formatting, 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 or correcting existing tests | ||
'build', // Changes that affect the build system or external dependencies | ||
'ci', // Changes to our CI configuration files and scripts | ||
'chore', // Other changes that don't modify src or test files | ||
'revert', // Reverts a previous commit | ||
], | ||
], | ||
'type-case': [2, 'always', 'lower'], | ||
'type-empty': [2, 'never'], | ||
'scope-case': [2, 'always', 'lower'], | ||
'subject-empty': [2, 'never'], | ||
'subject-full-stop': [2, 'never', '.'], | ||
'header-max-length': [2, 'always', 72], | ||
'type-case': [2, 'always', 'lowerCase'], // Type must be lowercase | ||
'type-empty': [2, 'never'], // Type cannot be empty | ||
'scope-case': [2, 'always', 'lowerCase'], // Scope must be lowercase | ||
'subject-empty': [2, 'never'], // Subject cannot be empty | ||
'subject-full-stop': [2, 'never', '.'], // Subject cannot end with period | ||
'header-max-length': [2, 'always', 72], // Header has a maximum length | ||
'body-leading-blank': [2, 'always'], // Body should have leading blank line | ||
'footer-leading-blank': [1, 'always'], // Footer should have leading blank line | ||
'body-max-line-length': [2, 'always', 100], // Body lines should not exceed 100 chars | ||
}, | ||
}; |