From: Alexander Moisseev Date: Thu, 5 Jul 2018 06:52:23 +0000 (+0300) Subject: [Minor] JS: Disable "no-bitwise" rule for specific lines X-Git-Tag: 1.7.8~26^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6314a4a2c3d596116fcac08293b08431ce36155;p=thirdparty%2Frspamd.git [Minor] JS: Disable "no-bitwise" rule for specific lines --- diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js index 036a1ac248..38c9930599 100644 --- a/interface/js/app/graph.js +++ b/interface/js/app/graph.js @@ -124,7 +124,7 @@ define(["jquery", "d3evolution", "footable"], return { label: graph_options.legend.entries[i].label, - value: value ^ 0, + value: value ^ 0, // eslint-disable-line no-bitwise min: +yExtents[0].toFixed(6), avg: +avg.toFixed(6), max: +yExtents[1].toFixed(6), diff --git a/interface/js/app/stats.js b/interface/js/app/stats.js index a85f91425f..f3f8930e26 100644 --- a/interface/js/app/stats.js +++ b/interface/js/app/stats.js @@ -26,11 +26,13 @@ define(["jquery", "d3pie", "humanize"], function($, d3pie, Humanize) { // @ ms to date function msToTime(seconds) { + /* eslint-disable no-bitwise */ years = seconds / 31536000 >> 0; // 3600*24*365 months = seconds % 31536000 / 2628000 >> 0; // 3600*24*365/12 days = seconds % 31536000 % 2628000 / 86400 >> 0; // 24*3600 hours = seconds % 31536000 % 2628000 % 86400 / 3600 >> 0; minutes = seconds % 31536000 % 2628000 % 86400 % 3600 / 60 >> 0; + /* eslint-enable no-bitwise */ if (years > 0) { if (months > 0) { out = years + "yr " + months + "mth";