-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
32 lines (28 loc) · 1.02 KB
/
commitlint.config.js
File metadata and controls
32 lines (28 loc) · 1.02 KB
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
const scopes = ['general', 'components', 'reconciler', 'jsx-elements'];
const types = [
{ type: 'build', section: 'Build' },
{ type: 'ci', section: 'Continuous integration' },
{ type: 'chore', section: 'Chore' },
{ type: 'docs', section: 'Documentation' },
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'perf', section: 'Performance' },
{ type: 'refactor', section: 'Refactor' },
{ type: 'revert', section: 'Revert' },
{ type: 'style', section: 'Styles' },
{ type: 'test', section: 'Test' },
// custom types:
{ type: 'improv', section: 'Improvements' },
];
const config = {
extends: ['@commitlint/config-conventional'],
rules: {
'header-max-length': [2, 'always', 100],
'body-max-line-length': [2, 'always', 150],
'type-enum': [2, 'always', types.map(({ type }) => type)],
'scope-empty': [2, 'never'],
'scope-enum': [2, 'always', scopes],
},
};
module.exports = config;
module.exports.types = types;