Skip to content

Commit 239c4cd

Browse files
Use .map() + .every(Boolean) instead of .every()
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent a763563 commit 239c4cd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/changetool/cli/validate.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ export function isValidChangenoteFileOrDir(filepath: string): boolean {
135135
return fs
136136
.readdirSync(filepath)
137137
.filter((f) => f !== ".gitkeep")
138-
.every((f) => isValidChangenoteFile(path.join(filepath, f)));
138+
.map((f) => isValidChangenoteFile(path.join(filepath, f)))
139+
.every(Boolean);
139140
}
140141
console.error(`${filepath}: not a file or directory`);
141142
return false;

0 commit comments

Comments
 (0)