]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use multiple variable declarations
authormoisseev <moiseev@mezonplus.ru>
Mon, 20 Nov 2023 11:00:56 +0000 (14:00 +0300)
committermoisseev <moiseev@mezonplus.ru>
Mon, 20 Nov 2023 11:00:56 +0000 (14:00 +0300)
.eslintrc.json
interface/js/app/rspamd.js
interface/js/app/symbols.js

index 3a7eb3f0b90a4b27d6bf233503bdbeb1b2581b41..bac88d24803bf980c9be70f3db38fb4da9fa50a0 100644 (file)
@@ -32,7 +32,7 @@
         "no-plusplus": "off",
         "no-ternary": "off",
         "object-shorthand": "off",
-        "one-var": "off",
+        "one-var": ["error", { "initialized": "never" }],
         "prefer-arrow-callback": "off",
         "prefer-destructuring": "off",
         "prefer-named-capture-group": "off",
@@ -71,9 +71,7 @@
         "no-invalid-this": "off",
         "prefer-exponentiation-operator": "off",
         "sort-keys": "off",
-        "sort-vars": "off",
 
-        "@stylistic/function-paren-newline": "off",
-        "@stylistic/one-var-declaration-per-line": "off"
+        "@stylistic/function-paren-newline": "off"
     }
 }
index ac9f1f23b21982469d0fcea00566e7140c83d7fb..61ce4c56a91507ee261ce3ad1ad51d1bece19de5 100644 (file)
@@ -658,7 +658,8 @@ function ($, NProgress) {
             },
             $create: function () {
                 this._super();
-                const self = this, $form_grp = $("<div/>", {
+                const self = this;
+                const $form_grp = $("<div/>", {
                     class: "form-group d-inline-flex align-items-center"
                 }).append($("<label/>", {
                     class: "sr-only",
index 7267d0ed9a97de95280a8b964b1b536f1fbe643c..ab6e8c10152d7d94bec931f43dd4f1473cb617f1 100644 (file)
@@ -154,7 +154,8 @@ define(["jquery", "app/rspamd", "footable"],
                         },
                         $create: function () {
                             this._super();
-                            const self = this, $form_grp = $("<div/>", {
+                            const self = this;
+                            const $form_grp = $("<div/>", {
                                 class: "form-group"
                             }).append($("<label/>", {
                                 class: "sr-only",
@@ -175,7 +176,8 @@ define(["jquery", "app/rspamd", "footable"],
                             });
                         },
                         _onStatusDropdownChanged: function (e) {
-                            const self = e.data.self, selected = $(this).val();
+                            const self = e.data.self;
+                            const selected = $(this).val();
                             if (selected !== self.def) {
                                 self.addFilter("group", selected, ["group"]);
                             } else {