ES6: quotes

This commit is contained in:
Amine Ben hammou
2017-08-23 17:03:18 +00:00
committed by pavel-mailpoet
parent b8aceff61f
commit 6ce925fbe8
9 changed files with 23 additions and 24 deletions

View File

@@ -59,7 +59,6 @@
"import/no-extraneous-dependencies": 0,
"camelcase": 0,
"template-curly-spacing": 0,
"quotes": 0,
"eqeqeq": 0,
"no-lonely-if": 0,
"space-unary-ops": 0,

View File

@@ -6,16 +6,16 @@ function Tooltip(props) {
let tooltipId = props.tooltipId;
let tooltip = props.tooltip;
// tooltip ID must be unique, defaults to tooltip text
if(!props.tooltipId && typeof props.tooltip === "string") {
if(!props.tooltipId && typeof props.tooltip === 'string') {
tooltipId = props.tooltip;
}
if(typeof props.tooltip === "string") {
if(typeof props.tooltip === 'string') {
tooltip = (<span
style={{
pointerEvents: "all",
maxWidth: "400",
display: "inline-block",
pointerEvents: 'all',
maxWidth: '400',
display: 'inline-block',
}}
>
{ReactHtmlParser(props.tooltip)}
@@ -26,7 +26,7 @@ function Tooltip(props) {
<span className={props.className}>
<span
style={{
cursor: "pointer",
cursor: 'pointer',
}}
className="tooltip dashicons dashicons-editor-help"
data-event="click"

View File

@@ -17,10 +17,10 @@ function printData(data) {
return (<textarea
readOnly={true}
onFocus={handleFocus}
value={printableData.join("\n")}
value={printableData.join('\n')}
style={{
width: "100%",
height: "400px",
width: '100%',
height: '400px',
}}
/>);
} else {
@@ -35,7 +35,7 @@ function KnowledgeBase() {
<Tabs tab="systemInfo" />
<div className="mailpoet_notice notice inline notice-success" style={{ marginTop: "1em" }}>
<div className="mailpoet_notice notice inline notice-success" style={{ marginTop: '1em' }}>
<p>{MailPoet.I18n.t('systemInfoIntro')}</p>
</div>

View File

@@ -41,6 +41,6 @@ function Tabs(props) {
};
Tabs.propTypes = { tab: React.PropTypes.string };
Tabs.defaultProps = { tab: "knowledgeBase" };
Tabs.defaultProps = { tab: 'knowledgeBase' };
module.exports = Tabs;

View File

@@ -84,8 +84,8 @@ const _QueueMixin = {
<span>
{
MailPoet.I18n.t('newsletterQueueCompleted')
.replace("%$1d", newsletter.queue.count_processed)
.replace("%$2d", newsletter.queue.count_total)
.replace('%$1d', newsletter.queue.count_processed)
.replace('%$2d', newsletter.queue.count_total)
}
</span>
);
@@ -120,7 +120,7 @@ const _QueueMixin = {
percentage = MailPoet.I18n.t('noSubscribers');
} else {
progress_bar_width = percentage;
percentage += "%";
percentage += '%';
}
return (
@@ -128,7 +128,7 @@ const _QueueMixin = {
<div className={ progressClasses }>
<span
className="mailpoet_progress_bar"
style={ { width: progress_bar_width + "%" } }
style={ { width: progress_bar_width + '%' } }
></span>
<span className="mailpoet_progress_label">
{ percentage }
@@ -239,7 +239,7 @@ const _StatisticsMixin = {
<div>
<span className="mailpoet_stats_text">
{ percentage_opened_display }%,
{ " " }
{ ' ' }
{ percentage_clicked_display }%
<span className="mailpoet_stat_hidden">
, { percentage_unsubscribed_display }%
@@ -327,7 +327,7 @@ const _MailerMixin = {
MailPoet.I18n.t('mailerCheckSettingsNotice'),
/\[link\](.*?)\[\/link\]/g,
match => (
<a href={`?page=mailpoet-settings#mta`}>{ match }</a>
<a href={'?page=mailpoet-settings#mta'}>{ match }</a>
)
);
if (state.meta.mta_log.error.operation === 'send') {

View File

@@ -60,7 +60,7 @@ const _monthDayValues = _.object(
if (labels[day] !== undefined) {
label = labels[day];
} else {
label = MailPoet.I18n.t('nth').replace("%$1d", day + 1);
label = MailPoet.I18n.t('nth').replace('%$1d', day + 1);
}
return [day + 1, label];
}

View File

@@ -195,7 +195,7 @@ define(
});
const DateTime = React.createClass({
_DATE_TIME_SEPARATOR: " ",
_DATE_TIME_SEPARATOR: ' ',
getInitialState: function () {
return this._buildStateFromProps(this.props);
},

View File

@@ -122,7 +122,7 @@ define(
MailPoet.I18n.t('mailpoetGuideTemplateTitle'),
description:
MailPoet.I18n.t('mailpoetGuideTemplateDescription'),
readonly: "1",
readonly: '1',
},
];
}
@@ -179,7 +179,7 @@ define(
window.confirm(
(
MailPoet.I18n.t('confirmTemplateDeletion')
).replace("%$1s", template.name)
).replace('%$1s', template.name)
)
) {
MailPoet.Ajax.post({
@@ -263,7 +263,7 @@ define(
{MailPoet.I18n.t('select')}
</a>
</div>
{ (template.readonly === "1") ? false : deleteLink }
{ (template.readonly === '1') ? false : deleteLink }
</li>
);
});

View File

@@ -88,7 +88,7 @@ const messages = {
<div>
<p>{MailPoet.I18n.t('bouncedSubscribersHelp')}</p>
<p>
<a href={ `admin.php?page=mailpoet-premium` } className="button-primary">
<a href={ 'admin.php?page=mailpoet-premium' } className="button-primary">
{MailPoet.I18n.t('bouncedSubscribersPremiumButtonText')}
</a>
</p>