mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-26 09:19:55 +01:00
ESlint no-unused-expressions
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user