commitlint.config.mjs•1.73 kB
/**
* @fileoverview Commitlint configuration for conventional commits
* Enforces conventional commit message format for consistent changelog generation
*/
export default {
extends: [
'@commitlint/config-conventional',
],
rules: {
// Type enum - allowed commit types
'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', // Code change that neither fixes a bug nor adds a feature
'perf', // Performance improvements
'test', // Adding missing tests or correcting existing tests
'build', // Changes that affect the build system or external dependencies
'ci', // Changes to CI configuration files and scripts
'chore', // Other changes that don't modify src or test files
'revert', // Reverts a previous commit
'wip', // Work in progress (for development branches)
],
],
// Subject case - allow various cases for flexibility
'subject-case': [
0,
],
// Subject max length
'subject-max-length': [
2,
'always',
100,
],
// Subject min length
'subject-min-length': [
2,
'always',
10,
],
// Subject empty - not allowed
'subject-empty': [
2,
'never',
],
// Header max length
'header-max-length': [
2,
'always',
120,
],
// Body max line length
'body-max-line-length': [
0,
], // Disabled for flexibility
// Footer max line length
'footer-max-line-length': [
0,
], // Disabled for flexibility
},
};