@@ -88,6 +88,7 @@ function canSetFiles(fileList: FileList): boolean {
8888 testEl . files = fileList ;
8989 } catch ( e ) {
9090 return false ;
91+ e ; // eslint-disable-line @typescript-eslint/no-unused-expressions
9192 }
9293 return true ;
9394}
@@ -99,7 +100,7 @@ function handleDrop(e: JQuery.DragEventBase, el: HTMLInputElement): void {
99100 // 1. The FileList object isn't supported by this browser, and
100101 // there's nothing else we can try. (< IE 10)
101102 console . log (
102- "Dropping files is not supported on this browser. (no FileList)"
103+ "Dropping files is not supported on this browser. (no FileList)" ,
103104 ) ;
104105 } else if ( ! canSetFiles ( files ) ) {
105106 // 2. The browser doesn't support assigning a type=file input's .files
@@ -146,7 +147,7 @@ function abortCurrentUpload($el: JQuery<EventTarget>) {
146147
147148function uploadDroppedFilesIE10Plus (
148149 el : HTMLInputElement ,
149- files : FileList
150+ files : FileList ,
150151) : void {
151152 const $el = $ ( el ) ;
152153
@@ -158,7 +159,7 @@ function uploadDroppedFilesIE10Plus(
158159 // Start the new upload and put the uploader in 'currentUploader'.
159160 $el . data (
160161 "currentUploader" ,
161- new FileUploader ( shinyShinyApp ( ) , fileInputBindingGetId ( el ) , files , el )
162+ new FileUploader ( shinyShinyApp ( ) , fileInputBindingGetId ( el ) , files , el ) ,
162163 ) ;
163164}
164165
@@ -178,7 +179,7 @@ function uploadFiles(evt: JQuery.DragEvent): void {
178179 // Start the new upload and put the uploader in 'currentUploader'.
179180 $el . data (
180181 "currentUploader" ,
181- new FileUploader ( shinyShinyApp ( ) , id , files , evt . target )
182+ new FileUploader ( shinyShinyApp ( ) , id , files , evt . target ) ,
182183 ) ;
183184}
184185
@@ -237,17 +238,18 @@ class FileInputBinding extends InputBinding {
237238 }
238239 setValue ( el : HTMLElement , value : void ) : void {
239240 // Not implemented
240- el ;
241- value ;
241+ return ;
242+ el ; // eslint-disable-line @typescript-eslint/no-unused-expressions
243+ value ; // eslint-disable-line @typescript-eslint/no-unused-expressions
242244 }
243245 getType ( el : HTMLElement ) : string {
244246 // This will be used only when restoring a file from a saved state.
245247 return "shiny.file" ;
246- el ;
248+ el ; // eslint-disable-line @typescript-eslint/no-unused-expressions
247249 }
248250
249251 subscribe ( el : HTMLInputElement , callback : ( x : boolean ) => void ) : void {
250- callback ;
252+ callback ; // eslint-disable-line @typescript-eslint/no-unused-expressions
251253
252254 $ ( el ) . on ( "change.fileInputBinding" , uploadFiles ) ;
253255 // Here we try to set up the necessary events for Drag and Drop ("DnD").
@@ -257,8 +259,9 @@ class FileInputBinding extends InputBinding {
257259
258260 enableDraghover ( $zone ) . on ( {
259261 "draghover:enter.draghover" : ( e ) => {
260- e ;
261262 $zone . addClass ( zoneOver ) ;
263+ return ;
264+ e ; // eslint-disable-line @typescript-eslint/no-unused-expressions
262265 } ,
263266 "draghover:leave.draghover" : ( e ) => {
264267 $zone . removeClass ( zoneOver ) ;
@@ -267,8 +270,9 @@ class FileInputBinding extends InputBinding {
267270 e . stopPropagation ( ) ;
268271 } ,
269272 "draghover:drop.draghover" : ( e , dropEvent ) => {
270- e ;
271273 handleDrop ( dropEvent , el ) ;
274+ return ;
275+ e ; // eslint-disable-line @typescript-eslint/no-unused-expressions
272276 } ,
273277 } ) ;
274278 }
0 commit comments