Skip to content

Commit

Permalink
checkParamNames: fixup buggy behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexej Yaroshevich committed Dec 1, 2014
1 parent cb5c2a5 commit 4ec300a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rules/validate-jsdoc/check-param-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function validateCheckParamNames(node, err) {
return;
}

if (tag.value.indexOf('.') !== -1) {
if (tag.name.value.indexOf('.') !== -1) {
skipped++;
return;
}
Expand Down
10 changes: 9 additions & 1 deletion test/lib/rules/validate-jsdoc/check-param-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,18 @@ describe('lib/rules/validate-jsdoc/check-param-names', function() {
* @param {String|Boolean|Array} [mod.modVal]
* @param {Object} props
* @param {Object} [staticProps]
* @returns {Function}
*/
function yeah(mod, props, staticProps) {}
}
}, {
it: 'should not report wrong order',
code: function() {
/**
* @param {string|Array.<string>} types
* @param {function(this: DocComment, DocTag): DocComment} fn
*/
function iterateByTypes(types, fn) {}
}
}
/* jscs: enable */
/* jshint ignore:end */
Expand Down

0 comments on commit 4ec300a

Please sign in to comment.