Files
Space-Game/commitlint.config.js
francy51 cd9846b857
Some checks are pending
CI / TypeScript Check (docs) (push) Waiting to run
CI / TypeScript Check (site) (push) Waiting to run
CI / Rust Check (push) Waiting to run
CI / Security Audit (push) Waiting to run
chore(commitlint): convert config to ESM for module project
The root package.json sets "type": "module", so Node treated
commitlint.config.js as ESM and threw "module is not defined" when
loading the CommonJS module.exports — the config never applied. Switch
to `export default` so the conventional filename stays valid and the
rules are actually enforced by the CLI.
2026-06-16 18:25:40 -04:00

36 lines
1.1 KiB
JavaScript

export default {
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],
},
};