-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy path.commitlintrc.mjs
More file actions
38 lines (36 loc) · 922 Bytes
/
.commitlintrc.mjs
File metadata and controls
38 lines (36 loc) · 922 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
38
import fastGlobPkg from 'fast-glob'
import {readJSONSync} from 'fs-extra/esm'
import {dirname} from 'node:path'
const {sync: globSync} = fastGlobPkg
const packages = [
...globSync('./packages/*/package.json').map(fn => readJSONSync(fn).name),
...globSync('./crates/*/BUILD.bazel').map(fn => dirname(fn).split('crates/')[1]),
// renovate bot config package
'deps',
]
export default {
extends: ['@commitlint/config-angular'],
rules: {
// Cheatsheet: https://commitlint.js.org/#/reference-rules
// Sweet Jesus why is disabling a rule syntax so verbose??
'scope-enum': [2, 'always', packages],
'header-max-length': [0, 'never', Infinity],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
}