diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2018-01-18 00:57:15 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-01-17 16:57:15 +0100 |
commit | 0a103c774977cda29e5c02e697b4632f98bcc621 (patch) | |
tree | d3898a4a9e2affcb037c92e380933f7f8f626092 /app/javascript/mastodon/components | |
parent | fb16c37d2a780c385e0ce00d136f749036778314 (diff) |
Upgrade ESLint to version 4.x (#6276)
Diffstat (limited to 'app/javascript/mastodon/components')
4 files changed, 16 insertions, 14 deletions
diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js index b3d00b335..9f2d46ddd 100644 --- a/app/javascript/mastodon/components/attachment_list.js +++ b/app/javascript/mastodon/components/attachment_list.js @@ -20,11 +20,11 @@ export default class AttachmentList extends ImmutablePureComponent { </div> <ul className='attachment-list__list'> - {media.map(attachment => + {media.map(attachment => ( <li key={attachment.get('id')}> <a href={attachment.get('remote_url')} target='_blank' rel='noopener'>{filename(attachment.get('remote_url'))}</a> </li> - )} + ))} </ul> </div> ); diff --git a/app/javascript/mastodon/components/collapsable.js b/app/javascript/mastodon/components/collapsable.js index 42ea37ec2..d5d431186 100644 --- a/app/javascript/mastodon/components/collapsable.js +++ b/app/javascript/mastodon/components/collapsable.js @@ -5,11 +5,11 @@ import PropTypes from 'prop-types'; const Collapsable = ({ fullHeight, isVisible, children }) => ( <Motion defaultStyle={{ opacity: !isVisible ? 0 : 100, height: isVisible ? fullHeight : 0 }} style={{ opacity: spring(!isVisible ? 0 : 100), height: spring(!isVisible ? 0 : fullHeight) }}> - {({ opacity, height }) => + {({ opacity, height }) => ( <div style={{ height: `${height}px`, overflow: 'hidden', opacity: opacity / 100, display: Math.floor(opacity) === 0 ? 'none' : 'block' }}> {children} </div> - } + )} </Motion> ); diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index 06f53841d..b96e48fd0 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -93,7 +93,7 @@ export default class IconButton extends React.PureComponent { return ( <Motion defaultStyle={{ rotate: active ? -360 : 0 }} style={{ rotate: animate ? spring(active ? -360 : 0, { stiffness: 120, damping: 7 }) : 0 }}> - {({ rotate }) => + {({ rotate }) => ( <button aria-label={title} aria-pressed={pressed} @@ -106,7 +106,7 @@ export default class IconButton extends React.PureComponent { > <i style={{ transform: `rotate(${rotate}deg)` }} className={`fa fa-fw fa-${icon}`} aria-hidden='true' /> </button> - } + )} </Motion> ); } diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 2600d68ad..c030510a0 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -178,14 +178,16 @@ export default class Status extends ImmutablePureComponent { media = ( <Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} > - {Component => <Component - preview={video.get('preview_url')} - src={video.get('url')} - width={239} - height={110} - sensitive={status.get('sensitive')} - onOpenVideo={this.handleOpenVideo} - />} + {Component => ( + <Component + preview={video.get('preview_url')} + src={video.get('url')} + width={239} + height={110} + sensitive={status.get('sensitive')} + onOpenVideo={this.handleOpenVideo} + /> + )} </Bundle> ); } else { |