From a9ae64a6c95a3c7d70ecafc439ae1c3550351c91 Mon Sep 17 00:00:00 2001 From: SendilKumar N Date: Wed, 22 Feb 2017 16:12:24 +0800 Subject: [PATCH] Refactor(ES6): Lint fixes --- lib/OptionsApply.js | 2 +- lib/ProgressPlugin.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/OptionsApply.js b/lib/OptionsApply.js index 04540d46b..3b1ec3164 100644 --- a/lib/OptionsApply.js +++ b/lib/OptionsApply.js @@ -5,6 +5,6 @@ "use strict"; class OptionsApply { - process(options, compiler) { } + process(options, compiler) {} } module.exports = OptionsApply; diff --git a/lib/ProgressPlugin.js b/lib/ProgressPlugin.js index 86b2436fd..9059c0767 100644 --- a/lib/ProgressPlugin.js +++ b/lib/ProgressPlugin.js @@ -25,8 +25,8 @@ class ProgressPlugin { compiler.compilers.forEach(function(compiler, idx) { compiler.apply(new ProgressPlugin((p, msg) => { states[idx] = Array.prototype.slice.apply(arguments); - handler(...[ - states.map(state => state && state[0] || 0).reduce((a, b) => a + b) / states.length, + handler.apply(null, [ + states.map(state => state && state[0] || 0).reduce((a, b) => a + b) / states.length, `[${idx}] ${msg}` ].concat(Array.prototype.slice.call(arguments, 2))); })); @@ -42,7 +42,7 @@ class ProgressPlugin { 0.1 + (doneModules / Math.max(lastModulesCount, moduleCount)) * 0.6, "building modules", `${doneModules}/${moduleCount} modules`, - `${activeModules.length} active`, + `${activeModules.length} active`, activeModules[activeModules.length - 1] ); };