summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-07-08 12:21:37 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-07-08 12:21:37 +0300
commit4d2b29abcbe0f61cdf89af0d92cec0003d325a81 (patch)
tree2498c46e3b85d176c9b35e88c248e07b5f16b63f
parent28401018a84cb1d526ab334ecdf44584a064bb6a (diff)
downloadrspamd-4d2b29abcbe0f61cdf89af0d92cec0003d325a81.tar.gz
rspamd-4d2b29abcbe0f61cdf89af0d92cec0003d325a81.zip
[Test] Specify JS Globals
-rw-r--r--.eslintrc.json4
-rw-r--r--interface/js/app/config.js4
-rw-r--r--interface/js/app/graph.js2
-rw-r--r--interface/js/app/history.js2
-rw-r--r--interface/js/app/rspamd.js3
-rw-r--r--interface/js/app/symbols.js2
-rw-r--r--interface/js/main.js4
7 files changed, 18 insertions, 3 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 2c32e16a7..32530cd18 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -3,6 +3,9 @@
"browser": true
},
"extends": "eslint:all",
+ "globals": {
+ "define": false
+ },
"rules": {
"array-bracket-newline": ["error", "consistent"],
"camelcase": "off",
@@ -76,7 +79,6 @@
"no-param-reassign": "off",
"no-redeclare": "off",
"no-shadow": "off",
- "no-undef": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"one-var-declaration-per-line": "off",
diff --git a/interface/js/app/config.js b/interface/js/app/config.js
index fe9d27a16..a64e8f3ab 100644
--- a/interface/js/app/config.js
+++ b/interface/js/app/config.js
@@ -22,6 +22,8 @@
THE SOFTWARE.
*/
+/* global $span:true, $tbody:true */
+
define(["jquery"],
function ($) {
var interface = {};
@@ -240,7 +242,7 @@ define(["jquery"],
$("#modalTitle").html(item.uri);
$("#" + item.map).first().show();
$("#modalDialog .progress").hide();
- $("#modalDialog").modal(show = true, backdrop = true, keyboard = show);
+ $("#modalDialog").modal({backdrop: true, keyboard: "show", show: true});
if (item.editable === false) {
$("#modalSave").hide();
$("#modalSaveAll").hide();
diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js
index c5fba91b1..6a63500fc 100644
--- a/interface/js/app/graph.js
+++ b/interface/js/app/graph.js
@@ -23,6 +23,8 @@
THE SOFTWARE.
*/
+/* global d3:false */
+
define(["jquery", "d3evolution", "footable"],
function ($, D3Evolution) {
var rrd_pie_config = {
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index be2471c57..8147c39a1 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -22,6 +22,8 @@
THE SOFTWARE.
*/
+/* global FooTable:false */
+
define(["jquery", "footable", "humanize"],
function ($, _, Humanize) {
var interface = {};
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 8f6bc412b..b935cf6c2 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -22,6 +22,9 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
+
+/* global jQuery:false, Visibility:false */
+
define(["jquery", "d3pie", "visibility", "app/stats", "app/graph", "app/config",
"app/symbols", "app/history", "app/upload"],
function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js
index 358deb0e5..a639127f4 100644
--- a/interface/js/app/symbols.js
+++ b/interface/js/app/symbols.js
@@ -22,6 +22,8 @@
THE SOFTWARE.
*/
+/* global FooTable:false */
+
define(["jquery", "footable"],
function ($) {
var interface = {};
diff --git a/interface/js/main.js b/interface/js/main.js
index af7c63b83..515645667 100644
--- a/interface/js/main.js
+++ b/interface/js/main.js
@@ -1,3 +1,5 @@
+/* global d3:false, require:false, requirejs:false */ // eslint-disable-line no-unused-vars
+
requirejs.config({
baseUrl: "js/lib",
paths: {
@@ -26,7 +28,7 @@ document.title = window.location.hostname +
" - Rspamd Web Interface";
define("d3.global", ["d3"], function (_) {
- d3 = _;
+ d3 = _; // eslint-disable-line no-global-assign
});
// Load main UI