Skip to content

Commit 91bc6fb

Browse files
committed
testing(match-description): better Cyrillic checks (insist upper-case followed by lower-case and period)
1 parent 392e62d commit 91bc6fb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,7 +2322,7 @@ function quux () {
23222322
function quux () {
23232323

23242324
}
2325-
// Options: [{"matchDescription":"[А-Я]+."}]
2325+
// Options: [{"matchDescription":"[А-Я][А-я]+\\."}]
23262326
// Message: JSDoc description does not satisfy the regex pattern.
23272327

23282328
/**
@@ -2443,7 +2443,7 @@ function quux (foo) {
24432443
function quux () {
24442444

24452445
}
2446-
// Options: [{"tags":{"param":"[А-Я]+."}}]
2446+
// Options: [{"tags":{"param":"[А-Я][А-я]+\\."}}]
24472447
// Message: JSDoc description does not satisfy the regex pattern.
24482448
````
24492449

@@ -2488,7 +2488,7 @@ function quux () {
24882488
function quux () {
24892489

24902490
}
2491-
// Options: [{"matchDescription":"[А-Я]+."}]
2491+
// Options: [{"matchDescription":"[А-Я][А-я]+\\."}]
24922492

24932493
/**
24942494
* @param notRet
@@ -2497,7 +2497,7 @@ function quux () {
24972497
function quux () {
24982498

24992499
}
2500-
// Options: [{"tags":{"returns":"[А-Я]+."}}]
2500+
// Options: [{"tags":{"returns":"[А-Я][А-я]+\\."}}]
25012501

25022502
/**
25032503
* Foo

test/rules/assertions/matchDescription.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default {
4545
}
4646
],
4747
options: [{
48-
matchDescription: '[\u0410-\u042F]+.'
48+
matchDescription: '[\u0410-\u042F][\u0410-\u044F]+\\.'
4949
}]
5050
},
5151
{
@@ -301,7 +301,7 @@ export default {
301301
],
302302
options: [{
303303
tags: {
304-
param: '[\u0410-\u042F]+.'
304+
param: '[\u0410-\u042F][\u0410-\u044F]+\\.'
305305
}
306306
}]
307307
}
@@ -367,7 +367,7 @@ export default {
367367
}
368368
`,
369369
options: [{
370-
matchDescription: '[\u0410-\u042F]+.'
370+
matchDescription: '[\u0410-\u042F][\u0410-\u044F]+\\.'
371371
}]
372372
},
373373
{
@@ -382,7 +382,7 @@ export default {
382382
`,
383383
options: [{
384384
tags: {
385-
returns: '[\u0410-\u042F]+.'
385+
returns: '[\u0410-\u042F][\u0410-\u044F]+\\.'
386386
}
387387
}]
388388
},

0 commit comments

Comments
 (0)