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

Commit

Permalink
forbid only whole-word 'download'
Browse files Browse the repository at this point in the history
previously it was any substring.
  • Loading branch information
sandersn committed Jun 7, 2019
1 parent 6e3891a commit 2731154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function assertPathIsInDefinitelyTyped(dirPath: string): void {

function assertPathIsNotBanned(dirPath: string) {
const basedir = basename(dirPath);
if (/download/.test(basedir) &&
if (/(^|\W)download($|\W)/.test(basedir) &&
basedir !== "download" &&
basedir !== "downloadjs" &&
basedir !== "s3-download-stream") {
Expand Down

0 comments on commit 2731154

Please sign in to comment.