commit 5667878: [Minor] Use multiple variable declarations
moisseev
moiseev at mezonplus.ru
Mon Jul 29 17:49:04 UTC 2024
Author: moisseev
Date: 2023-11-20 14:00:56 +0300
URL: https://github.com/rspamd/rspamd/commit/5667878f06839c25fd6867d7ec3ef5b22bdccf84
[Minor] Use multiple variable declarations
---
.eslintrc.json | 6 ++----
interface/js/app/rspamd.js | 3 ++-
interface/js/app/symbols.js | 6 ++++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/.eslintrc.json b/.eslintrc.json
index 3a7eb3f0b..bac88d248 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -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"
}
}
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index ac9f1f23b..61ce4c56a 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -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",
diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js
index 7267d0ed9..ab6e8c101 100644
--- a/interface/js/app/symbols.js
+++ b/interface/js/app/symbols.js
@@ -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 {
More information about the Commits
mailing list