mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
feat(linter): fallback to the default tsconfig path (#2842)
Users usually do not need to manually set the tsconfig path, as it is usually located in cwd/tsconfig.json.
This commit is contained in:
parent
ab7d7dcbe8
commit
d63807e703
1 changed files with 3 additions and 1 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue