You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Favor 'scope' & 'sub-scope' vs 'area' & 'sub-area'
The convention of commitlint upstream documentation is to refer
to the text that goes before the ':' in the title as the
**type(scope)**, but we called it **area(sub-area)** (also
allowed to be written with a slash: **area/sub-area**).
There was no point to really use a different word for it so,
from now on, we will refer to it as scope as well. But we
still don't use type, just scope and sub-scope.
@@ -239,15 +239,15 @@ export abstract class Plugins {
239
239
240
240
letcolonIndex=headerStr.indexOf(":");
241
241
if(colonIndex>=0){
242
-
letareaOrScope=headerStr.substring(0,colonIndex);
243
-
if(areaOrScope.includes("\\")){
242
+
letscope=headerStr.substring(0,colonIndex);
243
+
if(scope.includes("\\")){
244
244
offence=true;
245
245
}
246
246
}
247
247
248
248
return[
249
249
!offence,
250
-
`Please use slash instead of backslash in the area/scope/sub-area section of the title.`+
250
+
`Please use slash instead of backslash in the scope/sub-scope section of the title.`+
251
251
Helpers.errMessageSuffix,
252
252
];
253
253
}
@@ -280,7 +280,7 @@ export abstract class Plugins {
280
280
!Helpers.isProperNoun(firstWord);
281
281
return[
282
282
!offence,
283
-
`Please start the title with an uppercase letter if you haven't specified any area/scope.`+
283
+
`Please start the title with an uppercase letter if you haven't specified any scope.`+
284
284
Helpers.errMessageSuffix,
285
285
];
286
286
}
@@ -318,7 +318,7 @@ export abstract class Plugins {
318
318
319
319
return[
320
320
!offence,
321
-
`Please use "area/scope: subject" or "area(scope): subject" style instead of wrapping area/scope under square brackets in your commit message title`+
321
+
`Please use "scope/sub-scope: subject" or "scope(scope): subject" style instead of wrapping the scope details under square brackets in your commit message title`+
322
322
Helpers.errMessageSuffix,
323
323
];
324
324
}
@@ -339,7 +339,7 @@ export abstract class Plugins {
339
339
340
340
return[
341
341
!offence,
342
-
`Please use lowercase as the first letter for your subject, i.e. the text after your area/scope (note: there is a chance that this rule is yielding a false positive in case the word '${firstWord}' is a name and must be capitalized; in which case please just reword the subject to make this word not be the first, sorry).`+
342
+
`Please use lowercase as the first letter for your subject, i.e. the text after your scope (note: there is a chance that this rule is yielding a false positive in case the word '${firstWord}' is a name and must be capitalized; in which case please just reword the subject to make this word not be the first, sorry).`+
343
343
Helpers.errMessageSuffix,
344
344
];
345
345
}
@@ -350,20 +350,20 @@ export abstract class Plugins {
350
350
letcolonIndex=headerStr.indexOf(":");
351
351
352
352
if(colonIndex>=0){
353
-
letareaOrScope=headerStr.substring(0,colonIndex);
354
-
letcommaIndex=areaOrScope.indexOf(",");
353
+
letscope=headerStr.substring(0,colonIndex);
354
+
letcommaIndex=scope.indexOf(",");
355
355
while(commaIndex>=0){
356
-
if(areaOrScope[commaIndex+1]===" "){
356
+
if(scope[commaIndex+1]===" "){
357
357
offence=true;
358
358
}
359
-
areaOrScope=areaOrScope.substring(commaIndex+1);
360
-
commaIndex=areaOrScope.indexOf(",");
359
+
scope=scope.substring(commaIndex+1);
360
+
commaIndex=scope.indexOf(",");
361
361
}
362
362
}
363
363
364
364
return[
365
365
!offence,
366
-
`No need to use space after comma in the area/scope (so that commit title can be shorter).`+
366
+
`No need to use space after comma in the scope (so that commit title can be shorter).`+
367
367
Helpers.errMessageSuffix,
368
368
];
369
369
}
@@ -462,8 +462,8 @@ export abstract class Plugins {
462
462
463
463
letcolonIndex=headerStr.indexOf(":");
464
464
if(colonIndex>=0){
465
-
letareaOrScope=headerStr.substring(0,colonIndex);
466
-
letparenIndex=areaOrScope.indexOf("(");
465
+
letscope=headerStr.substring(0,colonIndex);
466
+
letparenIndex=scope.indexOf("(");
467
467
if(parenIndex>=1){
468
468
if(headerStr[parenIndex-1]===" "){
469
469
offence=true;
@@ -473,7 +473,7 @@ export abstract class Plugins {
473
473
474
474
return[
475
475
!offence,
476
-
`No need to use space before parentheses in the area/scope/sub-area section of the title.`+
476
+
`No need to use space before parentheses in the scope/sub-scope section of the title.`+
0 commit comments