]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not reassign function parameters
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 10:14:06 +0000 (13:14 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sun, 15 Jul 2018 10:14:06 +0000 (13:14 +0300)
.eslintrc.json
interface/js/app/rspamd.js

index 80303639e97ac186e83de6b51b6399fbc0033896..b4f242a41bf7f0a9e67c88b8795ea98b1c6e8e58 100644 (file)
@@ -49,7 +49,6 @@
         // Temporarily disabled rules
         "array-callback-return": "off",
         "array-element-newline": "off",
-        "block-scoped-var": "off",
         "brace-style": "off",
         "callback-return": "off",
         "consistent-return": "off",
@@ -74,7 +73,6 @@
         "no-invalid-this": "off",
         "no-loop-func": "off",
         "no-negated-condition": "off",
-        "no-param-reassign": "off",
         "no-underscore-dangle": "off",
         "no-use-before-define": "off",
         "one-var-declaration-per-line": "off",
index 708de27ae54267cfd9b38e81cccf6c7b76eff001..b5d44b9f991c0f188be9882f9fcef0b83cbedb4e 100644 (file)
@@ -79,7 +79,8 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
         ui.connect();
     }
 
-    function tabClick(tab_id) {
+    function tabClick(id) {
+        var tab_id = id;
         if ($(tab_id).attr("disabled")) return;
         $(tab_id).attr("disabled", true);
 
@@ -387,9 +388,8 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
                     });
                 });
                 $.each(neighbours_status, function (ind) {
-                    method = typeof method !== "undefined" ? method : "GET";
                     var req_params = {
-                        type: method,
+                        type: typeof method !== "undefined" ? method : "GET",
                         jsonp: false,
                         data: req_data,
                         beforeSend: function (xhr) {
@@ -457,7 +457,8 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
         });
     };
 
-    ui.drawPie = function (obj, id, data, conf) {
+    ui.drawPie = function (object, id, data, conf) {
+        var obj = object;
         if (obj) {
             obj.updateProp("data.content",
                 data.filter(function (elt) {