We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ls
1 parent c34b10a commit 58ed6e9Copy full SHA for 58ed6e9
commitlint.config.js
@@ -1,16 +1,4 @@
1
-const {readdirSync, statSync} = require('fs')
2
-const {join, sep} = require('path')
3
-
4
-const ls = path =>
5
- readdirSync(path)
6
- .filter(f => statSync(join(path, f)).isFile())
7
- .map(
8
- f =>
9
- `${path.split(sep).reverse()[0]}/${f.replace(
10
- /(\.config)?.(json|js)/,
11
- '',
12
- )}`,
13
- )
+const {ls} = require('./src/api/commit')
14
15
module.exports = {
16
extends: ['./src/config/commitlint.config'],
@@ -20,14 +8,14 @@ module.exports = {
20
'always',
21
[
22
'config',
23
- ...ls('./src/config'),
24
'scripts',
25
- ...ls('./src/scripts'),
26
'api',
27
- ...ls('./src/api'),
28
'deps',
29
'deps-dev',
30
'build',
+ ...ls.configs('./src/config'),
17
+ ...ls.configs('./src/scripts'),
18
+ ...ls.configs('./src/api'),
31
19
],
32
33
},
0 commit comments