From c8b622e54553cee8d05744f9d430a86d8ab4cb9b Mon Sep 17 00:00:00 2001 From: Christoph Thiede <38782922+LinqLover@users.noreply.github.com> Date: Sat, 15 Jan 2022 20:59:11 +0100 Subject: [PATCH 1/2] Document banned npm names Cherry-picked from https://github.com/microsoft/dtslint/pull/351/commits/1ed6a6287d285af39214188732ebd37e89970e08 Resolves https://github.com/microsoft/dtslint/pull/351#discussion_r781370225 by @sandersn --- packages/dtslint/src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/dtslint/src/index.ts b/packages/dtslint/src/index.ts index 73ee804c3e..c3924eaba2 100644 --- a/packages/dtslint/src/index.ts +++ b/packages/dtslint/src/index.ts @@ -248,6 +248,15 @@ function assertPathIsInDefinitelyTyped(dirPath: string): void { } } +/** + * Starting at some point in time, npm has banned all new packages whose names + * contain the word `download`. However, some older packages exist that still + * contain this name. + * @NOTE for contributors: The list of literal exceptions below should ONLY be + * extended with packages for which there already exists a corresponding type + * definition package in the `@types` scope. More information: + * https://github.com/microsoft/dtslint/pull/351. + */ function assertPathIsNotBanned(dirPath: string) { const basedir = basename(dirPath); if ( From 8c6c8e3c795bd5e94ed66d64182ab9ab9673efcb Mon Sep 17 00:00:00 2001 From: Christoph Thiede <38782922+LinqLover@users.noreply.github.com> Date: Sat, 15 Jan 2022 21:01:58 +0100 Subject: [PATCH 2/2] Update link to PR --- packages/dtslint/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dtslint/src/index.ts b/packages/dtslint/src/index.ts index c3924eaba2..0ac90c1102 100644 --- a/packages/dtslint/src/index.ts +++ b/packages/dtslint/src/index.ts @@ -255,7 +255,7 @@ function assertPathIsInDefinitelyTyped(dirPath: string): void { * @NOTE for contributors: The list of literal exceptions below should ONLY be * extended with packages for which there already exists a corresponding type * definition package in the `@types` scope. More information: - * https://github.com/microsoft/dtslint/pull/351. + * https://github.com/microsoft/DefinitelyTyped-tools/pull/381. */ function assertPathIsNotBanned(dirPath: string) { const basedir = basename(dirPath);