about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-06-02 00:25:10 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-01 17:25:10 +0200
commitfda5c699c2d1165381da87ffe12ebc92e6529f47 (patch)
tree7dc323f20bca826572707547068ca64960ed5a43 /app/javascript
parentcb7ee4698f2a62e15da0db2a5def866615aab57e (diff)
Add ESLint rule (object-curly-spacing) (#3498)
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/mastodon/components/avatar_overlay.js2
-rw-r--r--app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js10
-rw-r--r--app/javascript/mastodon/features/getting_started/index.js4
-rw-r--r--app/javascript/mastodon/features/ui/components/image_loader.js6
-rw-r--r--app/javascript/mastodon/features/ui/components/media_modal.js4
-rw-r--r--app/javascript/mastodon/features/ui/components/onboarding_modal.js2
-rw-r--r--app/javascript/mastodon/features/ui/containers/status_list_container.js2
7 files changed, 15 insertions, 15 deletions
diff --git a/app/javascript/mastodon/components/avatar_overlay.js b/app/javascript/mastodon/components/avatar_overlay.js
index a9643499d..e41d66ab1 100644
--- a/app/javascript/mastodon/components/avatar_overlay.js
+++ b/app/javascript/mastodon/components/avatar_overlay.js
@@ -9,7 +9,7 @@ class AvatarOverlay extends React.PureComponent {
   };
 
   render() {
-    const {staticSrc, overlaySrc} = this.props;
+    const { staticSrc, overlaySrc } = this.props;
 
     const baseStyle = {
       backgroundImage: `url(${staticSrc})`,
diff --git a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
index fc921dfb8..ffe5a1bcd 100644
--- a/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
+++ b/app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
@@ -46,21 +46,21 @@ class EmojiPickerDropdown extends React.PureComponent {
   }
 
   onShowDropdown = () => {
-    this.setState({active: true});
+    this.setState({ active: true });
     if (!EmojiPicker) {
-      this.setState({loading: true});
+      this.setState({ loading: true });
       import(/* webpackChunkName: "emojione_picker" */ 'emojione-picker').then(TheEmojiPicker => {
         EmojiPicker = TheEmojiPicker.default;
-        this.setState({loading: false});
+        this.setState({ loading: false });
       }).catch(err => {
         // TODO: show the user an error?
-        this.setState({loading: false});
+        this.setState({ loading: false });
       });
     }
   }
 
   onHideDropdown = () => {
-    this.setState({active: false});
+    this.setState({ active: false });
   }
 
   render () {
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js
index d1123878e..f9619550c 100644
--- a/app/javascript/mastodon/features/getting_started/index.js
+++ b/app/javascript/mastodon/features/getting_started/index.js
@@ -12,8 +12,8 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
 const messages = defineMessages({
   heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' },
   public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },
-  navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation'},
-  settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings'},
+  navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation' },
+  settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' },
   community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },
   preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
   follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
diff --git a/app/javascript/mastodon/features/ui/components/image_loader.js b/app/javascript/mastodon/features/ui/components/image_loader.js
index af2870517..2a2cbb9bf 100644
--- a/app/javascript/mastodon/features/ui/components/image_loader.js
+++ b/app/javascript/mastodon/features/ui/components/image_loader.js
@@ -22,11 +22,11 @@ class ImageLoader extends React.PureComponent {
 
   loadImage(src) {
     const image = new Image();
-    image.onerror = () => this.setState({loading: false, error: true});
-    image.onload = () => this.setState({loading: false, error: false});
+    image.onerror = () => this.setState({ loading: false, error: true });
+    image.onload = () => this.setState({ loading: false, error: false });
     image.src = src;
     this.lastSrc = src;
-    this.setState({loading: true});
+    this.setState({ loading: true });
   }
 
   render() {
diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js
index effa0aea3..4f27a0f72 100644
--- a/app/javascript/mastodon/features/ui/components/media_modal.js
+++ b/app/javascript/mastodon/features/ui/components/media_modal.js
@@ -26,11 +26,11 @@ class MediaModal extends ImmutablePureComponent {
   };
 
   handleNextClick = () => {
-    this.setState({ index: (this.getIndex() + 1) % this.props.media.size});
+    this.setState({ index: (this.getIndex() + 1) % this.props.media.size });
   }
 
   handlePrevClick = () => {
-    this.setState({ index: (this.getIndex() - 1) % this.props.media.size});
+    this.setState({ index: (this.getIndex() - 1) % this.props.media.size });
   }
 
   handleKeyUp = (e) => {
diff --git a/app/javascript/mastodon/features/ui/components/onboarding_modal.js b/app/javascript/mastodon/features/ui/components/onboarding_modal.js
index cc3c0cdc5..a06338b25 100644
--- a/app/javascript/mastodon/features/ui/components/onboarding_modal.js
+++ b/app/javascript/mastodon/features/ui/components/onboarding_modal.js
@@ -139,7 +139,7 @@ const PageSix = ({ admin, domain }) => {
       <p>
         <FormattedMessage id='onboarding.page_six.admin' defaultMessage="Your instance's admin is {admin}." values={{ admin: <Permalink href={admin.get('url')} to={`/accounts/${admin.get('id')}`}>@{admin.get('acct')}</Permalink> }} />
         <br />
-        <FormattedMessage id='onboarding.page_six.read_guidelines' defaultMessage="Please read {domain}'s {guidelines}!" values={{domain, guidelines: <a href='/about/more' target='_blank'><FormattedMessage id='onboarding.page_six.guidelines' defaultMessage='community guidelines' /></a> }}/>
+        <FormattedMessage id='onboarding.page_six.read_guidelines' defaultMessage="Please read {domain}'s {guidelines}!" values={{ domain, guidelines: <a href='/about/more' target='_blank'><FormattedMessage id='onboarding.page_six.guidelines' defaultMessage='community guidelines' /></a> }}/>
       </p>
     );
   }
diff --git a/app/javascript/mastodon/features/ui/containers/status_list_container.js b/app/javascript/mastodon/features/ui/containers/status_list_container.js
index 14222fedd..cbdd2d12d 100644
--- a/app/javascript/mastodon/features/ui/containers/status_list_container.js
+++ b/app/javascript/mastodon/features/ui/containers/status_list_container.js
@@ -56,7 +56,7 @@ const mapDispatchToProps = (dispatch, { type, id }) => ({
   onScrollToBottom: debounce(() => {
     dispatch(scrollTopTimeline(type, false));
     dispatch(expandTimeline(type, id));
-  }, 300, {leading: true}),
+  }, 300, { leading: true }),
 
   onScrollToTop: debounce(() => {
     dispatch(scrollTopTimeline(type, true));