Skip to content

Commit f49e755

Browse files
committed
ci: tweak commit lint scope
1 parent 67e50a4 commit f49e755

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.commitlintrc.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
const fs = require('fs')
22
const path = require('path')
33

4-
const VuepressPackages = fs.readdirSync(path.resolve(__dirname, 'packages/@vuepress'))
4+
const vuepressPackages = fs.readdirSync(path.resolve(__dirname, 'packages/@vuepress'))
5+
const availableScopes = [
6+
'all',
7+
'cli',
8+
'zh',
9+
...vuepressPackages
10+
]
511

612
module.exports = {
713
extends: [
@@ -12,10 +18,9 @@ module.exports = {
1218
2,
1319
'always',
1420
[
15-
'cli',
16-
'zh',
17-
...VuepressPackages
18-
].map(name => `$${name}`)
21+
...availableScopes,
22+
...availableScopes.map(name => `$${name}`)
23+
]
1924
]
2025
}
2126
}

0 commit comments

Comments
 (0)