Enable react/jsx-first-prop-new-line for multiline, single prop JSX (#8276)

* Enable react/jsx-first-prop-new-line for multiline, single prop JSX
* yarn lint --fix
feature/default_network_editable
Whymarrh Whitby 5 years ago committed by GitHub
parent 8459e8dda1
commit 6b6615be27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .eslintrc.js
  2. 11
      ui/app/components/app/connected-status-indicator/connected-status-indicator.component.js
  3. 7
      ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js
  4. 9
      ui/app/components/ui/eth-balance/eth-balance.component.js
  5. 9
      ui/app/pages/confirm-approve/confirm-approve-content/confirm-approve-content.component.js

@ -74,7 +74,7 @@ module.exports = {
'react/jsx-closing-tag-location': 'error', 'react/jsx-closing-tag-location': 'error',
'react/jsx-no-duplicate-props': 'error', 'react/jsx-no-duplicate-props': 'error',
'react/jsx-closing-bracket-location': 'error', 'react/jsx-closing-bracket-location': 'error',
'react/jsx-first-prop-new-line': 'error', 'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-max-props-per-line': ['error', { 'maximum': 1, 'when': 'multiline' } ], 'react/jsx-max-props-per-line': ['error', { 'maximum': 1, 'when': 'multiline' } ],
'react/jsx-tag-spacing': ['error', { 'react/jsx-tag-spacing': ['error', {
'closingSlash': 'never', 'closingSlash': 'never',

@ -24,11 +24,12 @@ export default class ConnectedStatusIndicator extends Component {
const { status } = this.props const { status } = this.props
return ( return (
<div className={classnames({ <div
'connected-status-indicator__green-circle': status === STATUS_CONNECTED, className={classnames({
'connected-status-indicator__yellow-circle': status === STATUS_CONNECTED_TO_ANOTHER_ACCOUNT, 'connected-status-indicator__green-circle': status === STATUS_CONNECTED,
'connected-status-indicator__grey-circle': status === STATUS_NOT_CONNECTED, 'connected-status-indicator__yellow-circle': status === STATUS_CONNECTED_TO_ANOTHER_ACCOUNT,
})} 'connected-status-indicator__grey-circle': status === STATUS_NOT_CONNECTED,
})}
/> />
) )
} }

@ -132,9 +132,10 @@ export default class PermissionPageContainerContent extends PureComponent {
} }
return ( return (
<div className={classnames('permission-approval-container__content', { <div
'permission-approval-container__content--redirect': redirect, className={classnames('permission-approval-container__content', {
})} 'permission-approval-container__content--redirect': redirect,
})}
> >
<div className="permission-approval-container__title"> <div className="permission-approval-container__title">
{ t(...titleArgs) } { t(...titleArgs) }

@ -121,10 +121,11 @@ export default class EthBalance extends Component {
return ( return (
<div className="ether-balance ether-balance-amount" style={style}> <div className="ether-balance ether-balance-amount" style={style}>
<div style={{ <div
display: 'inline', style={{
width, display: 'inline',
}} width,
}}
> >
{this.renderBalance(formattedValue)} {this.renderBalance(formattedValue)}
</div> </div>

@ -196,10 +196,11 @@ export default class ConfirmApproveContent extends Component {
<div className="confirm-approve-content__small-blue-text"> <div className="confirm-approve-content__small-blue-text">
View full transaction details View full transaction details
</div> </div>
<i className={classnames({ <i
'fa fa-caret-up': showFullTxDetails, className={classnames({
'fa fa-caret-down': !showFullTxDetails, 'fa fa-caret-up': showFullTxDetails,
})} 'fa fa-caret-down': !showFullTxDetails,
})}
/> />
</div> </div>
</div> </div>

Loading…
Cancel
Save