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

Commit

Permalink
Add 'download-git-repo' to allowed names in npm banned types
Browse files Browse the repository at this point in the history
The assertion is not a rule, so it cannot be bypassed in DT config.

Required for: DefinitelyTyped/DefinitelyTyped#56874

Thanks!

/cc @LinqLover
  • Loading branch information
peterblazejewicz committed Nov 21, 2021
1 parent 7506ca9 commit 7e65c8e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ function assertPathIsInDefinitelyTyped(dirPath: string): void {
function assertPathIsNotBanned(dirPath: string) {
const basedir = basename(dirPath);
if (/(^|\W)download($|\W)/.test(basedir) &&
basedir !== "download" &&
basedir !== "downloadjs" &&
basedir !== "s3-download-stream") {
!["download", "downloadjs", "s3-download-stream", "download-git-repo"].includes(basedir)) {
// Since npm won't release their banned-words list, we'll have to manually add to this list.
throw new Error(`${dirPath}: Contains the word 'download', which is banned by npm.`);
}
Expand Down

0 comments on commit 7e65c8e

Please sign in to comment.