Skip to content

Commit

Permalink
fixup enforce-jsdoc location
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexej Yaroshevich committed Sep 7, 2014
1 parent 3795f15 commit 202cf14
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/rules/validate-jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@ module.exports.prototype = {
}

function addError(text, relLine, relColumn) {
var line = commentStart.line + (relLine || 0);
var column = commentStart.column + (relColumn || 0);
var line;
var column;
if (typeof relLine === 'object' && arguments.length < 3) {
line = relLine.line;
column = relLine.column;
} else {
line = commentStart.line + (relLine || 0);
column = commentStart.column + (relColumn || 0);
}
errors.add(text, line, column);
}
});
Expand Down

0 comments on commit 202cf14

Please sign in to comment.