Fix consistent-return eslint rule in ES5 files
[MAILPOET-1144]
This commit is contained in:
@ -37,7 +37,6 @@
|
||||
"global-require": 0,
|
||||
"no-throw-literal": 0,
|
||||
"no-extra-bind": 0,
|
||||
"consistent-return": 0,
|
||||
"no-shadow": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"brace-style": 0,
|
||||
|
@ -330,6 +330,7 @@ WysijaForm = {
|
||||
setting.setValue(data.settings[setting.name]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -582,10 +583,8 @@ WysijaForm = {
|
||||
},
|
||||
hideControls: function () {
|
||||
try {
|
||||
return WysijaForm.getBlocks().invoke('hideControls');
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
WysijaForm.getBlocks().invoke('hideControls');
|
||||
} catch (e) {}
|
||||
},
|
||||
hideTools: function () {
|
||||
window.$$('.wysija_tools').invoke('hide');
|
||||
@ -657,6 +656,7 @@ WysijaForm = {
|
||||
// this is a url, so do not encode the protocol
|
||||
return encodeURI(str).replace(/[!'()*]/g, escape);
|
||||
}
|
||||
return str;
|
||||
},
|
||||
updateBlock: function (field) {
|
||||
var hasUpdated = false;
|
||||
@ -973,6 +973,7 @@ WysijaForm.Block.create = function (createBlock, target) {
|
||||
|
||||
// position settings
|
||||
WysijaForm.setSettingsPosition();
|
||||
return true;
|
||||
};
|
||||
|
||||
document.observe('wjfe:item:drop', function (event) {
|
||||
|
@ -17,7 +17,7 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
|
||||
var f;
|
||||
if (window.moment) {
|
||||
if (timestamp === undefined || isNaN(timestamp) || timestamp <= 0) {
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// set date format
|
||||
|
@ -215,6 +215,7 @@ define('modal', ['mailpoet', 'jquery'],
|
||||
jQuery(document).on('keyup.mailpoet_modal', function (e) {
|
||||
if (this.opened === false) { return false; }
|
||||
if (e.keyCode === 27) { this.cancel(); }
|
||||
return true;
|
||||
}.bind(this));
|
||||
|
||||
// make sure the popup is repositioned when the window is resized
|
||||
|
@ -358,7 +358,7 @@ define([
|
||||
|
||||
if (orientation === 'horizontal' && insertionType === 'special') {
|
||||
// Disable special insertion for horizontal containers
|
||||
return;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -79,6 +79,7 @@ define([
|
||||
WidgetView.destroy();
|
||||
return node;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
HighlightEditingBehavior: {}
|
||||
|
@ -54,6 +54,7 @@ define([
|
||||
if (invalidBlock) {
|
||||
return invalidBlock.validationError;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
parse: function (response) {
|
||||
// If container has any blocks - add them to a collection
|
||||
@ -132,6 +133,7 @@ define([
|
||||
WidgetView.destroy();
|
||||
return node;
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
testAttachToInstance: function (model, view) {
|
||||
// Attach Draggable only to layout containers and disable it
|
||||
|
@ -143,6 +143,7 @@ define([
|
||||
}).always(function () {
|
||||
that.trigger('morePostsLoaded');
|
||||
});
|
||||
return true;
|
||||
},
|
||||
_refreshTransformedPosts: function () {
|
||||
var that = this;
|
||||
|
@ -195,6 +195,7 @@ define([
|
||||
} else {
|
||||
return this.changeField('link', event);
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
changeField: function (field, event) {
|
||||
this.model.set(field, jQuery(event.target).val());
|
||||
|
@ -350,6 +350,7 @@ define([
|
||||
|
||||
return message;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
App.on('before:start', function (App) {
|
||||
|
@ -339,6 +339,7 @@ define([
|
||||
}
|
||||
});
|
||||
});
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user