Skip to content

Commit 4ec300a

Browse files
author
Alexej Yaroshevich
committed
checkParamNames: fixup buggy behaviour
1 parent cb5c2a5 commit 4ec300a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/rules/validate-jsdoc/check-param-names.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function validateCheckParamNames(node, err) {
4646
return;
4747
}
4848

49-
if (tag.value.indexOf('.') !== -1) {
49+
if (tag.name.value.indexOf('.') !== -1) {
5050
skipped++;
5151
return;
5252
}

test/lib/rules/validate-jsdoc/check-param-names.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,18 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
266266
* @param {String|Boolean|Array} [mod.modVal]
267267
* @param {Object} props
268268
* @param {Object} [staticProps]
269-
* @returns {Function}
270269
*/
271270
function yeah(mod, props, staticProps) {}
272271
}
272+
}, {
273+
it: 'should not report wrong order',
274+
code: function() {
275+
/**
276+
* @param {string|Array.<string>} types
277+
* @param {function(this: DocComment, DocTag): DocComment} fn
278+
*/
279+
function iterateByTypes(types, fn) {}
280+
}
273281
}
274282
/* jscs: enable */
275283
/* jshint ignore:end */

0 commit comments

Comments
 (0)