Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmason2-godaddy committed Feb 13, 2024
1 parent e8ba545 commit e9ef868
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions scripts/generate-docs-index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ async function main() {
.replace(/.+test\/.+\n/, '')
.replace(':generated-docs/', ':/docs/generated-docs/')
// replace homepage link with relative readme
.replace('https://github.com/godaddy/gasket/tree/main/packages/create-gasket-app', '/packages/create-gasket-app/README.md')
;
.replace('https://github.com/godaddy/gasket/tree/main/packages/create-gasket-app', '/packages/create-gasket-app/README.md');

const template = await readFile(targetPath, 'utf-8');
const start = template.indexOf(startTag) + startTag.length;
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate-docs-index/plugins/site-docs-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const isMarkdown = /\.md$/;

/**
* formatFilename - Format the filename to be more human readable
* @param {string} filename
* @param {string} filename The filename to format
* @returns {string} The formatted filename
*/
function formatFilename(filename) {
Expand Down Expand Up @@ -31,7 +31,7 @@ const txFixLinks = {

return content;
}
}
};

/**
* txFixLicenseLinks - Fix license links
Expand Down Expand Up @@ -66,7 +66,7 @@ const txFrontMatter = {

const data = Object.entries(frontMatter).map(([key, value]) => `${key}: ${value}`).join('\n');

content = `---\n${data}\n---\n\n${content}`
content = `---\n${data}\n---\n\n${content}`;

return content;
}
Expand Down Expand Up @@ -94,4 +94,4 @@ module.exports = {
}
}
}
}
};
4 changes: 2 additions & 2 deletions scripts/generate-docs-index/utils/copy-site-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async function copyRootDocs(projectRoot, targetRoot) {
}

const readme = transformLinks(await readFile(path.join(projectRoot, 'README.md'), 'utf-8'));
await writeFile(path.join(targetRoot, 'README.md'),readme,'utf8');
await writeFile(path.join(targetRoot, 'README.md'), readme, 'utf8');
await copyFile(path.join(projectRoot, 'LICENSE.md'), path.join(targetRoot, 'LICENSE.md'));
await copyCreateGasketApp(projectRoot);
}
Expand All @@ -104,4 +104,4 @@ module.exports = async function copySiteDocs(projectRoot) {
await copyPackageDocs(sourceRoot, targetRoot);
await copyLifecyleGraph(targetRoot);
await copyRootDocs(projectRoot, targetRoot);
}
};
4 changes: 2 additions & 2 deletions scripts/generate-docs-index/utils/wait.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* wait - Wait for a specified amount of time
* @param {number} ms The time to wait in milliseconds
* @returns {Promise<void>}
* @returns {Promise<void>} A promise that resolves after the specified time
*/
module.exports = function wait(ms = 50) {
return new Promise(resolve => setTimeout(resolve, ms));
}
};

0 comments on commit e9ef868

Please sign in to comment.