Skip to content

Commit 7102677

Browse files
committed
fix(match-description, require-description-complete-sentence): do not report blocking of tag by user for description tag (the tag is not required by these rules)
1 parent 135acd1 commit 7102677

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

test/rules/assertions/matchDescription.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,57 @@ export default {
680680
]
681681
}
682682
]
683+
},
684+
{
685+
code: `
686+
/**
687+
* @param foo Foo bar
688+
*/
689+
function quux (foo) {
690+
691+
}
692+
`,
693+
errors: [
694+
{
695+
line: 3,
696+
message: 'JSDoc description does not satisfy the regex pattern.'
697+
}
698+
],
699+
options: [{
700+
tags: {
701+
param: true
702+
}
703+
}],
704+
settings: {
705+
jsdoc: {
706+
tagNamePreference: {
707+
description: false
708+
}
709+
}
710+
}
711+
},
712+
{
713+
code: `
714+
/**
715+
* Foo bar
716+
*/
717+
function quux (foo) {
718+
719+
}
720+
`,
721+
errors: [
722+
{
723+
line: 3,
724+
message: 'JSDoc description does not satisfy the regex pattern.'
725+
}
726+
],
727+
settings: {
728+
jsdoc: {
729+
tagNamePreference: {
730+
description: false
731+
}
732+
}
733+
}
683734
}
684735
],
685736
valid: [
@@ -1130,6 +1181,40 @@ export default {
11301181
}
11311182
}
11321183
]
1184+
},
1185+
{
1186+
code: `
1187+
/**
1188+
* @param foo Foo bar.
1189+
*/
1190+
function quux (foo) {
1191+
1192+
}
1193+
`,
1194+
settings: {
1195+
jsdoc: {
1196+
tagNamePreference: {
1197+
description: false
1198+
}
1199+
}
1200+
}
1201+
},
1202+
{
1203+
code: `
1204+
/**
1205+
*
1206+
*/
1207+
function quux () {
1208+
1209+
}
1210+
`,
1211+
settings: {
1212+
jsdoc: {
1213+
tagNamePreference: {
1214+
description: false
1215+
}
1216+
}
1217+
}
11331218
}
11341219
]
11351220
};

0 commit comments

Comments
 (0)