diff --git a/crates/oxc_linter/src/service.rs b/crates/oxc_linter/src/service.rs index 1384d8635523..3aef6d03e83e 100644 --- a/crates/oxc_linter/src/service.rs +++ b/crates/oxc_linter/src/service.rs @@ -135,7 +135,9 @@ pub struct Runtime { impl Runtime { fn new(linter: Linter, options: LintServiceOptions) -> Self { - let resolver = linter.options().import_plugin.then(|| Self::get_resolver(options.tsconfig)); + let resolver = linter.options().import_plugin.then(|| { + Self::get_resolver(options.tsconfig.or_else(|| Some(options.cwd.join("tsconfig.json")))) + }); Self { cwd: options.cwd, paths: options.paths.iter().cloned().collect(),