Fix react/jsx-indent rule in ES6

[MAILPOET-1029]
This commit is contained in:
Pavel Dohnal
2017-09-07 15:59:38 +01:00
parent 169940058b
commit 122af1c943
9 changed files with 58 additions and 59 deletions

View File

@@ -22,7 +22,6 @@
"react/jsx-no-target-blank": 0, "react/jsx-no-target-blank": 0,
"react/no-render-return-value": 0, "react/no-render-return-value": 0,
"react/jsx-boolean-value": 0, "react/jsx-boolean-value": 0,
"react/jsx-indent": 0,
"react/jsx-no-bind": 0, "react/jsx-no-bind": 0,
"react/no-array-index-key": 0, "react/no-array-index-key": 0,
"react/self-closing-comp": 0, "react/self-closing-comp": 0,

View File

@@ -34,15 +34,15 @@ function Tooltip(props) {
data-for={tooltipId} data-for={tooltipId}
> >
</span> </span>
<ReactTooltip <ReactTooltip
globalEventOff="click" globalEventOff="click"
multiline={true} multiline={true}
id={tooltipId} id={tooltipId}
efect="solid" efect="solid"
place={props.place} place={props.place}
> >
{tooltip} {tooltip}
</ReactTooltip> </ReactTooltip>
</span> </span>
); );
} }

View File

@@ -112,7 +112,7 @@ define([
defaultValue={MailPoet.I18n.t('apply')} defaultValue={MailPoet.I18n.t('apply')}
className="button action" /> className="button action" />
{ this.state.extra } { this.state.extra }
</div> </div>
); );
}, },

View File

@@ -56,14 +56,14 @@ define([
key={ `filter-${i}` } key={ `filter-${i}` }
name={ filter } name={ filter }
> >
{ filters[filter].map((option, j) => { { filters[filter].map((option, j) => {
return ( return (
<option <option
value={ option.value } value={ option.value }
key={ 'filter-option-' + j } key={ 'filter-option-' + j }
>{ option.label }</option> >{ option.label }</option>
); );
}) } }) }
</select> </select>
); );
}); });

View File

@@ -15,22 +15,22 @@ define(['react', 'classnames'], (React, classNames) => {
); );
return ( return (
<li key={index}> <li key={index}>
{(index > 0) ? ' |' : ''} {(index > 0) ? ' |' : ''}
<a <a
href="javascript:;" href="javascript:;"
className={classes} className={classes}
onClick={this.handleSelect.bind(this, group.name)} > onClick={this.handleSelect.bind(this, group.name)} >
{group.label} <span className="count">({ group.count.toLocaleString() })</span> {group.label} <span className="count">({ group.count.toLocaleString() })</span>
</a> </a>
</li> </li>
); );
}); });
return ( return (
<ul className="subsubsub"> <ul className="subsubsub">
{ groups } { groups }
</ul> </ul>
); );
}, },
}); });

View File

@@ -24,7 +24,7 @@ define([
<form name="search" onSubmit={this.handleSearch}> <form name="search" onSubmit={this.handleSearch}>
<p className="search-box"> <p className="search-box">
<label htmlFor="search_input" className="screen-reader-text"> <label htmlFor="search_input" className="screen-reader-text">
{MailPoet.I18n.t('searchLabel')} {MailPoet.I18n.t('searchLabel')}
</label> </label>
<input <input
type="search" type="search"

View File

@@ -126,13 +126,13 @@ const _QueueMixin = {
return ( return (
<div> <div>
<div className={ progressClasses }> <div className={ progressClasses }>
<span <span
className="mailpoet_progress_bar" className="mailpoet_progress_bar"
style={ { width: progress_bar_width + '%' } } style={ { width: progress_bar_width + '%' } }
></span> ></span>
<span className="mailpoet_progress_label"> <span className="mailpoet_progress_label">
{ percentage } { percentage }
</span> </span>
</div> </div>
<p style={{ textAlign:'center' }}> <p style={{ textAlign:'center' }}>
{ label } { label }

View File

@@ -300,18 +300,18 @@ define(
<p className="submit"> <p className="submit">
{ {
isPaused ? isPaused ?
<input <input
className="button button-primary" className="button button-primary"
type="button" type="button"
onClick={ this.handleResume } onClick={ this.handleResume }
value={MailPoet.I18n.t('resume')} /> value={MailPoet.I18n.t('resume')} />
: :
<input <input
className="button button-primary" className="button button-primary"
type="button" type="button"
onClick={ this.handleSend } onClick={ this.handleSend }
value={MailPoet.I18n.t('send')} value={MailPoet.I18n.t('send')}
{...this.getSendButtonOptions()} {...this.getSendButtonOptions()}
/> />
} }
&nbsp; &nbsp;

View File

@@ -244,24 +244,24 @@ define(
</div> </div>
<div className="mailpoet_description"> <div className="mailpoet_description">
<h3>{ template.name }</h3> <h3>{ template.name }</h3>
<p>{ template.description }</p> <p>{ template.description }</p>
</div> </div>
<div className="mailpoet_actions"> <div className="mailpoet_actions">
<a <a
className="button button-secondary" className="button button-secondary"
onClick={ this.handleShowTemplate.bind(null, template) } onClick={ this.handleShowTemplate.bind(null, template) }
> >
{MailPoet.I18n.t('preview')} {MailPoet.I18n.t('preview')}
</a> </a>
&nbsp; &nbsp;
<a <a
className="button button-primary" className="button button-primary"
onClick={ this.handleSelectTemplate.bind(null, template) } onClick={ this.handleSelectTemplate.bind(null, template) }
> >
{MailPoet.I18n.t('select')} {MailPoet.I18n.t('select')}
</a> </a>
</div> </div>
{ (template.readonly === '1') ? false : deleteLink } { (template.readonly === '1') ? false : deleteLink }
</li> </li>