Skip to content

Commit 2831781

Browse files
committed
build: support '.json' extension for config files in commitlint
1 parent 9bdf72d commit 2831781

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

commitlint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ const ls = path =>
55
readdirSync(path)
66
.filter(f => statSync(join(path, f)).isFile())
77
.map(
8-
f => `${path.split(sep).reverse()[0]}/${f.replace(/(\.config)?.js/, '')}`,
8+
f =>
9+
`${path.split(sep).reverse()[0]}/${f.replace(
10+
/(\.config)?.(json|js)/,
11+
'',
12+
)}`,
913
)
1014

1115
module.exports = {

0 commit comments

Comments
 (0)