Fix eslint eqeqeq in es5 files

[MAILPOET-1145]
This commit is contained in:
Pavel Dohnal
2018-02-19 15:43:58 +00:00
parent f7fcec7953
commit 0ff9c006d8
6 changed files with 13 additions and 14 deletions

View File

@@ -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 '<':