From: Alexander Moisseev Date: Sat, 15 Sep 2018 14:29:43 +0000 (+0300) Subject: [Minor] Require capitalized constructor names X-Git-Tag: 1.8.0~95^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e5a73f26fd6cc2c98c53d06cc5998a913da03cc1;p=rspamd.git [Minor] Require capitalized constructor names --- diff --git a/.eslintrc.json b/.eslintrc.json index b86ee9390..0d61454ca 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -66,7 +66,6 @@ "max-len": "off", "max-lines": "off", "max-lines-per-function": "off", - "new-cap": "off", "no-inline-comments": "off", "no-invalid-this": "off", "no-underscore-dangle": "off", diff --git a/interface/js/app/history.js b/interface/js/app/history.js index a6c080253..48f2220fe 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -44,14 +44,14 @@ define(["jquery", "footable", "humanize"], var htmlEscaper = /[&<>"'/`=]/g; var symbolDescriptions = {}; - var EscapeHTML = function (string) { + var escapeHTML = function (string) { return (String(string)).replace(htmlEscaper, function (match) { return htmlEscapes[match]; }); }; var escape_HTML_array = function (arr) { - arr.forEach(function (d, i) { arr[i] = EscapeHTML(d); }); + arr.forEach(function (d, i) { arr[i] = escapeHTML(d); }); }; function unix_time_format(tm) { @@ -72,9 +72,9 @@ define(["jquery", "footable", "humanize"], if (!sym.name) { sym.name = key; } - sym.name = EscapeHTML(sym.name); + sym.name = escapeHTML(sym.name); if (sym.description) { - sym.description = EscapeHTML(sym.description); + sym.description = escapeHTML(sym.description); } if (sym.options) { @@ -84,7 +84,7 @@ define(["jquery", "footable", "humanize"], break; default: if (typeof (item[prop]) === "string") { - item[prop] = EscapeHTML(item[prop]); + item[prop] = escapeHTML(item[prop]); } } } diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index 8310ccf47..5ade66ce4 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -28,7 +28,7 @@ define(["jquery", "d3pie", "visibility", "nprogress", "app/stats", "app/graph", "app/config", "app/symbols", "app/history", "app/upload"], // eslint-disable-next-line max-params -function ($, d3pie, visibility, NProgress, tab_stat, tab_graph, tab_config, +function ($, D3pie, visibility, NProgress, tab_stat, tab_graph, tab_config, tab_symbols, tab_history, tab_upload) { "use strict"; // begin @@ -357,7 +357,7 @@ function ($, d3pie, visibility, NProgress, tab_stat, tab_graph, tab_config, }) ); } else { - obj = new d3pie(id, + obj = new D3pie(id, $.extend({}, { header: { title: {