@@ -60,7 +60,7 @@ let projectsFiles: Map<
60
60
let codeActionsFromDiagnostics : codeActions . filesCodeActions = { } ;
61
61
62
62
// will be properly defined later depending on the mode (stdio/node-rpc)
63
- let send : ( msg : p . Message ) => void = ( _ ) => { } ;
63
+ let send : ( msg : p . Message ) => void = ( _ ) => { } ;
64
64
65
65
interface CreateInterfaceRequestParams {
66
66
uri : string ;
@@ -192,7 +192,11 @@ let openedFile = (fileUri: string, fileContent: string) => {
192
192
openFiles : new Set ( ) ,
193
193
filesWithDiagnostics : new Set ( ) ,
194
194
bsbWatcherByEditor : null ,
195
- hasPromptedToStartBuild : / ( \/ | \\ ) n o d e _ m o d u l e s ( \/ | \\ ) / . test ( projectRootPath ) ? "never" : false ,
195
+ hasPromptedToStartBuild : / ( \/ | \\ ) n o d e _ m o d u l e s ( \/ | \\ ) / . test (
196
+ projectRootPath
197
+ )
198
+ ? "never"
199
+ : false ,
196
200
} ;
197
201
projectsFiles . set ( projectRootPath , projectRootState ) ;
198
202
compilerLogsWatcher . add (
@@ -630,25 +634,22 @@ const updateDiagnosticSyntax = (fileUri: string, fileContent: string) => {
630
634
631
635
const items : p . Diagnostic [ ] | [ ] = utils . runAnalysisAfterSanityCheck (
632
636
filePath ,
633
- [
634
- "diagnosticSyntax" ,
635
- tmpname
636
- ] ,
637
+ [ "diagnosticSyntax" , tmpname ]
637
638
) ;
638
639
639
640
const notification : p . NotificationMessage = {
640
641
jsonrpc : c . jsonrpcVersion ,
641
642
method : "textDocument/publishDiagnostics" ,
642
643
params : {
643
644
uri : fileUri ,
644
- diagnostics : items
645
- }
646
- }
645
+ diagnostics : items ,
646
+ } ,
647
+ } ;
647
648
648
649
fs . unlink ( tmpname , ( ) => null ) ;
649
650
650
- send ( notification )
651
- }
651
+ send ( notification ) ;
652
+ } ;
652
653
653
654
function createInterface ( msg : p . RequestMessage ) : p . Message {
654
655
let params = msg . params as CreateInterfaceRequestParams ;
@@ -850,7 +851,10 @@ function onMessage(msg: p.Message) {
850
851
params . textDocument . uri ,
851
852
changes [ changes . length - 1 ] . text
852
853
) ;
853
- updateDiagnosticSyntax ( params . textDocument . uri , changes [ changes . length - 1 ] . text ) ;
854
+ updateDiagnosticSyntax (
855
+ params . textDocument . uri ,
856
+ changes [ changes . length - 1 ] . text
857
+ ) ;
854
858
}
855
859
}
856
860
} else if ( msg . method === DidCloseTextDocumentNotification . method ) {
0 commit comments