@@ -10,9 +10,9 @@ use tower_lsp_server::{UriExt, lsp_types::Uri};
1010
1111use oxc_allocator:: Allocator ;
1212use oxc_linter:: {
13- AllowWarnDeny , ConfigStore , DisableDirectives , Fix , FixKind , LINTABLE_EXTENSIONS , LintOptions ,
14- LintRunner , LintRunnerBuilder , LintServiceOptions , Linter , Message , PossibleFixes ,
15- RuleCommentType , RuntimeFileSystem , read_to_arena_str, read_to_string,
13+ AllowWarnDeny , ConfigStore , DisableDirectives , ExternalLinter , Fix , FixKind ,
14+ LINTABLE_EXTENSIONS , LintOptions , LintRunner , LintRunnerBuilder , LintServiceOptions , Linter ,
15+ Message , PossibleFixes , RuleCommentType , RuntimeFileSystem , read_to_arena_str, read_to_string,
1616} ;
1717
1818use super :: error_with_position:: {
@@ -67,11 +67,12 @@ impl IsolatedLintHandler {
6767 pub fn new (
6868 lint_options : LintOptions ,
6969 config_store : ConfigStore ,
70+ external_linter : Option < ExternalLinter > ,
7071 options : & IsolatedLintHandlerOptions ,
7172 ) -> Self {
7273 let config_store_clone = config_store. clone ( ) ;
7374
74- let linter = Linter :: new ( lint_options, config_store, None ) ;
75+ let linter = Linter :: new ( lint_options, config_store, external_linter ) ;
7576 let mut lint_service_options = LintServiceOptions :: new ( options. root_path . clone ( ) )
7677 . with_cross_module ( options. use_cross_module ) ;
7778
@@ -121,6 +122,7 @@ impl IsolatedLintHandler {
121122 debug ! ( "lint {}" , path. display( ) ) ;
122123 let rope = & Rope :: from_str ( source_text) ;
123124
125+ // ToDO: with external linter, we need a new FS (raw) system
124126 let fs = IsolatedLintHandlerFileSystem :: new ( path. to_path_buf ( ) , Arc :: from ( source_text) ) ;
125127
126128 let mut messages: Vec < DiagnosticReport > = self
0 commit comments