@@ -25,7 +25,7 @@ interface IDependencies {
2525async function getFileContent (
2626 file : string ,
2727 baseDirectory : string ,
28- dependencies : IDependencies
28+ dependencies : IDependencies ,
2929) {
3030 const visiting : Set < string > = new Set ( ) ;
3131 const visited : Set < string > = new Set ( ) ;
@@ -54,15 +54,15 @@ async function getFileContent(
5454 const choice = await vscode . window . showWarningMessage (
5555 "Cyclic dependency found! Do you still want to insert the template?" ,
5656 "Yes" ,
57- "No"
57+ "No" ,
5858 ) ;
5959 if ( choice === "No" ) {
6060 return undefined ;
6161 }
6262 }
6363
6464 const contents = await Promise . all (
65- order . map ( ( file ) => fs . readFile ( path . join ( baseDirectory , file ) , "utf-8" ) )
65+ order . map ( ( file ) => fs . readFile ( path . join ( baseDirectory , file ) , "utf-8" ) ) ,
6666 ) ;
6767 const combined = contents . join ( "\n" ) ;
6868 return combined ;
@@ -73,39 +73,39 @@ function registerViewProviders(context: vscode.ExtensionContext): void {
7373 context . subscriptions . push (
7474 vscode . window . registerWebviewViewProvider (
7575 judgeViewProvider . getViewId ( ) ,
76- judgeViewProvider
77- )
76+ judgeViewProvider ,
77+ ) ,
7878 ) ;
7979
8080 stressViewProvider = new StressViewProvider ( context , judgeViewProvider ) ;
8181 context . subscriptions . push (
8282 vscode . window . registerWebviewViewProvider (
8383 stressViewProvider . getViewId ( ) ,
84- stressViewProvider
85- )
84+ stressViewProvider ,
85+ ) ,
8686 ) ;
8787}
8888
8989function registerDocumentContentProviders (
90- context : vscode . ExtensionContext
90+ context : vscode . ExtensionContext ,
9191) : void {
9292 context . subscriptions . push (
9393 vscode . workspace . registerTextDocumentContentProvider (
9494 ReadonlyStringProvider . SCHEME ,
95- new ReadonlyStringProvider ( )
96- )
95+ new ReadonlyStringProvider ( ) ,
96+ ) ,
9797 ) ;
9898}
9999
100100function registerCommands ( context : vscode . ExtensionContext ) : void {
101101 const compilationStatusItem = vscode . window . createStatusBarItem (
102102 vscode . StatusBarAlignment . Right ,
103- 10000
103+ 10000 ,
104104 ) ;
105105 compilationStatusItem . name = "Compilation Status" ;
106106 compilationStatusItem . text = "$(zap) Compiling..." ;
107107 compilationStatusItem . backgroundColor = new vscode . ThemeColor (
108- "statusBarItem.warningBackground"
108+ "statusBarItem.warningBackground" ,
109109 ) ;
110110 compilationStatusItem . hide ( ) ; // enable and disable it as necessary
111111 context . subscriptions . push ( compilationStatusItem ) ;
@@ -120,69 +120,69 @@ function registerCommands(context: vscode.ExtensionContext): void {
120120 }
121121
122122 const runSettings = vscode . workspace . getConfiguration (
123- "fastolympiccoding.runSettings"
123+ "fastolympiccoding.runSettings" ,
124124 ) ;
125125 const extension = path . extname ( file ) ;
126126 const languageSettings = runSettings [ extension ] as
127127 | ILanguageSettings
128128 | undefined ;
129129 if ( ! languageSettings ) {
130130 vscode . window . showWarningMessage (
131- `No run setting detected for file extension "${ extension } "`
131+ `No run setting detected for file extension "${ extension } "` ,
132132 ) ;
133133 return ;
134134 }
135135 if ( languageSettings . compileCommand ) {
136136 void compile ( file , languageSettings . compileCommand , context ) ; // we don't care about exit code of compilation
137137 }
138- }
139- )
138+ } ,
139+ ) ,
140140 ) ;
141141
142142 context . subscriptions . push (
143143 vscode . commands . registerTextEditorCommand ( "fastolympiccoding.runAll" , ( ) =>
144- judgeViewProvider . runAll ( )
145- )
144+ judgeViewProvider . runAll ( ) ,
145+ ) ,
146146 ) ;
147147
148148 context . subscriptions . push (
149149 vscode . commands . registerTextEditorCommand ( "fastolympiccoding.stopAll" , ( ) =>
150- judgeViewProvider . stopAll ( )
151- )
150+ judgeViewProvider . stopAll ( ) ,
151+ ) ,
152152 ) ;
153153
154154 context . subscriptions . push (
155155 vscode . commands . registerTextEditorCommand (
156156 "fastolympiccoding.deleteAll" ,
157- ( ) => judgeViewProvider . deleteAll ( )
158- )
157+ ( ) => judgeViewProvider . deleteAll ( ) ,
158+ ) ,
159159 ) ;
160160
161161 context . subscriptions . push (
162162 vscode . commands . registerTextEditorCommand ( "fastolympiccoding.saveAll" , ( ) =>
163- judgeViewProvider . saveAll ( )
164- )
163+ judgeViewProvider . saveAll ( ) ,
164+ ) ,
165165 ) ;
166166
167167 context . subscriptions . push (
168168 vscode . commands . registerTextEditorCommand (
169169 "fastolympiccoding.startStressTest" ,
170- ( ) => void stressViewProvider . run ( )
171- )
170+ ( ) => void stressViewProvider . run ( ) ,
171+ ) ,
172172 ) ;
173173
174174 context . subscriptions . push (
175175 vscode . commands . registerTextEditorCommand (
176176 "fastolympiccoding.stopStressTest" ,
177- ( ) => stressViewProvider . stop ( )
178- )
177+ ( ) => stressViewProvider . stop ( ) ,
178+ ) ,
179179 ) ;
180180
181181 context . subscriptions . push (
182182 vscode . commands . registerTextEditorCommand (
183183 "fastolympiccoding.clearStressTest" ,
184- ( ) => stressViewProvider . clear ( )
185- )
184+ ( ) => stressViewProvider . clear ( ) ,
185+ ) ,
186186 ) ;
187187
188188 context . subscriptions . push (
@@ -193,8 +193,8 @@ function registerCommands(context: vscode.ExtensionContext): void {
193193 stressViewProvider . clearData ( ) ;
194194 judgeViewProvider . loadCurrentFileData ( ) ;
195195 stressViewProvider . loadCurrentFileData ( ) ;
196- }
197- )
196+ } ,
197+ ) ,
198198 ) ;
199199
200200 context . subscriptions . push (
@@ -204,11 +204,11 @@ function registerCommands(context: vscode.ExtensionContext): void {
204204 void ( async ( ) => {
205205 const config = vscode . workspace . getConfiguration ( "fastolympiccoding" ) ;
206206 const dependencies = config . get < IDependencies > (
207- "fileTemplatesDependencies"
207+ "fileTemplatesDependencies" ,
208208 ) ;
209209 const baseDirectory = resolveVariables (
210210 // biome-ignore lint/style/noNonNullAssertion: Default value provided by VSCode
211- config . get ( "fileTemplatesBaseDirectory" ) !
211+ config . get ( "fileTemplatesBaseDirectory" ) ! ,
212212 ) ;
213213 const files = (
214214 await fs . readdir ( baseDirectory , {
@@ -230,10 +230,10 @@ function registerCommands(context: vscode.ExtensionContext): void {
230230 const content = await getFileContent (
231231 path . relative (
232232 baseDirectory ,
233- path . join ( pickedFile . description , pickedFile . label )
233+ path . join ( pickedFile . description , pickedFile . label ) ,
234234 ) ,
235235 baseDirectory ,
236- dependencies ?? { }
236+ dependencies ?? { } ,
237237 ) ;
238238 if ( ! content ) {
239239 return ;
@@ -244,32 +244,32 @@ function registerCommands(context: vscode.ExtensionContext): void {
244244 if ( vscode . window . activeTextEditor ) {
245245 edit . insert (
246246 vscode . window . activeTextEditor . selection . active ,
247- content
247+ content ,
248248 ) ;
249249 }
250- }
250+ } ,
251251 ) ;
252252 // biome-ignore lint/style/noNonNullAssertion: Default value provided by VSCode
253253 const foldTemplate = config . get < boolean > ( "foldFileTemplate" ) ! ;
254254 if ( inserted && foldTemplate ) {
255255 vscode . commands . executeCommand ( "editor.fold" ) ;
256256 }
257257 } ) ( ) ;
258- }
259- )
258+ } ,
259+ ) ,
260260 ) ;
261261
262262 context . subscriptions . push (
263263 vscode . commands . registerCommand (
264264 "fastolympiccoding.listenForCompetitiveCompanion" ,
265- ( ) => listenForCompetitiveCompanion ( )
266- )
265+ ( ) => listenForCompetitiveCompanion ( ) ,
266+ ) ,
267267 ) ;
268268 context . subscriptions . push (
269269 vscode . commands . registerCommand (
270270 "fastolympiccoding.stopCompetitiveCompanion" ,
271- ( ) => stopCompetitiveCompanion ( )
272- )
271+ ( ) => stopCompetitiveCompanion ( ) ,
272+ ) ,
273273 ) ;
274274}
275275
@@ -301,7 +301,7 @@ function listenForCompetitiveCompanion() {
301301 }
302302
303303 vscode . window . showInformationMessage (
304- `Received data for "${ problemDatas [ problemDatas . length - 1 ] . name } "`
304+ `Received data for "${ problemDatas [ problemDatas . length - 1 ] . name } "` ,
305305 ) ;
306306
307307 if ( cnt === 0 ) {
@@ -353,8 +353,8 @@ function listenForCompetitiveCompanion() {
353353 resolve (
354354 path . join (
355355 pick . selectedItems [ 0 ] . description ?? "" ,
356- pick . selectedItems [ 0 ] . label
357- )
356+ pick . selectedItems [ 0 ] . label ,
357+ ) ,
358358 ) ;
359359 }
360360 pick . hide ( ) ;
@@ -364,7 +364,7 @@ function listenForCompetitiveCompanion() {
364364 }
365365 if ( fileTo === "" ) {
366366 vscode . window . showWarningMessage (
367- `No file to write testcases for "${ problemDatas [ i ] . name } "`
367+ `No file to write testcases for "${ problemDatas [ i ] . name } "` ,
368368 ) ;
369369 continue ;
370370 }
@@ -373,14 +373,14 @@ function listenForCompetitiveCompanion() {
373373
374374 judgeViewProvider . addFromCompetitiveCompanion (
375375 fileTo ,
376- problemDatas [ i ]
376+ problemDatas [ i ] ,
377377 ) ;
378378 filePaths . push ( fileTo ) ;
379379 }
380380 if ( openSelectedFiles ) {
381381 for ( const filePath of filePaths ) {
382382 const document = await vscode . workspace . openTextDocument (
383- vscode . Uri . file ( filePath )
383+ vscode . Uri . file ( filePath ) ,
384384 ) ;
385385 await vscode . window . showTextDocument ( document ) ;
386386 }
@@ -398,8 +398,8 @@ function listenForCompetitiveCompanion() {
398398 } ) ;
399399 competitiveCompanionServer . once ( "error" , ( error ) =>
400400 vscode . window . showErrorMessage (
401- `Competitive Companion listener error: ${ error } `
402- )
401+ `Competitive Companion listener error: ${ error } ` ,
402+ ) ,
403403 ) ;
404404 competitiveCompanionServer . once ( "close" , ( ) => {
405405 competitiveCompanionServer = undefined ;
@@ -423,7 +423,7 @@ function stopCompetitiveCompanion() {
423423function createCompetitiveCompanionStatus ( context : vscode . ExtensionContext ) {
424424 const competitiveCompanionStatus = vscode . window . createStatusBarItem (
425425 "fastolympiccoding.listeningForCompetitiveCompanion" ,
426- vscode . StatusBarAlignment . Left
426+ vscode . StatusBarAlignment . Left ,
427427 ) ;
428428 competitiveCompanionStatus . name = "Competitive Companion Indicator" ;
429429 competitiveCompanionStatus . text = "$(zap)" ;
0 commit comments