-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
37 lines (33 loc) · 1021 Bytes
/
commitlint.config.js
File metadata and controls
37 lines (33 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { createCommitlintConfig } from '@jmlweb/commitlint-config';
const baseConfig = createCommitlintConfig({
ignores: [
(message) => {
const firstLine = message.split('\n')[0]?.trim() ?? '';
// Ignore automated release commits
if (firstLine.includes('[skip ci]')) {
return true;
}
// Ignore specific legacy commits
const ignoredSubjects = new Set([
'Refactor: Ensure backlog and ideas directories persist',
'Refactor docs and ideas structure',
'feat: Add commitlint ignore for specific refactors',
]);
return ignoredSubjects.has(firstLine);
},
],
});
export default {
...baseConfig,
rules: {
...baseConfig.rules,
// Allow flexible subject case (not just lower-case)
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
// Disable body line length limit for longer descriptions
'body-max-line-length': [0, 'always', Infinity],
},
};