From 304c2d859b41d19a8682697f75e12721cef7b197 Mon Sep 17 00:00:00 2001 From: Sysix Date: Mon, 30 Dec 2024 17:09:29 +0100 Subject: [PATCH] fix(linter): rule no-restricted-imports: improve diagnostics --- crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs b/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs index 0eafa6c8aa1a3..2e8b3cbf1decd 100644 --- a/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs +++ b/crates/oxc_linter/src/rules/eslint/no_restricted_imports.rs @@ -748,7 +748,7 @@ impl NoRestrictedImports { diagnostic_pattern_and_everything_with_regex_import_name( entry.module_request.span(), pattern.message.clone(), - &import_name_patterns, + import_name_patterns, source, ) } else if let Some(allowed_import_names) = &pattern.allow_import_names { @@ -916,7 +916,7 @@ impl NoRestrictedImports { diagnostic_pattern_and_everything_with_regex_import_name( span, pattern.message.clone(), - &import_name_patterns, + import_name_patterns, source, ) } else if let Some(allow_import_name_pattern) =