Skip to content

Commit 323b9d4

Browse files
chore(commitlint): centralize rules in config
Keep commitlint configuration in a single place to prevent drift between package.json and commitlint.config.cjs. This makes hook behavior predictable and easier to maintain.
1 parent 7b607d6 commit 323b9d4

2 files changed

Lines changed: 21 additions & 33 deletions

File tree

commitlint.config.cjs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,21 @@
1-
module.exports = { extends: ['@commitlint/config-conventional'] }
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'type-enum': [
5+
2,
6+
'always',
7+
[
8+
'break',
9+
'feat',
10+
'fix',
11+
'chore',
12+
'docs',
13+
'refactor',
14+
'revert',
15+
'test'
16+
]
17+
],
18+
'subject-case': [2, 'never', ['start-case', 'pascal-case']],
19+
'scope-case': [0]
20+
}
21+
}

package.json

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -221,38 +221,6 @@
221221
"yaml": "node scripts/holidays2json.cjs",
222222
"prepare": "husky"
223223
},
224-
"commitlint": {
225-
"extends": [
226-
"@commitlint/config-conventional"
227-
],
228-
"rules": {
229-
"type-enum": [
230-
2,
231-
"always",
232-
[
233-
"break",
234-
"feat",
235-
"fix",
236-
"chore",
237-
"docs",
238-
"refactor",
239-
"revert",
240-
"test"
241-
]
242-
],
243-
"subject-case": [
244-
2,
245-
"never",
246-
[
247-
"start-case",
248-
"pascal-case"
249-
]
250-
],
251-
"scope-case": [
252-
0
253-
]
254-
}
255-
},
256224
"browserslist": [
257225
"> 1%",
258226
"last 2 versions",

0 commit comments

Comments
 (0)