Fix eslint rules
[MAILPOET-1348]
This commit is contained in:
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import AutomaticEmailsBreadcrumb from 'newsletters/types/automatic_emails/breadcrumb.jsx';
|
||||
import MailPoet from 'mailpoet';
|
||||
import _ from 'underscore';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class AutomaticEmailEventsList extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -21,7 +22,8 @@ class AutomaticEmailEventsList extends React.Component {
|
||||
|
||||
if (this.email.premium) {
|
||||
action = (
|
||||
<a href="?page=mailpoet-premium"
|
||||
<a
|
||||
href="?page=mailpoet-premium"
|
||||
target="_blank"
|
||||
>
|
||||
{MailPoet.I18n.t('premiumFeatureLink')}
|
||||
@@ -31,7 +33,8 @@ class AutomaticEmailEventsList extends React.Component {
|
||||
const disabled = event.soon;
|
||||
|
||||
action = (
|
||||
<a className="button button-primary"
|
||||
<a
|
||||
className="button button-primary"
|
||||
disabled={disabled}
|
||||
onClick={!disabled ? this.eventsConfigurator.bind(null, event.slug) : null}
|
||||
>
|
||||
@@ -91,4 +94,18 @@ class AutomaticEmailEventsList extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
AutomaticEmailEventsList.propTypes = {
|
||||
|
||||
route: PropTypes.shape({
|
||||
data: PropTypes.shape({
|
||||
email: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
}).isRequired,
|
||||
|
||||
router: PropTypes.shape({
|
||||
push: PropTypes.func.isRequired,
|
||||
}).isRequired,
|
||||
|
||||
};
|
||||
|
||||
module.exports = AutomaticEmailEventsList;
|
||||
|
@@ -1,20 +1,9 @@
|
||||
define(
|
||||
[
|
||||
'underscore',
|
||||
'react',
|
||||
'react-router',
|
||||
'mailpoet',
|
||||
'newsletters/types/notification/scheduling.jsx',
|
||||
'newsletters/breadcrumb.jsx',
|
||||
],
|
||||
(
|
||||
_,
|
||||
React,
|
||||
Router,
|
||||
MailPoet,
|
||||
Scheduling,
|
||||
Breadcrumb
|
||||
) => {
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||
import _ from 'underscore';
|
||||
import Scheduling from 'newsletters/types/notification/scheduling.jsx';
|
||||
|
||||
const field = {
|
||||
name: 'options',
|
||||
type: 'reactComponent',
|
||||
@@ -91,6 +80,5 @@ define(
|
||||
},
|
||||
});
|
||||
|
||||
return NewsletterNotification;
|
||||
}
|
||||
);
|
||||
module.exports = NewsletterNotification;
|
||||
|
||||
|
@@ -1,16 +1,7 @@
|
||||
define(
|
||||
[
|
||||
'react',
|
||||
'react-router',
|
||||
'mailpoet',
|
||||
'newsletters/breadcrumb.jsx',
|
||||
],
|
||||
(
|
||||
React,
|
||||
Router,
|
||||
MailPoet,
|
||||
Breadcrumb
|
||||
) => {
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
import Breadcrumb from 'newsletters/breadcrumb.jsx';
|
||||
|
||||
const NewsletterStandard = React.createClass({
|
||||
contextTypes: {
|
||||
router: React.PropTypes.object.isRequired,
|
||||
@@ -48,6 +39,5 @@ define(
|
||||
},
|
||||
});
|
||||
|
||||
return NewsletterStandard;
|
||||
}
|
||||
);
|
||||
module.exports = NewsletterStandard;
|
||||
|
||||
|
Reference in New Issue
Block a user