module.exports = { extends: ['@commitlint/config-conventional'], rules: { // Enforce conventional commit types 'type-enum': [ 2, 'always', [ 'feat', // New feature 'fix', // Bug fix 'docs', // Documentation changes 'style', // Code style changes (formatting, etc.) 'refactor', // Code refactoring 'perf', // Performance improvements 'test', // Adding or updating tests 'chore', // Maintenance tasks 'revert', // Revert a previous commit 'build', // Build system changes 'ci', // CI/CD changes ], ], // Scope is optional 'scope-empty': [1, 'never'], // Subject must not be empty 'subject-empty': [2, 'never'], // Subject must be in sentence case 'subject-case': [0], // Subject line length 'subject-max-length': [2, 'always', 72], // Body line length 'body-max-line-length': [2, 'always', 100], // Footer line length 'footer-max-line-length': [2, 'always', 100], }, };