Skip to content

Commit 135acd1

Browse files
committed
fix(require-description): only report blocking of description tag by user if "tag" option is set
1 parent b28a407 commit 135acd1

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

test/rules/assertions/requireDescriptionCompleteSentence.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,32 @@ export default {
567567
tags: ['see']
568568
}
569569
]
570+
},
571+
{
572+
code: `
573+
/**
574+
* @param foo Foo bar
575+
*/
576+
function quux (foo) {
577+
578+
}
579+
`,
580+
errors: [
581+
{
582+
line: 3,
583+
message: 'Sentence must end with a period.'
584+
}
585+
],
586+
options: [{
587+
tags: ['param']
588+
}],
589+
settings: {
590+
jsdoc: {
591+
tagNamePreference: {
592+
description: false
593+
}
594+
}
595+
}
570596
}
571597
],
572598
valid: [
@@ -823,6 +849,43 @@ export default {
823849
tags: ['param']
824850
}
825851
]
852+
},
853+
{
854+
code: `
855+
/**
856+
* @param foo Foo bar.
857+
*/
858+
function quux (foo) {
859+
860+
}
861+
`,
862+
options: [{
863+
tags: ['param']
864+
}],
865+
settings: {
866+
jsdoc: {
867+
tagNamePreference: {
868+
description: false
869+
}
870+
}
871+
}
872+
},
873+
{
874+
code: `
875+
/**
876+
*
877+
*/
878+
function quux (foo) {
879+
880+
}
881+
`,
882+
settings: {
883+
jsdoc: {
884+
tagNamePreference: {
885+
description: false
886+
}
887+
}
888+
}
826889
}
827890
]
828891
};

0 commit comments

Comments
 (0)