From f42d37e8ac3936cf5ec9c95852708bd2d916512f Mon Sep 17 00:00:00 2001 From: atomiks Date: Thu, 28 Dec 2017 18:24:25 +1100 Subject: [PATCH] fix comments --- scripts/lint-script.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/lint-script.js b/scripts/lint-script.js index 1840654b5..01e7a5ca9 100644 --- a/scripts/lint-script.js +++ b/scripts/lint-script.js @@ -35,9 +35,8 @@ try { let counter = 0; while (match) { snippet.code.push(match[1]); // capture group - snippet.tempNames.push(snippet.name.replace('.md', counter)); + snippet.tempNames.push(snippet.name.replace('.md', counter++)); match = codeRE.exec(snippet.data); - counter++; } snippet.code.forEach((str, i) => { @@ -46,11 +45,10 @@ try { } const cmd = `semistandard "${TEMP_PATH}" --fix & ` + - `prettier "${TEMP_PATH}/*.js" --single-quote --print-width=100 --write` + `prettier "${TEMP_PATH}/*.js" --single-quote --print-width=100 --write`; cp.exec(cmd, {}, (err, stdout, stderr) => { - // Loop through each snippet now that semistandard has done its job, - // run prettier and write to the files + // Loop through each snippet now that semistandard and prettier did their job, for (const snippet of snippets) { // an array to store each linted code block (definition + example) const lintedCode = [];