Bug 1215455 - eslint react/jsx-curly-spacing [r=Standard8]
authorEd Lee <edilee@mozilla.com>
Sat, 17 Oct 2015 00:10:34 -0700
changeset 302800 9b5bd211ecde43cc4131c9aeeddd457d72ab878a
parent 302799 2eb2b6388613a26f581f7339ea1d8c4082abf3f2
child 302801 ef65374a93d6353004c78091cb65a2f41fec7aeb
push id6684
push userkcambridge@mozilla.com
push dateThu, 22 Oct 2015 21:11:10 +0000
reviewersStandard8
bugs1215455
milestone44.0a1
Bug 1215455 - eslint react/jsx-curly-spacing [r=Standard8]
browser/components/loop/.eslintrc
browser/components/loop/content/shared/js/views.js
browser/components/loop/content/shared/js/views.jsx
browser/components/loop/standalone/content/js/standaloneRoomViews.js
browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
--- a/browser/components/loop/.eslintrc
+++ b/browser/components/loop/.eslintrc
@@ -124,18 +124,17 @@
     "react/jsx-uses-vars": 2,
     "react/jsx-no-duplicate-props": 2,
     "react/no-did-mount-set-state": 2,
     "react/no-did-update-set-state": 2,
     "react/no-unknown-property": 2,
     "react/prop-types": 2,
     "react/self-closing-comp": 2,
     "react/wrap-multilines": 2,
-    // We would probably want to go with a variant of never.
-    "react/jsx-curly-spacing": 0,
+    "react/jsx-curly-spacing": [2, "never"],
     // Not worth it: React is defined globally
     "react/jsx-uses-react": 0,
     "react/react-in-jsx-scope": 0,
     // These ones we don't want to ever enable
     "react/display-name": 0,
     "react/jsx-boolean-value": 0,
     "react/no-danger": 0,
     "react/no-multi-comp": 0
