Skip to content

Commit 85fba47

Browse files
dtracersAlexej Yaroshevich
authored andcommitted
requireParamTypes: Change if to early return format
- The if statement in the require param type rule uses the quick bail format Closes gh-112
1 parent 79e316c commit 85fba47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rules/validate-jsdoc/require-param-types.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ module.exports.options = {
1414
*/
1515
function validateParamTag(node, tag, err) {
1616
// checking existance
17-
if (!tag.type) {
18-
return err('Missing param type', (tag.name ? tag.name.loc : null) || tag.loc);
17+
if (tag.type) {
18+
return;
1919
}
20+
return err('Missing param type', (tag.name ? tag.name.loc : null) || tag.loc);
2021
}

0 commit comments

Comments
 (0)