File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
crates/oxc_language_server/src/linter Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ impl IsolatedLintHandler {
7272 let mut lint_service_options = LintServiceOptions :: new ( options. root_path . clone ( ) )
7373 . with_cross_module ( options. use_cross_module ) ;
7474
75- if let Some ( tsconfig_path) = & options. tsconfig_path {
75+ if let Some ( tsconfig_path) = & options. tsconfig_path
76+ && tsconfig_path. is_file ( )
77+ {
78+ debug_assert ! ( tsconfig_path. is_absolute( ) ) ;
7679 lint_service_options = lint_service_options. with_tsconfig ( tsconfig_path) ;
7780 }
7881
Original file line number Diff line number Diff line change @@ -156,10 +156,10 @@ impl ServerLinter {
156156 & IsolatedLintHandlerOptions {
157157 use_cross_module,
158158 root_path : root_path. to_path_buf ( ) ,
159- tsconfig_path : options
160- . ts_config_path
161- . as_ref ( )
162- . map ( |path| Path :: new ( path ) . to_path_buf ( ) ) ,
159+ tsconfig_path : options. ts_config_path . as_ref ( ) . map ( |path| {
160+ let path = Path :: new ( path ) . to_path_buf ( ) ;
161+ if path . is_relative ( ) { root_path . join ( path ) } else { path }
162+ } ) ,
163163 } ,
164164 ) ;
165165
You can’t perform that action at this time.
0 commit comments