Skip to content

Commit

Permalink
Document banned npm names (#381)
Browse files Browse the repository at this point in the history
* Document banned npm names

Cherry-picked from microsoft/dtslint@1ed6a62

Resolves microsoft/dtslint#351 (comment) by @sandersn

* Update link to PR
  • Loading branch information
LinqLover authored Jan 25, 2022
1 parent cd3e093 commit 4d87da0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/dtslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,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/DefinitelyTyped-tools/pull/381.
*/
function assertPathIsNotBanned(dirPath: string) {
const basedir = basename(dirPath);
if (
Expand Down

0 comments on commit 4d87da0

Please sign in to comment.