--- a/browser/components/loop/content/shared/js/views.js
+++ b/browser/components/loop/content/shared/js/views.js
@@ -1116,33 +1116,33 @@ loop.shared.views = (function(_, mozL10n
               mozL10n.get("self_view_hidden_message")
             ), 
             React.createElement("div", {className: remoteStreamClasses}, 
               React.createElement(MediaView, {displayAvatar: !this.props.renderRemoteVideo, 
                 isLoading: this.props.isRemoteLoading, 
                 mediaType: "remote", 
                 posterUrl: this.props.remotePosterUrl, 
                 srcMediaElement: this.props.remoteSrcMediaElement}), 
-               this.state.localMediaAboslutelyPositioned ?
+              this.state.localMediaAboslutelyPositioned ?
                 this.renderLocalVideo() : null, 
-               this.props.displayScreenShare ? null : this.props.children
+              this.props.displayScreenShare ? null : this.props.children
             ), 
             React.createElement("div", {className: screenShareStreamClasses}, 
               React.createElement(MediaView, {displayAvatar: false, 
                 isLoading: this.props.isScreenShareLoading, 
                 mediaType: "screen-share", 
                 posterUrl: this.props.screenSharePosterUrl, 
                 srcMediaElement: this.props.screenShareMediaElement}), 
-               this.props.displayScreenShare ? this.props.children : null
+              this.props.displayScreenShare ? this.props.children : null
             ), 
             React.createElement(loop.shared.views.chat.TextChatView, {
               dispatcher: this.props.dispatcher, 
               showRoomName: this.props.showContextRoomName, 
               useDesktopPaths: this.props.useDesktopPaths}), 
-             this.state.localMediaAboslutelyPositioned ?
+            this.state.localMediaAboslutelyPositioned ?
               null : this.renderLocalVideo()
           )
         )
       );
     }
   });
 
   return {
--- a/browser/components/loop/content/shared/js/views.jsx
+++ b/browser/components/loop/content/shared/js/views.jsx
@@ -1116,34 +1116,34 @@ loop.shared.views = (function(_, mozL10n
               {mozL10n.get("self_view_hidden_message")}
             </span>
             <div className={remoteStreamClasses}>
               <MediaView displayAvatar={!this.props.renderRemoteVideo}
                 isLoading={this.props.isRemoteLoading}
                 mediaType="remote"
                 posterUrl={this.props.remotePosterUrl}
                 srcMediaElement={this.props.remoteSrcMediaElement} />
-              { this.state.localMediaAboslutelyPositioned ?
-                this.renderLocalVideo() : null }
-              { this.props.displayScreenShare ? null : this.props.children }
+              {this.state.localMediaAboslutelyPositioned ?
+                this.renderLocalVideo() : null}
+              {this.props.displayScreenShare ? null : this.props.children}
             </div>
             <div className={screenShareStreamClasses}>
               <MediaView displayAvatar={false}
                 isLoading={this.props.isScreenShareLoading}
                 mediaType="screen-share"
                 posterUrl={this.props.screenSharePosterUrl}
                 srcMediaElement={this.props.screenShareMediaElement} />
-              { this.props.displayScreenShare ? this.props.children : null }
+              {this.props.displayScreenShare ? this.props.children : null}
             </div>
             <loop.shared.views.chat.TextChatView
               dispatcher={this.props.dispatcher}
               showRoomName={this.props.showContextRoomName}
               useDesktopPaths={this.props.useDesktopPaths} />
-            { this.state.localMediaAboslutelyPositioned ?
-              null : this.renderLocalVideo() }
+            {this.state.localMediaAboslutelyPositioned ?
+              null : this.renderLocalVideo()}
           </div>
         </div>
       );
     }
   });
 
   return {
     AvatarView: AvatarView,
--- a/browser/components/loop/standalone/content/js/standaloneRoomViews.js
+++ b/browser/components/loop/standalone/content/js/standaloneRoomViews.js
@@ -92,30 +92,30 @@ loop.standaloneRoomViews = (function(moz
           onClick: this.handleJoinButton}, 
           buttonMessage
         )
       );
     },
 
     _renderFailureText: function() {
       return (
-        React.createElement("p", {className: "failure"},  mozL10n.get("rooms_already_joined") )
+        React.createElement("p", {className: "failure"}, mozL10n.get("rooms_already_joined"))
       );
     },
 
     render: function() {
       // The extra scroller div here is for providing a scroll view for shorter
       // screens, as the common.css specifies overflow:hidden for the body which
       // we need in some places.
       return (
         React.createElement("div", {className: "handle-user-agent-view-scroller"}, 
           React.createElement("div", {className: "handle-user-agent-view"}, 
             React.createElement("div", {className: "info-panel"}, 
-              React.createElement("p", {className: "loop-logo-text", title:  mozL10n.get("clientShortname2") }), 
-              React.createElement("p", {className: "roomName"},  this.state.roomName), 
+              React.createElement("p", {className: "loop-logo-text", title: mozL10n.get("clientShortname2")}), 
+              React.createElement("p", {className: "roomName"}, this.state.roomName), 
               React.createElement("p", {className: "loop-logo"}), 
               
                 this.state.failureReason ?
                   this._renderFailureText() :
                   this._renderJoinButton()
               
             ), 
             React.createElement(ToSView, {dispatcher: this.props.dispatcher}), 
--- a/browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
+++ b/browser/components/loop/standalone/content/js/standaloneRoomViews.jsx
@@ -92,30 +92,30 @@ loop.standaloneRoomViews = (function(moz
           onClick={this.handleJoinButton}>
           {buttonMessage}
         </button>
       );
     },
 
     _renderFailureText: function() {
       return (
-        <p className="failure">{ mozL10n.get("rooms_already_joined") }</p>
+        <p className="failure">{mozL10n.get("rooms_already_joined")}</p>
       );
     },
 
     render: function() {
       // The extra scroller div here is for providing a scroll view for shorter
       // screens, as the common.css specifies overflow:hidden for the body which
       // we need in some places.
       return (
         <div className="handle-user-agent-view-scroller">
           <div className="handle-user-agent-view">
             <div className="info-panel">
-              <p className="loop-logo-text" title={ mozL10n.get("clientShortname2") }></p>
-              <p className="roomName">{ this.state.roomName }</p>
+              <p className="loop-logo-text" title={mozL10n.get("clientShortname2")}></p>
+              <p className="roomName">{this.state.roomName}</p>
               <p className="loop-logo" />
               {
                 this.state.failureReason ?
                   this._renderFailureText() :
                   this._renderJoinButton()
               }
             </div>
             <ToSView dispatcher={this.props.dispatcher} />