diff --git a/.eslintrc b/.eslintrc index b529fa20686..4148a259baa 100644 --- a/.eslintrc +++ b/.eslintrc @@ -76,6 +76,7 @@ "no-eval": 2, "no-extend-native": 2, "no-extra-parens": 0, + "no-inner-declarations": 2, "no-irregular-whitespace": 2, "no-iterator": 2, "no-loop-func": 2, diff --git a/app/assets/javascripts/discourse/views/reorder-categories.js.es6 b/app/assets/javascripts/discourse/views/reorder-categories.js.es6 index 570c9ec9637..86e0093cad4 100644 --- a/app/assets/javascripts/discourse/views/reorder-categories.js.es6 +++ b/app/assets/javascripts/discourse/views/reorder-categories.js.es6 @@ -54,7 +54,7 @@ export default ModalBodyView.extend({ const startTime = performance.now(); const duration = 100; - function doScroll(timestamp) { + const doScroll = function(timestamp) { let progress = (timestamp - startTime) / duration; if (progress > 1) { progress = 1; @@ -73,7 +73,7 @@ export default ModalBodyView.extend({ const iprogress = 1 - progress; scrollParent.scrollTop(goal * progress + current * iprogress); - } + }; window.requestAnimationFrame(doScroll); } }