From b22d090dda148f47aba18fa74742fe3af91e900b Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 17 Feb 2023 11:41:02 +0100 Subject: [PATCH] chore: skip imports for the package itself, this works as expected in node Signed-off-by: blam --- packages/eslint-plugin/rules/no-undeclared-imports.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/eslint-plugin/rules/no-undeclared-imports.js b/packages/eslint-plugin/rules/no-undeclared-imports.js index c86792b933..b1e11d1b97 100644 --- a/packages/eslint-plugin/rules/no-undeclared-imports.js +++ b/packages/eslint-plugin/rules/no-undeclared-imports.js @@ -161,6 +161,11 @@ module.exports = { return; } + // We skip imports for the package itself + if (imp.packageName === localPkg.packageJson.name) { + return; + } + const modulePath = path.relative(localPkg.dir, filePath); const expectedType = getExpectedDepType( localPkg.packageJson,