-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
28 lines (24 loc) · 847 Bytes
/
commitlint.config.ts
File metadata and controls
28 lines (24 loc) · 847 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
import type { UserConfig } from '@commitlint/types';
const typeEnum = ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore', 'revert', 'revup'];
const scopeEnum = ['added', 'fixed', 'changed', 'removed', 'deprecated'];
// Template: <type>(<scope>): <subject>
// Examples:
// fix(fixed): fix bug
// feat(added): add feature
// chore(changed): change config
// style(removed): remove style
// docs(deprecated): deprecate doc
// refactor: refactor code
// test: add test
const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-empty': [2, 'never'],
'type-enum': [2, 'always', typeEnum],
'subject-empty': [0, 'always'],
'scope-empty': [2, 'never'],
'scope-enum': [2, 'always', scopeEnum],
'header-max-length': [2, 'always', 512],
},
};
module.exports = Configuration;