Fix padded-blocks eslint rule in ES5 files

[MAILPOET-1144]
This commit is contained in:
Pavel Dohnal
2017-11-30 09:12:19 +00:00
parent 0e08e58288
commit 8ea4a219e2
33 changed files with 0 additions and 47 deletions

View File

@@ -41,7 +41,6 @@
"no-throw-literal": 0,
"no-extra-bind": 0,
"brace-style": 0,
"padded-blocks": 0,
"strict": 0,
"space-infix-ops": 0,
"object-shorthand": 0,

View File

@@ -546,7 +546,6 @@ WysijaForm = {
if (WysijaForm.toolbar.left === null) WysijaForm.toolbar.left = parseInt(window.$(WysijaForm.options.container).positionedOffset().left);
}
if (WysijaForm.toolbar.x === null) WysijaForm.toolbar.x = parseInt(WysijaForm.toolbar.left + window.$(WysijaForm.options.container).getDimensions().width + 15);
},
setToolbarPosition: function () {
var position;
@@ -821,7 +820,6 @@ WysijaForm.Block = window.Class.create({
return this.createBlockDroppable().hasClassName('enabled');
}
return blockPlaceholder.hasClassName('enabled');
},
createBlockDroppable: function () {
info('block -> createBlockDroppable');
@@ -835,7 +833,6 @@ WysijaForm.Block = window.Class.create({
return null;
}
return this.element.previous();
},
getControls: function () {
return this.element.down('.wysija_controls');

View File

@@ -27,10 +27,8 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
return window.moment.unix(timestamp).format(f);
}
return window.moment.utc(timestamp).format(f);
}
return timestamp;
});
Handlebars.registerHelper('cycle', function (value, block) {
@@ -89,7 +87,6 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
return value.replace(mailtoMatchingRegex, '');
}
return value;
});
Handlebars.registerHelper('lookup', function (obj, field) {
return obj && obj[field];
@@ -136,7 +133,6 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
return sanitized.substr(0, limit - strAppend.length) + strAppend;
}
return sanitized;
});
Handlebars.registerHelper('getNumber', function (string) {

View File

@@ -6,7 +6,6 @@ define('helpTooltip', ['mailpoet', 'react', 'react-dom', 'help-tooltip.jsx'],
MailPoet.helpTooltip = {
show: function (domContainerNode, opts) {
ReactDOM.render(React.createElement(
TooltipComponent, {
tooltip: opts.tooltip,
@@ -16,7 +15,6 @@ define('helpTooltip', ['mailpoet', 'react', 'react-dom', 'help-tooltip.jsx'],
), domContainerNode);
}
};
}
);

View File

@@ -21,5 +21,4 @@ define('i18n',
return translations;
}
};
});

View File

@@ -80,7 +80,6 @@ define(
: val;
cur = cur[key];
}
} else {
// Simple key, even simpler rules, since only scalars and shallow
// arrays are allowed.
@@ -88,12 +87,10 @@ define(
if ($.isArray(obj[key])) {
// val is already an array, so push on the next value.
obj[key].push(val);
} else if (obj[key] !== undefined) {
// val isn't an array, but since a second value has been specified,
// convert val into an array.
obj[key] = [obj[key], val];
} else {
// val is a scalar.
obj[key] = val;

View File

@@ -113,7 +113,6 @@ define('modal', ['mailpoet', 'jquery'],
return function () { return template; };
}
return window.Handlebars.compile(template);
},
init: function (options) {
var modal;

View File

@@ -41,7 +41,6 @@ define('mp2migrator', ['mailpoet', 'jquery'], function (mp, jQuery) {
jQuery('#upgrade-completed').show();
}
jQuery('#logger').append(row + '<br />\n');
});
jQuery('#logger').append('<span class="error_msg">' + MailPoet.MP2Migrator.fatal_error + '</span>' + '<br />\n');
}).always(function () {
@@ -206,5 +205,4 @@ define('mp2migrator', ['mailpoet', 'jquery'], function (mp, jQuery) {
// Update the display
MailPoet.MP2Migrator.updateDisplay();
});
});

View File

@@ -36,5 +36,4 @@ define([
window.EditorApplication = app;
return app;
});

View File

