Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 5459940

Browse files
authored
Merge pull request #196 from Microsoft/forbid-npm-banned-words
Forbid npm-banned words
2 parents 48ffc2a + 709c484 commit 5459940

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/checks.ts

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ export async function checkPackageJson(
1717
}
1818
return;
1919
}
20+
if (/download/.test(dirPath)) {
21+
// Since npm won't release their banned-words list, we'll have to manually add to this list.
22+
throw new Error(`${dirPath}: Contains the word 'download', which is banned by npm.`);
23+
}
24+
2025
const pkgJson = await readJson(pkgJsonPath) as {};
2126

2227
if ((pkgJson as any).private !== true) {

0 commit comments

Comments
 (0)