From 48fdb4b78493ed23b53e92155b8387ddee6730fc Mon Sep 17 00:00:00 2001 From: Miroslav Jonas Date: Tue, 17 Jan 2023 10:17:16 +0100 Subject: [PATCH] fix(linter): wildcard sourceTag should be respected for banned imports --- 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)