Skip to content

Node.js based forum software built for the modern web

ESlint no-unused-expressions

Peter Jaszkowiakdaa169c0944d
diff --git a/.eslintrc b/.eslintrc
index 51fd82fb85..5adcaa5543 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -92,7 +92,7 @@
"no-extra-boolean-cast": "off",
"no-script-url": "off",
"no-path-concat": "off",
- "no-unused-expressions": "off",
+ // "no-unused-expressions": "off",
// "no-return-assign": "off",
// "no-restricted-modules": "off",
// "object-curly-spacing": "off",
diff --git a/public/src/modules/pictureCropper.js b/public/src/modules/pictureCropper.js
index 6f23edbef1..119565cbe7 100644
--- a/public/src/modules/pictureCropper.js
+++ b/public/src/modules/pictureCropper.js
@@ -50,7 +50,11 @@ define('pictureCropper', ['translator', 'cropper'], function (translator, croppe
cropperModal.find('.flip').on('click', function () {
var option = this.getAttribute('data-option');
var method = this.getAttribute('data-method');
- method === 'scaleX' ? cropperTool.scaleX(option) : cropperTool.scaleY(option);
+ if (method === 'scaleX') {
+ cropperTool.scaleX(option);
+ } else {
+ cropperTool.scaleY(option);
+ }
this.setAttribute('data-option', option * -1);
});
diff --git a/public/src/modules/settings/object.js b/public/src/modules/settings/object.js
index c1dbce7dc4..d7f7bbda23 100644
--- a/public/src/modules/settings/object.js
+++ b/public/src/modules/settings/object.js
@@ -23,7 +23,7 @@ define('settings/object', function () {
delete attributes['data-prepend'];
delete attributes['data-append'];
attributes = helper.deepClone(attributes);
- type = attributes['data-type'] || attributes.type || 'text',
+ type = attributes['data-type'] || attributes.type || 'text';
element = $(helper.createElementOfType(type, attributes.tagName, attributes));
element.attr('data-parent', '_' + key);
element.attr('data-prop', prop);