From 68fcb7a675a0633b8f89b4b541d2a6c5d7b48b84 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 3 Apr 2023 12:14:49 +0200 Subject: [PATCH] Update packages/eslint-plugin/rules/no-undeclared-imports.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Signed-off-by: Patrik Oldsberg --- packages/eslint-plugin/rules/no-undeclared-imports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/rules/no-undeclared-imports.js b/packages/eslint-plugin/rules/no-undeclared-imports.js index 05a10fb9f9..c986b52c65 100644 --- a/packages/eslint-plugin/rules/no-undeclared-imports.js +++ b/packages/eslint-plugin/rules/no-undeclared-imports.js @@ -180,7 +180,7 @@ module.exports = { // The security implication of this is a bit interesting, as crafted add-import // directives could be used to install malicious packages. However, the same is true // for adding malicious packages to package.json, so there's significant difference. - execFileSync('yarn', ['add', ...([flag] || []), ...names], { + execFileSync('yarn', ['add', ...(flag ? [flag] : []), ...names], { cwd: localPkg.dir, stdio: 'inherit', });