Skip to content

Commit 96e9765

Browse files
author
Alexej Yaroshevich
committed
checkAnnotations: store rule configuration locally
1 parent 50411e0 commit 96e9765

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/rules/validate-jsdoc/check-annotations.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ module.exports.options = {
99
checkAnnotations: true
1010
};
1111

12-
var tags;
13-
1412
/**
1513
* @param {Object} options
1614
*/
@@ -35,7 +33,7 @@ validateAnnotations.configure = function(options) {
3533
});
3634
}
3735

38-
tags = Object.create ? Object.create(null) : {};
36+
var tags = this._tags = Object.create ? Object.create(null) : {};
3937

4038
if (o === true) {
4139
Object.keys(availablePresets).forEach(function(preset) {
@@ -72,6 +70,7 @@ validateAnnotations.configure = function(options) {
7270
*/
7371
function validateAnnotations(file, errors) {
7472
var comments = file.getComments();
73+
var tags = this._tags;
7574
comments.forEach(function(commentNode) {
7675
if (commentNode.type !== 'Block' || commentNode.value[0] !== '*') {
7776
return;

0 commit comments

Comments
 (0)