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,