Skip to content

Commit 996deb3

Browse files
JLHwungmarionebl
authored andcommitted
fix(rules): do not negate case rules (#330)
Many scripts, i.e. Han, Devanagari, are not cased. Thus `ensureCase` will always return true for texts written in these scripts on any case rules. Negating case rules will cause `test: 你好` as invalid since they are conformed to any case rules. For definition of cased, see http://unicode.org/reports/tr44/#Cased
1 parent 458f24c commit 996deb3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

@commitlint/config-angular/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = {
88
'scope-case': [2, 'always', 'lower-case'],
99
'subject-case': [
1010
2,
11-
'never',
12-
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
11+
'always',
12+
['camel-case', 'kebab-case', 'lower-case', 'snake-case']
1313
],
1414
'subject-empty': [2, 'never'],
1515
'subject-full-stop': [2, 'never', '.'],

@commitlint/config-conventional/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module.exports = {
66
'scope-case': [2, 'always', 'lower-case'],
77
'subject-case': [
88
2,
9-
'never',
10-
['sentence-case', 'start-case', 'pascal-case', 'upper-case']
9+
'always',
10+
['camel-case', 'kebab-case', 'lower-case', 'snake-case']
1111
],
1212
'subject-empty': [2, 'never'],
1313
'subject-full-stop': [2, 'never', '.'],

0 commit comments

Comments
 (0)