From 763f05e74dfd0032b238603f625893a52e363591 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 25 Jul 2024 09:07:59 -0400 Subject: fix(unstable): move sloppy-import warnings to lint rule (#24710) Adds a new `no-sloppy-imports` lint rule and cleans up the lint code. Closes #22844 Closes https://github.com/denoland/deno_lint/issues/1293 --- cli/graph_util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/graph_util.rs') diff --git a/cli/graph_util.rs b/cli/graph_util.rs index 7f664420c..91549472e 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -750,8 +750,8 @@ fn enhanced_sloppy_imports_error_message( ModuleError::LoadingErr(specifier, _, ModuleLoadError::Loader(_)) // ex. "Is a directory" error | ModuleError::Missing(specifier, _) => { let additional_message = SloppyImportsResolver::new(fs.clone()) - .resolve(specifier, ResolutionMode::Execution) - .as_suggestion_message()?; + .resolve(specifier, ResolutionMode::Execution)? + .as_suggestion_message(); Some(format!( "{} {} or run with --unstable-sloppy-imports", error, -- cgit v1.2.3