From ac2f69f7afb00ef417087ab116305fa44b6a6d7b Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Sat, 18 Feb 2017 12:35:49 -0700
Subject: [PATCH] ESlint no-return-assign and no-restricted-modules
---
.eslintrc | 5 ++---
public/src/modules/settings.js | 3 ++-
public/src/modules/settings/key.js | 3 ++-
public/src/modules/settings/object.js | 3 ++-
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/.eslintrc b/.eslintrc
index 0b1eb32844..51fd82fb85 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -93,9 +93,8 @@
"no-script-url": "off",
"no-path-concat": "off",
"no-unused-expressions": "off",
- "no-restricted-module": "off",
- "no-return-assign": "off",
- "no-restricted-modules": "off",
+ // "no-return-assign": "off",
+ // "no-restricted-modules": "off",
// "object-curly-spacing": "off",
// "indent": "off",
// "padded-blocks": "off",
diff --git a/public/src/modules/settings.js b/public/src/modules/settings.js
index 11e317e067..c11abb2f7b 100644
--- a/public/src/modules/settings.js
+++ b/public/src/modules/settings.js
@@ -239,7 +239,8 @@ define('settings', function () {
@param amount The amount of jobs to register.
*/
registerReadyJobs: function (amount) {
- return waitingJobs += amount;
+ waitingJobs += amount;
+ return waitingJobs;
},
/**
Decreases the amount of jobs before settings are ready by given amount or 1.
diff --git a/public/src/modules/settings/key.js b/public/src/modules/settings/key.js
index d6eb183c77..c387b89430 100644
--- a/public/src/modules/settings/key.js
+++ b/public/src/modules/settings/key.js
@@ -61,7 +61,8 @@ define('settings/key', function () {
key.code = event.which;
key.char = convertKeyCodeToChar(key.code);
}
- return oldKey = key;
+ oldKey = key;
+ return key;
}
/**
diff --git a/public/src/modules/settings/object.js b/public/src/modules/settings/object.js
index d100261691..c1dbce7dc4 100644
--- a/public/src/modules/settings/object.js
+++ b/public/src/modules/settings/object.js
@@ -104,7 +104,8 @@ define('settings/object', function () {
var prop = property.data('prop');
var empty = helper.isTrue(property.data('empty'));
if (empty || (val !== void 0 && (val == null || val.length !== 0))) {
- return value[prop] = val;
+ value[prop] = val;
+ return val;
}
});
if (empty || Object.keys(value).length) {