-
Notifications
You must be signed in to change notification settings - Fork 1
/
commitlint.config.js
26 lines (24 loc) · 1.13 KB
/
commitlint.config.js
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
/**
* A configuration for commitlint.
* @see {@link https://commitlint.js.org/#/} for details.
*/
const typeEnum = require('./commit-types.config').map(({ type }) => type)
const scopeEnum = require('./changelog.config').scopes
const subjectMinLength = require('./changelog.config').minMessageLength ?? 3
const subjectMaxLength = require('./changelog.config').maxMessageLength ?? 64
module.exports = {
extends: ['@commitlint/config-conventional'],
/**
* @see {@link https://commitlint.js.org/#/reference-rules} for rule details.
*/
rules: {
'type-enum': [2, 'always', typeEnum],
'scope-enum': [2, 'always', scopeEnum],
'subject-min-length': [2, 'always', subjectMinLength],
'subject-max-length': [2, 'always', subjectMaxLength],
'body-max-length': [0], // releaseコミットがエラーになるため無効化する
'body-max-line-length': [0], // releaseコミットがエラーになるため無効化する
'footer-max-length': [0], // releaseコミットがエラーになるため無効化する
'footer-max-line-length': [0], // releaseコミットがエラーになるため無効化する
},
}