From 065ba360535fa4a71a3d838fb0235e08498ca8b0 Mon Sep 17 00:00:00 2001 From: flakey5 <73616808+flakey5@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:46:15 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Claudio W --- bin/cli.mjs | 4 ++-- src/generators.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cli.mjs b/bin/cli.mjs index 3d11ae7..5f2461a 100755 --- a/bin/cli.mjs +++ b/bin/cli.mjs @@ -77,8 +77,8 @@ const parsedApiDocs = await parseApiDocs(apiDocFiles); const sourceFiles = loadJsFiles( parsedApiDocs - .map(apiDoc => apiDoc.source_link_local) - .filter(path => path !== undefined && path.endsWith('.js')) + .map(({ source_link_local }) => source_link_local) + .filter(path => path?.endsWith('.js')) ); const parsedJsFiles = await parseJsSources(sourceFiles); diff --git a/src/generators.mjs b/src/generators.mjs index 3e29222..923a87a 100644 --- a/src/generators.mjs +++ b/src/generators.mjs @@ -21,7 +21,7 @@ import availableGenerators from './generators/index.mjs'; * @param {ApiDocMetadataEntry} input The parsed API doc metadata entries * @param {Array} parsedJsFiles */ -const createGenerator = (input, parsedJsFiles) => { +const createGenerator = (markdownInput, jsInput) => { /** * We store all the registered generators to be processed * within a Record, so we can access their results at any time whenever needed