Skip to content

Commit 9f73e97

Browse files
committed
optimize(require-file-overview): avoid overreporting non-comment
1 parent 61cad4f commit 9f73e97

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/iterateJsdoc.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,15 @@ const iterateAllJsdocs = (iterator, ruleConfig) => {
522522
}
523523

524524
const comment = getJSDocComment(sourceCode, node, settings);
525-
if (!comment || trackedJsdocs.includes(comment)) {
526-
if (!comment && ruleConfig.nonComment) {
527-
ruleConfig.nonComment({state});
525+
if (trackedJsdocs.includes(comment)) {
526+
return;
527+
}
528+
if (!comment) {
529+
if (ruleConfig.nonComment) {
530+
ruleConfig.nonComment({
531+
node,
532+
state,
533+
});
528534
}
529535

530536
return;

0 commit comments

Comments
 (0)