diff --git a/crates/oxc_linter/src/service/runtime.rs b/crates/oxc_linter/src/service/runtime.rs index f5deb42815b1d..4ae586fa8de87 100644 --- a/crates/oxc_linter/src/service/runtime.rs +++ b/crates/oxc_linter/src/service/runtime.rs @@ -893,7 +893,9 @@ impl Runtime { let mut records = SmallVec::<[Result>; 1]>::new(); - let module_content = ModuleContent::try_new(allocator_guard, |allocator| { + let module_content = ModuleContent::try_new(allocator_guard, |allocator_guard| { + let allocator = &**allocator_guard; + let Some(stt) = self.get_source_type_and_text(Path::new(path), ext, allocator) else { return Err(());