From: Alexander Moisseev Date: Sun, 16 Sep 2018 16:31:14 +0000 (+0300) Subject: [Minor] Enforce consistent key-value spacing X-Git-Tag: 1.8.0~95^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=264c8b3d079012d499dafea682888ad2d3f8265f;p=rspamd.git [Minor] Enforce consistent key-value spacing --- diff --git a/.eslintrc.json b/.eslintrc.json index b04b72b4b..fd33c6de2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,9 @@ "id-length": ["error", { "min": 1 }], "indent": ["error", 4, { "SwitchCase": 1 }], // "max-len": ["error", { "code": 120 }], + "key-spacing": ["error", { + "singleLine": { "afterColon": false } + }], "max-params": ["warn", 6], "max-statements": ["warn", 28], "max-statements-per-line": ["error", { "max": 2 }], @@ -58,7 +61,6 @@ "func-style": "off", "function-paren-newline": "off", "guard-for-in": "off", - "key-spacing": "off", "line-comment-position": "off", "max-len": "off", "max-lines": "off", diff --git a/interface/js/app/config.js b/interface/js/app/config.js index ee950f023..58132dc41 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -193,7 +193,7 @@ define(["jquery"], $("#modalTitle").html(item.uri); $("#" + item.map).first().show(); $("#modalDialog .progress").hide(); - $("#modalDialog").modal({backdrop: true, keyboard: "show", show: true}); + $("#modalDialog").modal({backdrop:true, keyboard:"show", show:true}); if (item.editable === false) { $("#modalSave").hide(); $("#modalSaveAll").hide(); @@ -227,7 +227,7 @@ define(["jquery"], headers: { Map: id, }, - params:{ + params: { data: data, dataType: "text", }, diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js index 9776fef0f..319ccda9e 100644 --- a/interface/js/app/graph.js +++ b/interface/js/app/graph.js @@ -94,10 +94,10 @@ define(["jquery", "d3evolution", "footable"], function initGraph() { var graph = new D3Evolution("graph", $.extend({}, graph_options, { - yScale: getSelector("selYScale"), - type: getSelector("selType"), + yScale: getSelector("selYScale"), + type: getSelector("selType"), interpolate: getSelector("selInterpolate"), - convert: getSelector("selConvert"), + convert: getSelector("selConvert"), })); $("#selYScale").change(function () { graph.yScale(this.value); @@ -144,12 +144,12 @@ define(["jquery", "d3evolution", "footable"], enabled: true }, columns: [ - {name: "label", title: "Action"}, - {name: "value", title: "Messages", defaultContent: ""}, - {name: "min", title: "Minimum, " + unit + "", defaultContent: ""}, - {name: "avg", title: "Average, " + unit + "", defaultContent: ""}, - {name: "max", title: "Maximum, " + unit + "", defaultContent: ""}, - {name: "last", title: "Last, " + unit}, + {name:"label", title:"Action"}, + {name:"value", title:"Messages", defaultContent:""}, + {name:"min", title:"Minimum, " + unit + "", defaultContent:""}, + {name:"avg", title:"Average, " + unit + "", defaultContent:""}, + {name:"max", title:"Maximum, " + unit + "", defaultContent:""}, + {name:"last", title:"Last, " + unit}, ], rows: rows }); @@ -257,7 +257,7 @@ define(["jquery", "d3evolution", "footable"], }, errorMessage: "Cannot receive throughput data", errorOnceId: "alerted_graph_", - data: {type: type} + data: {type:type} }); }; diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 990f60a09..21a6edfc0 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -151,7 +151,7 @@ define(["jquery", "footable", "humanize"], full += item.rcpt_mime.join(", "); shrt += item.rcpt_mime.slice(0, rcpt_lim).join(",​") + more("rcpt_mime"); } - return {full: full, shrt: shrt}; + return {full:full, shrt:shrt}; } preprocess_item(item); @@ -511,36 +511,36 @@ define(["jquery", "footable", "humanize"], function initHistoryTable(rspamd, tables, data, items) { FooTable.actionFilter = FooTable.Filtering.extend({ - construct : function (instance) { + construct: function (instance) { this._super(instance); this.actions = ["reject", "add header", "greylist", "no action", "soft reject", "rewrite subject"]; this.def = "Any action"; this.$action = null; }, - $create : function () { + $create: function () { this._super(); var self = this, $form_grp = $("
", { - class : "form-group" + class: "form-group" }).append($("