forked from clerk/javascript
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
Latest commit
18 lines (16 loc) · 583 Bytes
/
Copy pathcommitlint.config.js
File metadata and controls
18 lines (16 loc) · 583 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
constglob=require('glob');
constfs=require('fs');
constgetPackageNames=()=>{
constfiles=glob.sync('./packages/*/package.json');
constnames=files.map(f=>JSON.parse(fs.readFileSync(f,'utf8')).name);
returnnames.map(n=>n.split('/').pop());
};
module.exports={
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [2,'always',['sentence-case']],
'body-max-line-length': [1,'always','150'],
'scope-empty': [2,'never'],
'scope-enum': asyncctx=>[2,'always',[...getPackageNames(),'repo','release']],
},
};