Skip to content

Commit

Permalink
refactor: use String.prototype.repeat over lodash repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jul 13, 2019
1 parent cd35adb commit 4b97157
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/iterateJsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const getUtils = (
const classJsdocNode = getJSDocComment(sourceCode, classNode);

if (classJsdocNode) {
const indent = _.repeat(' ', classJsdocNode.loc.start.column);
const indent = ' '.repeat(classJsdocNode.loc.start.column);

return parseComment(classJsdocNode, indent);
}
Expand Down Expand Up @@ -321,7 +321,7 @@ const iterateAllJsdocs = (iterator, ruleConfig) => {
return;
}

const indent = _.repeat(' ', comment.loc.start.column);
const indent = ' '.repeat(comment.loc.start.column);
const jsdoc = parseComment(comment, indent);
const settings = getSettings(context);
const report = makeReport(context, comment);
Expand Down Expand Up @@ -393,7 +393,7 @@ export default function iterateJsdoc (iterator, ruleConfig) {
return;
}

const indent = _.repeat(' ', jsdocNode.loc.start.column);
const indent = ' '.repeat(jsdocNode.loc.start.column);

const jsdoc = parseComment(jsdocNode, indent);

Expand Down

0 comments on commit 4b97157

Please sign in to comment.