From 575b78b9d679db2243083f9ecc8b1543b2a1af02 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Fri, 9 Oct 2015 15:04:21 +0000 Subject: Lint cheesesteak.js and cabinet.js id-length < 2 Fixes ESLint id-length errors using airbnb/legacy config. Variable "i" is ignored as an exception. I've also avoided creating new errors with these changes, so this also fixes some no-unused-vars and avoids creating vars-on-top errors. --- js/cabinet.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'js/cabinet.js') diff --git a/js/cabinet.js b/js/cabinet.js index 2e2408b..09f4e71 100644 --- a/js/cabinet.js +++ b/js/cabinet.js @@ -31,7 +31,7 @@ var _this = this; var passthrough = function(outer, inner, prevent, fn) { - _this.on(outer, function(e) { + _this.on(outer, function(evt) { if (inner === 'click') { $input[0].click(); } else { @@ -39,19 +39,19 @@ } if (prevent) { - e.preventDefault(); + evt.preventDefault(); } if (fn) { - fn(e); + fn(evt); } }, false); }; $input[0].filelist = Object.create(FileList); - $input.on('change', function(e) { - this.filelist = e.target.files; + $input.on('change', function(evt) { + this.filelist = evt.target.files; _this.change(); }); @@ -59,8 +59,8 @@ passthrough('dragover', 'dragover', true); passthrough('dragleave', 'dragleave', true); passthrough('click', 'click', false); - passthrough('drop', 'dragleave', true, function(e) { - $input[0].filelist = e.dataTransfer.files; + passthrough('drop', 'dragleave', true, function(evt) { + $input[0].filelist = evt.dataTransfer.files; _this.change(); }); }; -- cgit v1.2.3