]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Require capitalized constructor names
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 15 Sep 2018 14:29:43 +0000 (17:29 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 15 Sep 2018 14:29:43 +0000 (17:29 +0300)
.eslintrc.json
interface/js/app/history.js
interface/js/app/rspamd.js

index b86ee9390bb56e2969c0e6e6568ce78df7dd62e3..0d61454cabbfb480635d6786ecb925ae382140c9 100644 (file)
@@ -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",
index a6c0802538b6e42075db4de9b699a404cdee5785..48f2220fe643f04a479c3a95d24688542443ae1b 100644 (file)
@@ -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]);
                     }
                 }
             }
index 8310ccf4786c8eb1709bfe3a474e924691806b5c..5ade66ce49e7eaf2bcc13c6893436cebeab9784d 100644 (file)
@@ -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: {