Skip to content

Commit

Permalink
Document banned npm names
Browse files Browse the repository at this point in the history
See also microsoft#349 and microsoft#350. As soon as an official decision for this issue exists, that should be referenced in the docs as well.
  • Loading branch information
LinqLover committed Dec 22, 2021
1 parent 1ccb573 commit 1ed6a62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,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 below list 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 (/(^|\W)download($|\W)/.test(basedir) &&
Expand Down

0 comments on commit 1ed6a62

Please sign in to comment.