diff --git a/.eslintrc b/.eslintrc index b529fa206..4148a259b 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 570c9ec96..86e0093ca 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); } }