@@ -404,7 +404,6 @@ define([
index: index,
position: 'after'
};
},
_computeSpecialIndex: function (eventX, eventY) {
return this._computeCellIndex(eventX, eventY);

View File

@@ -84,7 +84,6 @@ define([
that.view.$el.addClass('mailpoet_hidden');
}
}
},
// call this function on every dragmove event
onmove: function (event) {

View File

@@ -27,7 +27,6 @@ define([
_,
jQuery
) {
'use strict';
var Module = {};

View File

@@ -13,7 +13,6 @@ define([
'mailpoet',
'modal'
], function (App, Marionette, SuperModel, _, jQuery, MailPoet) {
'use strict';
var Module = {};

View File

@@ -8,7 +8,6 @@ define([
'underscore',
'jquery'
], function (App, BaseBlock, MailPoet, _, jQuery) {
'use strict';
var Module = {};

View File

@@ -11,7 +11,6 @@ define([
'newsletter_editor/App',
'newsletter_editor/blocks/base'
], function (Backbone, Marionette, _, jQuery, App, BaseBlock) {
'use strict';
var Module = {};
@@ -151,7 +150,6 @@ define([
if (this.model.get('blocks').length === 2) return Module.TwoColumnContainerWidgetView;
}
return Module.OneColumnContainerWidgetView;
},
initialize: function (options) {
base.BlockView.prototype.initialize.apply(this, arguments);

View File

@@ -7,7 +7,6 @@ define([
'underscore',
'jquery'
], function (App, BaseBlock, _, jQuery) {
'use strict';
var Module = {};

View File

@@ -7,7 +7,6 @@ define([
'underscore',
'mailpoet'
], function (App, BaseBlock, _, MailPoet) {
'use strict';
var Module = {};

View File

@@ -7,7 +7,6 @@ define([
'underscore',
'mailpoet'
], function (App, BaseBlock, _, MailPoet) {
'use strict';
var Module = {};

View File

@@ -8,7 +8,6 @@ define([
'mailpoet',
'jquery'
], function (App, BaseBlock, _, MailPoet, jQuery) {
'use strict';
var Module = {};

View File

@@ -36,7 +36,6 @@ define([
ButtonBlock,
DividerBlock
) {
'use strict';
var Module = {};

View File

@@ -10,7 +10,6 @@ define([
'underscore',
'jquery'
], function (App, BaseBlock, Backbone, Marionette, SuperModel, _, jQuery) {
'use strict';
var Module = {};

View File

@@ -6,7 +6,6 @@ define([
'newsletter_editor/blocks/base',
'underscore'
], function (App, BaseBlock, _) {
'use strict';
var Module = {};

View File

@@ -7,7 +7,6 @@ define([
'underscore',
'mailpoet'
], function (App, BaseBlock, _, MailPoet) {
'use strict';
var Module = {};

View File

@@ -4,7 +4,6 @@ define([
'mailpoet',
'ajax'
], function (App, _, MailPoet) {
var Module = {};
Module._query = function (args) {

View File

@@ -2,7 +2,6 @@ define([
'newsletter_editor/App',
'backbone.supermodel'
], function (App, SuperModel) {
var Module = {};
Module.ConfigModel = SuperModel.extend({

View File

@@ -35,14 +35,12 @@ define([
return Module._blockTypes[type].blockModel;
}
throw 'Block type not supported: ' + type;
};
Module.getBlockTypeView = function (type) {
if (type in Module._blockTypes) {
return Module._blockTypes[type].blockView;
}
throw 'Block type not supported: ' + type;
};
Module.getBody = function () {

View File

@@ -6,7 +6,6 @@ define([
'jquery',
'mailpoet'
], function (App, Backbone, Marionette, _, jQuery, MailPoet) {
'use strict';
var Module = {};

View File

@@ -25,7 +25,6 @@ define([
_,
$
) {
'use strict';
var Module = {};
@@ -33,7 +32,6 @@ define([
// Save editor contents to server
Module.save = function () {
var json = App.toJSON();
// Stringify to enable transmission of primitive non-string value types
@@ -235,7 +233,6 @@ define([
});
this.hideOptionContents();
}
},
toggleExportTemplate: function () {
this.$('.mailpoet_export_template_container').toggleClass('mailpoet_hidden');

View File

@@ -17,7 +17,6 @@ define([
_,
jQuery
) {
'use strict';
var Module = {};

View File

@@ -4,7 +4,6 @@ define([
'backbone.supermodel',
'underscore'
], function (App, Marionette, SuperModel, _) {
'use strict';
var Module = {};

View File

@@ -117,7 +117,6 @@ define('notice', ['mailpoet', 'jquery'], function (mp, jQuery) {
return message.join('<br />');
}
return message;
},
show: function (options) {
// initialize

View File

@@ -18,5 +18,4 @@ define('num',
);
}
};
});

View File

@@ -451,7 +451,6 @@ define(
}
});
});
});
router.on('route:step2', function () {
@@ -741,7 +740,6 @@ define(
return subscribers.subscribersCount.toLocaleString();
}
return index + 1;
});
// reduce subscribers object if the total length is greater than the