Skip to content

Commit

Permalink
requireParamTypes: Change if to early return format
Browse files Browse the repository at this point in the history
- The if statement in the require param type rule uses the quick bail format

Closes gh-112
  • Loading branch information
dtracers authored and Alexej Yaroshevich committed Jun 24, 2015
1 parent 79e316c commit 85fba47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rules/validate-jsdoc/require-param-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ module.exports.options = {
*/
function validateParamTag(node, tag, err) {
// checking existance
if (!tag.type) {
return err('Missing param type', (tag.name ? tag.name.loc : null) || tag.loc);
if (tag.type) {
return;
}
return err('Missing param type', (tag.name ? tag.name.loc : null) || tag.loc);
}

0 comments on commit 85fba47

Please sign in to comment.