Skip to content

Commit 487eccd

Browse files
author
Alexej Yaroshevich
committed
fixup tests error, update version
1 parent 9acd838 commit 487eccd

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

lib/rules/validate-jsdoc/trailing-underscores.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,17 @@ function validateTrailingUnderscores(node, err) {
5151
var access;
5252
node.jsDoc.data.tags.forEach(function (tag) {
5353
if (['private', 'protected', 'public', 'access'].indexOf(tag.tag) !== -1) {
54-
if (access && __strict) {
55-
err('Multiple access definition');
56-
}
5754
if (tag.tag === 'access' && !tag.name && __strict) {
5855
err('Invalid access definition');
5956
}
60-
access = tag.tag === 'access' ? tag.name : tag.tag || 'public';
57+
58+
var newAccess = tag.tag === 'access' ? tag.name : tag.tag || 'public';
59+
if (newAccess) {
60+
if (access && newAccess !== access && __strict) {
61+
err('Multiple access definition');
62+
}
63+
access = newAccess;
64+
}
6165
}
6266
});
6367

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "jscs-jsdoc",
33
"author": "Alexej Yaroshevich <[email protected]>",
44
"description": "JSCS jsdoc plugin",
5-
"version": "0.0.7",
5+
"version": "0.0.8",
66
"main": "lib/index",
77
"homepage": "https://github.com/zxqfox/jscs-jsdoc",
88
"license": "MIT",

0 commit comments

Comments
 (0)