Skip to content

Commit

Permalink
specific comments exists now fails if no specific blocks exist
Browse files Browse the repository at this point in the history
  • Loading branch information
srietkerk committed Feb 13, 2024
1 parent 9ee013b commit c3be9e1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export function validateSpecificBlockCommentsExist({ usedBlocks, blockType }: {
} {
const allSpecifcBlocks = usedBlocks.filter((block) => block.type === blockType);
const uncommentedBlocks = allSpecifcBlocks.filter((block) => !block.getCommentText());
return { uncommentedBlocks, passed: uncommentedBlocks.length === 0 };
const passed = allSpecifcBlocks.length === 0 ? false : uncommentedBlocks.length === 0;
return { uncommentedBlocks, passed };
}

0 comments on commit c3be9e1

Please sign in to comment.