Skip to content

Commit 3ba5805

Browse files
committed
refactor: reorganize commitlint rules in package.json
1 parent 5d5c2b8 commit 3ba5805

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

commitlint.config.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
module.exports = {
22
extends: ['@commitlint/config-conventional'],
33
// Add any custom rules here if needed
4-
// rules: {
5-
// 'scope-enum': [
6-
// 2,
7-
// 'always',
8-
// ['api', 'ui', 'docs', 'build', 'release', 'deps', 'config']
9-
// ],
10-
// },
4+
rules: {
5+
// Ensure the commit type is never empty
6+
'type-empty': [2, 'never'],
7+
// Ensure the commit subject is never empty
8+
'subject-empty': [2, 'never'],
9+
// Example of a custom rule for scope enumeration (uncomment and modify if needed)
10+
// 'scope-enum': [
11+
// 2,
12+
// 'always',
13+
// ['api', 'ui', 'docs', 'build', 'release', 'deps', 'config']
14+
// ],
15+
},
1116
};
12-
13-
14-
15-

package.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,5 @@
5151
"markdownlint --fix",
5252
"prettier --write"
5353
]
54-
},
55-
"commitlint": {
56-
"extends": [
57-
"@commitlint/config-conventional"
58-
],
59-
"rules": {
60-
"type-empty": [2, "never"],
61-
"subject-empty": [2, "never"]
62-
}
6354
}
6455
}

0 commit comments

Comments
 (0)