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

Commit 27f3a1c

Browse files
Add new packages to allowed names in npm banned types
The assertion is not a rule, so it cannot be bypassed in DT config. - 'download-git-repo' - 'download-package-tarball' Both are published to NPM registry already. Required for: DefinitelyTyped/DefinitelyTyped#56874 DefinitelyTyped/DefinitelyTyped#56875 Thanks! /cc @LinqLover
1 parent 7506ca9 commit 27f3a1c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/index.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,13 @@ function assertPathIsInDefinitelyTyped(dirPath: string): void {
237237
function assertPathIsNotBanned(dirPath: string) {
238238
const basedir = basename(dirPath);
239239
if (/(^|\W)download($|\W)/.test(basedir) &&
240-
basedir !== "download" &&
241-
basedir !== "downloadjs" &&
242-
basedir !== "s3-download-stream") {
240+
![
241+
"download-git-repo",
242+
"download-package-tarball",
243+
"download",
244+
"downloadjs",
245+
"s3-download-stream",
246+
].includes(basedir)) {
243247
// Since npm won't release their banned-words list, we'll have to manually add to this list.
244248
throw new Error(`${dirPath}: Contains the word 'download', which is banned by npm.`);
245249
}

0 commit comments

Comments
 (0)