@@ -101,7 +101,7 @@ impl TsGoLintState {
101101
102102 let mut resolved_configs: FxHashMap < PathBuf , ResolvedLinterState > = FxHashMap :: default ( ) ;
103103
104- let json_input = self . json_input ( paths, & mut resolved_configs) ;
104+ let json_input = self . json_input ( paths, None , & mut resolved_configs) ;
105105 if json_input. configs . is_empty ( ) {
106106 return Ok ( ( ) ) ;
107107 }
@@ -336,8 +336,14 @@ impl TsGoLintState {
336336 source_text : String ,
337337 ) -> Result < Vec < Message > , String > {
338338 let mut resolved_configs: FxHashMap < PathBuf , ResolvedLinterState > = FxHashMap :: default ( ) ;
339+ let mut source_overrides = FxHashMap :: default ( ) ;
340+ source_overrides. insert ( path. to_string_lossy ( ) . to_string ( ) , source_text. clone ( ) ) ;
339341
340- let json_input = self . json_input ( std:: slice:: from_ref ( path) , & mut resolved_configs) ;
342+ let json_input = self . json_input (
343+ std:: slice:: from_ref ( path) ,
344+ Some ( source_overrides) ,
345+ & mut resolved_configs,
346+ ) ;
341347 let executable_path = self . executable_path . clone ( ) ;
342348
343349 let fix = self . fix ;
@@ -489,6 +495,7 @@ impl TsGoLintState {
489495 fn json_input (
490496 & self ,
491497 paths : & [ Arc < OsStr > ] ,
498+ source_overrides : Option < FxHashMap < String , String > > ,
492499 resolved_configs : & mut FxHashMap < PathBuf , ResolvedLinterState > ,
493500 ) -> Payload {
494501 let mut config_groups: FxHashMap < BTreeSet < Rule > , Vec < String > > = FxHashMap :: default ( ) ;
@@ -527,6 +534,7 @@ impl TsGoLintState {
527534 rules : rules. into_iter ( ) . collect ( ) ,
528535 } )
529536 . collect ( ) ,
537+ source_overrides,
530538 }
531539 }
532540}
@@ -550,6 +558,7 @@ impl TsGoLintState {
550558pub struct Payload {
551559 pub version : i32 ,
552560 pub configs : Vec < Config > ,
561+ pub source_overrides : Option < FxHashMap < String , String > > ,
553562}
554563
555564#[ derive( Debug , Clone , Serialize , Deserialize ) ]
0 commit comments