From 17d9ce80ffbb23841044094eeb81755d39bfb489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Tue, 17 Jan 2023 14:59:21 +0100 Subject: [PATCH] fix(linter): wildcard sourceTag should be respected for banned imports (#14418) (cherry picked from commit 2b239634156f8fa3e21fca4f2e516d6df4bd7f5d) --- packages/eslint-plugin-nx/src/utils/runtime-lint-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin-nx/src/utils/runtime-lint-utils.ts b/packages/eslint-plugin-nx/src/utils/runtime-lint-utils.ts index f9c0baa65de40..7da2aa59b1e6a 100644 --- a/packages/eslint-plugin-nx/src/utils/runtime-lint-utils.ts +++ b/packages/eslint-plugin-nx/src/utils/runtime-lint-utils.ts @@ -244,7 +244,7 @@ export function hasBannedImport( tags = [c.sourceTag]; } - return tags.every((t) => (source.data.tags || []).includes(t)); + return tags.every((t) => hasTag(source, t)); }); return depConstraints.find((constraint) => isConstraintBanningProject(target, constraint)