diff --git a/.eslintrc.es5.json b/.eslintrc.es5.json index 7097a4a90e..fb265580dd 100644 --- a/.eslintrc.es5.json +++ b/.eslintrc.es5.json @@ -42,7 +42,6 @@ "no-extra-bind": 0, "brace-style": 0, "space-infix-ops": 0, - "dot-notation": 0, "prefer-template": 0, "func-names": 0 } diff --git a/assets/js/src/date.js b/assets/js/src/date.js index 70249bda6b..0d5f03d393 100644 --- a/assets/js/src/date.js +++ b/assets/js/src/date.js @@ -146,7 +146,7 @@ define('date', if (!format || format.length <= 0) return format; - replacements = formatMappings['date']; + replacements = formatMappings.date; convertedFormat = []; escapeToken = false; diff --git a/assets/js/src/form_editor/form_editor.js b/assets/js/src/form_editor/form_editor.js index 65ab434bb3..07d4a317e8 100644 --- a/assets/js/src/form_editor/form_editor.js +++ b/assets/js/src/form_editor/form_editor.js @@ -365,17 +365,17 @@ WysijaForm = { }; // body WysijaForm.getBlocks().each(function (b) { - var blockData = (typeof (b.block['save']) === 'function') ? b.block.save() : null; + var blockData = (typeof (b.block.save) === 'function') ? b.block.save() : null; if (blockData !== null) { // set block position - blockData['position'] = position; + blockData.position = position; // increment position position++; // add block data to body - data['body'].push(blockData); + data.body.push(blockData); } }); @@ -480,7 +480,7 @@ WysijaForm = { WysijaForm.getBlocks().each(function (container) { container.setPosition(index++); // remove z-index value to avoid issues when resizing images - if (container['block'] !== undefined) { + if (container.block !== undefined) { container.block.element.setStyle({ zIndex: '' }); @@ -774,7 +774,7 @@ WysijaForm.Block = window.Class.create({ this.block.makeBlockDroppable(); // setup events - if (this.block['setup'] !== undefined) { + if (this.block.setup !== undefined) { this.block.setup(); } return this; @@ -783,13 +783,13 @@ WysijaForm.Block = window.Class.create({ this.element.writeAttribute('wysija_position', position); }, hideControls: function () { - if (this['getControls']) { + if (this.getControls) { this.element.removeClassName('hover'); this.getControls().hide(); } }, showControls: function () { - if (this['getControls']) { + if (this.getControls) { this.element.addClassName('hover'); try { this.getControls().show(); diff --git a/assets/js/src/modal.js b/assets/js/src/modal.js index b676ed834d..87614e8bc9 100644 --- a/assets/js/src/modal.js +++ b/assets/js/src/modal.js @@ -254,7 +254,7 @@ define('modal', ['mailpoet', 'jquery'], // add sub panel wrapper jQuery('#mailpoet_' + this.options.type) - .append(this.templates['subpanel']); + .append(this.templates.subpanel); // add sub panel content jQuery('.mailpoet_' + this.options.type + '_body').last() diff --git a/assets/js/src/public.js b/assets/js/src/public.js index a10939375a..fc9a2aab66 100644 --- a/assets/js/src/public.js +++ b/assets/js/src/public.js @@ -72,7 +72,7 @@ function ( if ( window.frameElement !== null && MailPoet !== undefined - && MailPoet['Iframe'] + && MailPoet.Iframe ) { MailPoet.Iframe.autoSize(window.frameElement); }