commit b8cd1ed: [Minor] Use consistent function style

moisseev moiseev at mezonplus.ru
Mon Jul 29 17:49:05 UTC 2024


Author: moisseev
Date: 2023-11-20 14:15:56 +0300
URL: https://github.com/rspamd/rspamd/commit/b8cd1edebce5a60d3c67b31b15cc930d4d64dc57

[Minor] Use consistent function style

---
 .eslintrc.json              | 3 +--
 interface/js/app/history.js | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.eslintrc.json b/.eslintrc.json
index bac88d248..cc08714b5 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -18,7 +18,7 @@
         "capitalized-comments": "off",
         "curly": ["error", "multi-line"],
         "func-names": "off",
-        // "func-style": ["error", "declaration"],
+        "func-style": ["error", "declaration"],
         "id-length": ["error", { "min": 1 }],
         "line-comment-position": "off",
         "logical-assignment-operators": ["error", "never"],
@@ -65,7 +65,6 @@
 
 
         // Temporarily disabled rules
-        "func-style": "off",
         "max-lines": "off",
         "max-lines-per-function": "off",
         "no-invalid-this": "off",
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index 5d5b9068e..3d06f667c 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -33,9 +33,7 @@ define(["jquery", "app/rspamd", "d3", "footable"],
         function process_history_legacy(data) {
             const items = [];
 
-            const compare = function (e1, e2) {
-                return e1.name.localeCompare(e2.name);
-            };
+            function compare(e1, e2) { return e1.name.localeCompare(e2.name); }
 
             $("#selSymOrder_history, label[for='selSymOrder_history']").hide();
 


More information about the Commits mailing list