Update packages/eslint-plugin/rules/no-undeclared-imports.js

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-04-03 12:14:49 +02:00
committed by GitHub
parent c85cddd899
commit 68fcb7a675
@@ -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',
});