From 4ec9383b9a096e9dd077525fb74dfbe88b96b44f Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Thu, 25 Mar 2021 15:31:03 -0700 Subject: [PATCH] Remove unused isMonoRepoPackageDir function in pkglint/rules.ts. --- tools/pkglint/lib/rules.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 25d8a51481d6b..f7929a353035a 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1670,14 +1670,3 @@ function cdkMajorVersion() { const releaseJson = require(`${__dirname}/../../../release.json`); return releaseJson.majorVersion as number; } - -/** - * Whether this is a package in the monorepo or not - * - * We're going to be cheeky and not do too much analysis, and say that - * a package that has `/node_modules/` in the directory name is NOT in the - * monorepo, otherwise it is. - */ -function isMonoRepoPackageDir(packageDir: string) { - return path.resolve(packageDir).indexOf(`${path.sep}node_modules${path.sep}`) === -1; -}