From c6f10f211143802b0356f0a2445bf02f46bee126 Mon Sep 17 00:00:00 2001 From: DetachHead <57028336+DetachHead@users.noreply.github.com> Date: Mon, 5 Jun 2023 20:10:27 +1000 Subject: [PATCH] check peerDependencies in `imports-as-dependencies` --- src/rules/importsAsDependencies.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rules/importsAsDependencies.js b/src/rules/importsAsDependencies.js index 44630e954..e5f013c70 100644 --- a/src/rules/importsAsDependencies.js +++ b/src/rules/importsAsDependencies.js @@ -29,6 +29,10 @@ try { Object.keys(pkg.devDependencies) : // istanbul ignore next []), + ...(pkg.peerDependencies ? + Object.keys(pkg.peerDependencies) : + // istanbul ignore next + []), ]); } catch (error) { /* eslint-disable no-console -- Inform user */