We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3795f15 commit 202cf14Copy full SHA for 202cf14
1 file changed
lib/rules/validate-jsdoc.js
@@ -54,8 +54,15 @@ module.exports.prototype = {
54
}
55
56
function addError(text, relLine, relColumn) {
57
- var line = commentStart.line + (relLine || 0);
58
- var column = commentStart.column + (relColumn || 0);
+ var line;
+ var column;
59
+ if (typeof relLine === 'object' && arguments.length < 3) {
60
+ line = relLine.line;
61
+ column = relLine.column;
62
+ } else {
63
+ line = commentStart.line + (relLine || 0);
64
+ column = commentStart.column + (relColumn || 0);
65
+ }
66
errors.add(text, line, column);
67
68
});
0 commit comments