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. 3
      ui/app/components/app/connected-status-indicator/connected-status-indicator.component.js
  3. 3
      ui/app/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js
  4. 3
      ui/app/components/ui/eth-balance/eth-balance.component.js
  5. 3
      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,7 +24,8 @@ export default class ConnectedStatusIndicator extends Component {
const { status } = this.props const { status } = this.props
return ( return (
<div className={classnames({ <div
className={classnames({
'connected-status-indicator__green-circle': status === STATUS_CONNECTED, 'connected-status-indicator__green-circle': status === STATUS_CONNECTED,
'connected-status-indicator__yellow-circle': status === STATUS_CONNECTED_TO_ANOTHER_ACCOUNT, 'connected-status-indicator__yellow-circle': status === STATUS_CONNECTED_TO_ANOTHER_ACCOUNT,
'connected-status-indicator__grey-circle': status === STATUS_NOT_CONNECTED, 'connected-status-indicator__grey-circle': status === STATUS_NOT_CONNECTED,

@ -132,7 +132,8 @@ export default class PermissionPageContainerContent extends PureComponent {
} }
return ( return (
<div className={classnames('permission-approval-container__content', { <div
className={classnames('permission-approval-container__content', {
'permission-approval-container__content--redirect': redirect, 'permission-approval-container__content--redirect': redirect,
})} })}
> >

@ -121,7 +121,8 @@ 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
style={{
display: 'inline', display: 'inline',
width, width,
}} }}

@ -196,7 +196,8 @@ 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
className={classnames({
'fa fa-caret-up': showFullTxDetails, 'fa fa-caret-up': showFullTxDetails,
'fa fa-caret-down': !showFullTxDetails, 'fa fa-caret-down': !showFullTxDetails,
})} })}

Loading…
Cancel
Save