Fix eslint rules
[MAILPOET-1348]
This commit is contained in:
@@ -1,19 +1,8 @@
|
|||||||
define(
|
import React from 'react';
|
||||||
[
|
import jQuery from 'jquery';
|
||||||
'react',
|
import _ from 'underscore';
|
||||||
'jquery',
|
import MailPoet from 'mailpoet';
|
||||||
'underscore',
|
import Hooks from 'wp-js-hooks';
|
||||||
'mailpoet',
|
|
||||||
'wp-js-hooks',
|
|
||||||
],
|
|
||||||
(
|
|
||||||
React,
|
|
||||||
jq,
|
|
||||||
_,
|
|
||||||
MailPoet,
|
|
||||||
Hooks
|
|
||||||
) => {
|
|
||||||
const jQuery = jq;
|
|
||||||
|
|
||||||
const currentTime = window.mailpoet_current_time || '00:00';
|
const currentTime = window.mailpoet_current_time || '00:00';
|
||||||
const defaultDateTime = `${window.mailpoet_current_date} 00:00:00`;
|
const defaultDateTime = `${window.mailpoet_current_date} 00:00:00`;
|
||||||
@@ -156,7 +145,7 @@ define(
|
|||||||
size="10"
|
size="10"
|
||||||
name={this.getFieldName()}
|
name={this.getFieldName()}
|
||||||
value={this.getDisplayDate(this.props.value)}
|
value={this.getDisplayDate(this.props.value)}
|
||||||
readOnly={true}
|
readOnly
|
||||||
disabled={this.props.disabled}
|
disabled={this.props.disabled}
|
||||||
onChange={this.onChange}
|
onChange={this.onChange}
|
||||||
ref={(c) => { this.dateInput = c; }}
|
ref={(c) => { this.dateInput = c; }}
|
||||||
@@ -169,9 +158,9 @@ define(
|
|||||||
const TimeSelect = React.createClass({
|
const TimeSelect = React.createClass({
|
||||||
render: function render() {
|
render: function render() {
|
||||||
const options = Object.keys(timeOfDayItems).map(
|
const options = Object.keys(timeOfDayItems).map(
|
||||||
(value, index) => (
|
value => (
|
||||||
<option
|
<option
|
||||||
key={`option-${index}`}
|
key={`option-${timeOfDayItems[value]}`}
|
||||||
value={value}
|
value={value}
|
||||||
>
|
>
|
||||||
{ timeOfDayItems[value] }
|
{ timeOfDayItems[value] }
|
||||||
@@ -418,7 +407,7 @@ define(
|
|||||||
|
|
||||||
fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
|
fields = Hooks.applyFilters('mailpoet_newsletters_3rd_step_fields', fields);
|
||||||
|
|
||||||
return {
|
module.exports = {
|
||||||
getFields: function getFields() {
|
getFields: function getFields() {
|
||||||
return fields;
|
return fields;
|
||||||
},
|
},
|
||||||
@@ -443,5 +432,3 @@ define(
|
|||||||
return options;
|
return options;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
|
||||||
);
|
|
||||||
|
Reference in New Issue
Block a user