diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-07-25 09:07:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 09:07:59 -0400 |
commit | 763f05e74dfd0032b238603f625893a52e363591 (patch) | |
tree | c6a71559472755919358afa53eecac206cad80a9 /cli/standalone/mod.rs | |
parent | ef78d317f084ffe633253acd138a48a425113fa7 (diff) |
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
Diffstat (limited to 'cli/standalone/mod.rs')
-rw-r--r-- | cli/standalone/mod.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index 561c99c98..c91f3bec9 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -241,10 +241,13 @@ impl ModuleLoader for EmbeddedModuleLoader { } } - self - .shared - .node_resolver - .handle_if_in_node_modules(specifier) + Ok( + self + .shared + .node_resolver + .handle_if_in_node_modules(&specifier)? + .unwrap_or(specifier), + ) } Err(err) if err.is_unmapped_bare_specifier() && referrer.scheme() == "file" => |