build: Replace jscs+jshint with eslint
[lhc/web/wiklou.git] / resources / src / mediawiki.special / mediawiki.special.upload.js
index dd48367..9e81c4e 100644 (file)
@@ -5,8 +5,11 @@
  * @class mw.special.upload
  * @singleton
  */
+
+/* eslint-disable no-use-before-define */
+/* global Uint8Array */
+
 ( function ( mw, $ ) {
-       /*jshint latedef:false */
        var uploadWarning, uploadLicense,
                ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ),
                $license = $( '#wpLicense' );
                        }, mw.config.get( 'wgFileCanRotate' ) ? function ( data ) {
                                try {
                                        meta = mw.libs.jpegmeta( data, file.fileName );
-                                       // jscs:disable requireCamelCaseOrUpperCaseIdentifiers, disallowDanglingUnderscores
+                                       // eslint-disable-next-line no-underscore-dangle, camelcase
                                        meta._binary_data = null;
-                                       // jscs:enable
                                } catch ( e ) {
                                        meta = null;
                                }
                if ( hasFileAPI() ) {
                        // Update thumbnail when the file selection control is updated.
                        $( '#wpUploadFile' ).change( function () {
+                               var file;
                                clearPreview();
                                if ( this.files && this.files.length ) {
                                        // Note: would need to be updated to handle multiple files.
-                                       var file = this.files[ 0 ];
+                                       file = this.files[ 0 ];
 
                                        if ( !checkMaxUploadSize( file ) ) {
                                                return;