export default {
extends: ['@commitlint/config-conventional'],
rules: {
// Type must be one of the following
'type-enum': [
2,
'always',
[
'feat', // New feature
'fix', // Bug fix
'docs', // Documentation only changes
'style', // Changes that don't affect code meaning (white-space, formatting)
'refactor', // Code change that neither fixes a bug nor adds a feature
'perf', // Performance improvement
'test', // Adding or correcting tests
'build', // Changes to 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
],
],
// Type must be lowercase
'type-case': [2, 'always', 'lower-case'],
// Type cannot be empty
'type-empty': [2, 'never'],
// Subject cannot be empty
'subject-empty': [2, 'never'],
// Subject must not end with period
'subject-full-stop': [2, 'never', '.'],
// Subject must be lowercase
'subject-case': [2, 'always', 'lower-case'],
// Header max length 100 characters
'header-max-length': [2, 'always', 100],
// Body max line length 100 characters
'body-max-line-length': [2, 'always', 100],
// Footer max line length 100 characters
'footer-max-line-length': [2, 'always', 100],
},
};