Fix eslint eqeqeq in es5 files
[MAILPOET-1145]
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
"default-case": 0,
|
||||
"no-lonely-if": 0,
|
||||
"no-mixed-operators": 0,
|
||||
"eqeqeq": 0,
|
||||
"brace-style": 0,
|
||||
"space-infix-ops": 0
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
|
||||
// set date format
|
||||
f = block.hash.format || 'MMM Do, YYYY';
|
||||
// check if we passed a timestamp
|
||||
if (parseInt(timestamp, 10) == timestamp) {
|
||||
if (/^\d+$/.test(timestamp)) {
|
||||
return window.moment.unix(timestamp).format(f);
|
||||
}
|
||||
return window.moment.utc(timestamp).format(f);
|
||||
@@ -40,11 +40,11 @@ define('handlebars_helpers', ['handlebars'], function (Handlebars) {
|
||||
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
|
||||
switch (operator) {
|
||||
case '==':
|
||||
return (v1 == v2) ? options.fn(this) : options.inverse(this);
|
||||
return (v1 == v2) ? options.fn(this) : options.inverse(this); // eslint-disable-line eqeqeq
|
||||
case '===':
|
||||
return (v1 === v2) ? options.fn(this) : options.inverse(this);
|
||||
case '!=':
|
||||
return (v1 != v2) ? options.fn(this) : options.inverse(this);
|
||||
return (v1 != v2) ? options.fn(this) : options.inverse(this); // eslint-disable-line eqeqeq
|
||||
case '!==':
|
||||
return (v1 !== v2) ? options.fn(this) : options.inverse(this);
|
||||
case '<':
|
||||
|
@@ -418,7 +418,7 @@ define('modal', ['mailpoet', 'jquery'],
|
||||
return this;
|
||||
},
|
||||
focus: function () {
|
||||
if (this.options.type == 'popup') {
|
||||
if (this.options.type === 'popup') {
|
||||
jQuery('#mailpoet_' + this.options.type).focus();
|
||||
} else {
|
||||
// panel and subpanel
|
||||
|
@@ -299,10 +299,10 @@ define([
|
||||
},
|
||||
changeReadMoreType: function (event) {
|
||||
var value = jQuery(event.target).val();
|
||||
if (value == 'link') {
|
||||
if (value === 'link') {
|
||||
this.$('.mailpoet_automated_latest_content_read_more_text').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_select_button').addClass('mailpoet_hidden');
|
||||
} else if (value == 'button') {
|
||||
} else if (value === 'button') {
|
||||
this.$('.mailpoet_automated_latest_content_read_more_text').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_select_button').removeClass('mailpoet_hidden');
|
||||
}
|
||||
@@ -311,7 +311,7 @@ define([
|
||||
changeDisplayType: function (event) {
|
||||
var value = jQuery(event.target).val();
|
||||
|
||||
if (value == 'titleOnly') {
|
||||
if (value === 'titleOnly') {
|
||||
this.$('.mailpoet_automated_latest_content_title_as_list').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_image_full_width_option').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_automated_latest_content_image_separator').addClass('mailpoet_hidden');
|
||||
@@ -337,7 +337,7 @@ define([
|
||||
},
|
||||
changeTitleFormat: function (event) {
|
||||
var value = jQuery(event.target).val();
|
||||
if (value == 'ul') {
|
||||
if (value === 'ul') {
|
||||
this.$('.mailpoet_automated_latest_content_non_title_list_options').addClass('mailpoet_hidden');
|
||||
|
||||
this.model.set('titleIsLink', true);
|
||||
|
@@ -524,10 +524,10 @@ define([
|
||||
},
|
||||
changeReadMoreType: function (event) {
|
||||
var value = jQuery(event.target).val();
|
||||
if (value == 'link') {
|
||||
if (value === 'link') {
|
||||
this.$('.mailpoet_posts_read_more_text').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_select_button').addClass('mailpoet_hidden');
|
||||
} else if (value == 'button') {
|
||||
} else if (value === 'button') {
|
||||
this.$('.mailpoet_posts_read_more_text').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_select_button').removeClass('mailpoet_hidden');
|
||||
}
|
||||
@@ -535,7 +535,7 @@ define([
|
||||
},
|
||||
changeDisplayType: function (event) {
|
||||
var value = jQuery(event.target).val();
|
||||
if (value == 'titleOnly') {
|
||||
if (value === 'titleOnly') {
|
||||
this.$('.mailpoet_posts_title_as_list').removeClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_image_full_width_option').addClass('mailpoet_hidden');
|
||||
this.$('.mailpoet_posts_image_separator').addClass('mailpoet_hidden');
|
||||
@@ -562,7 +562,7 @@ define([
|
||||
},
|
||||
changeTitleFormat: function (event) {
|
||||
var value = jQuery(event.target).val();
|
||||
if (value == 'ul') {
|
||||
if (value === 'ul') {
|
||||
this.$('.mailpoet_posts_non_title_list_options').addClass('mailpoet_hidden');
|
||||
|
||||
this.model.set('titleIsLink', true);
|
||||
|
@@ -613,7 +613,7 @@ define(
|
||||
template: jQuery('#new_segment_template').html()
|
||||
});
|
||||
jQuery('#new_segment_name').keypress(function (e) {
|
||||
if (e.which == 13) {
|
||||
if (e.which === 13) {
|
||||
jQuery('#new_segment_process').click();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user