瀏覽代碼

removes need for `eslint-disable-next-line react/jsx-wrap-multilines` and `eslint-diable-line no extra-parens`

master
Ritwik Heda 7 年之前
父節點
當前提交
1d99abc4a4

+ 2
- 2
package-lock.json 查看文件

6449
       }
6449
       }
6450
     },
6450
     },
6451
     "eslint-config-jitsi": {
6451
     "eslint-config-jitsi": {
6452
-      "version": "github:jitsi/eslint-config-jitsi#3d193df6476a73f827582e137a67a8612130a455",
6453
-      "from": "github:jitsi/eslint-config-jitsi#v0.1.0",
6452
+      "version": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
6453
+      "from": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
6454
       "dev": true
6454
       "dev": true
6455
     },
6455
     },
6456
     "eslint-import-resolver-node": {
6456
     "eslint-import-resolver-node": {

+ 1
- 1
package.json 查看文件

88
     "clean-css": "3.4.25",
88
     "clean-css": "3.4.25",
89
     "css-loader": "0.28.7",
89
     "css-loader": "0.28.7",
90
     "eslint": "4.12.1",
90
     "eslint": "4.12.1",
91
-    "eslint-config-jitsi": "github:jitsi/eslint-config-jitsi#v0.1.0",
91
+    "eslint-config-jitsi": "github:jitsi/eslint-config-jitsi#7474f6668515eb5852f1273dc5a50b940a550d3f",
92
     "eslint-plugin-flowtype": "2.39.1",
92
     "eslint-plugin-flowtype": "2.39.1",
93
     "eslint-plugin-import": "2.8.0",
93
     "eslint-plugin-import": "2.8.0",
94
     "eslint-plugin-jsdoc": "3.2.0",
94
     "eslint-plugin-jsdoc": "3.2.0",

+ 1
- 1
react/features/base/dialog/components/Dialog.native.js 查看文件

113
             [_TAG_KEY]: _SUBMIT_TEXT_TAG_VALUE
113
             [_TAG_KEY]: _SUBMIT_TEXT_TAG_VALUE
114
         };
114
         };
115
 
115
 
116
-        let el: ?React$Element<*> = ( // eslint-disable-line no-extra-parens
116
+        let el: ?React$Element<*> = (
117
             <Prompt
117
             <Prompt
118
                 cancelButtonTextStyle = { cancelButtonTextStyle }
118
                 cancelButtonTextStyle = { cancelButtonTextStyle }
119
                 cancelText = { t(cancelTitleKey) }
119
                 cancelText = { t(cancelTitleKey) }

+ 1
- 1
react/features/base/media/components/native/Video.js 查看文件

93
                     ? 'contain'
93
                     ? 'contain'
94
                     : (style && style.objectFit) || 'cover';
94
                     : (style && style.objectFit) || 'cover';
95
             const rtcView
95
             const rtcView
96
-                = ( // eslint-disable-line no-extra-parens
96
+                = (
97
                     <RTCView
97
                     <RTCView
98
                         mirror = { this.props.mirror }
98
                         mirror = { this.props.mirror }
99
                         objectFit = { objectFit }
99
                         objectFit = { objectFit }

+ 1
- 1
react/features/base/react/components/web/InlineDialogFailure.js 查看文件

41
         const supportString = t('inlineDialogFailure.supportMsg');
41
         const supportString = t('inlineDialogFailure.supportMsg');
42
         const supportLinkElem
42
         const supportLinkElem
43
             = supportLink
43
             = supportLink
44
-                ? ( // eslint-disable-line no-extra-parens
44
+                ? (
45
                     <div className = 'inline-dialog-error-text'>
45
                     <div className = 'inline-dialog-error-text'>
46
                         <span>{ supportString.padEnd(supportString.length + 1) }
46
                         <span>{ supportString.padEnd(supportString.length + 1) }
47
                         </span>
47
                         </span>

+ 1
- 1
react/features/base/react/components/web/MultiSelectAutocomplete.js 查看文件

244
         if (!this.state.error) {
244
         if (!this.state.error) {
245
             return null;
245
             return null;
246
         }
246
         }
247
-        const content = ( // eslint-disable-line no-extra-parens
247
+        const content = (
248
             <div className = 'autocomplete-error'>
248
             <div className = 'autocomplete-error'>
249
                 <InlineDialogFailure
249
                 <InlineDialogFailure
250
                     onRetry = { this._onRetry } />
250
                     onRetry = { this._onRetry } />

+ 0
- 2
react/features/base/react/components/web/SectionList.js 查看文件

60
          */
60
          */
61
         if (sections) {
61
         if (sections) {
62
             return (
62
             return (
63
-            /* eslint-disable no-extra-parens */
64
                 <Container
63
                 <Container
65
                     className = 'navigate-section-list'>
64
                     className = 'navigate-section-list'>
66
                     {
65
                     {
83
                         )
82
                         )
84
                     }
83
                     }
85
                 </Container>
84
                 </Container>
86
-            /* eslint-enable no-extra-parens */
87
             );
85
             );
88
         }
86
         }
89
 
87
 

+ 3
- 3
react/features/base/react/components/web/Watermarks.js 查看文件

105
         let reactElement = null;
105
         let reactElement = null;
106
 
106
 
107
         if (this.state.showBrandWatermark) {
107
         if (this.state.showBrandWatermark) {
108
-            reactElement = ( // eslint-disable-line no-extra-parens
108
+            reactElement = (
109
                 <div
109
                 <div
110
                     className = 'watermark rightwatermark'
110
                     className = 'watermark rightwatermark'
111
                     style = { _RIGHT_WATERMARK_STYLE } />
111
                     style = { _RIGHT_WATERMARK_STYLE } />
114
             const { brandWatermarkLink } = this.state;
114
             const { brandWatermarkLink } = this.state;
115
 
115
 
116
             if (brandWatermarkLink) {
116
             if (brandWatermarkLink) {
117
-                reactElement = ( // eslint-disable-line no-extra-parens
117
+                reactElement = (
118
                     <a
118
                     <a
119
                         href = { brandWatermarkLink }
119
                         href = { brandWatermarkLink }
120
                         target = '_new'>
120
                         target = '_new'>
144
             const { jitsiWatermarkLink } = this.state;
144
             const { jitsiWatermarkLink } = this.state;
145
 
145
 
146
             if (jitsiWatermarkLink) {
146
             if (jitsiWatermarkLink) {
147
-                reactElement = ( // eslint-disable-line no-extra-parens
147
+                reactElement = (
148
                     <a
148
                     <a
149
                         href = { jitsiWatermarkLink }
149
                         href = { jitsiWatermarkLink }
150
                         target = '_new'>
150
                         target = '_new'>

+ 1
- 1
react/features/base/toolbox/components/ToolboxItem.native.js 查看文件

67
             // XXX TouchableHighlight requires 1 child. If there's a need to
67
             // XXX TouchableHighlight requires 1 child. If there's a need to
68
             // show both the icon and the label, then these two need to be
68
             // show both the icon and the label, then these two need to be
69
             // wrapped in a View.
69
             // wrapped in a View.
70
-            children = ( // eslint-disable-line no-extra-parens
70
+            children = (
71
                 <View style = { style }>
71
                 <View style = { style }>
72
                     { children }
72
                     { children }
73
                     <Text style = { styles && styles.labelStyle }>
73
                     <Text style = { styles && styles.labelStyle }>

+ 0
- 2
react/features/base/toolbox/components/ToolboxItem.web.js 查看文件

35
         };
35
         };
36
         const elementType = showLabel ? 'li' : 'div';
36
         const elementType = showLabel ? 'li' : 'div';
37
         const useTooltip = this.tooltip && this.tooltip.length > 0;
37
         const useTooltip = this.tooltip && this.tooltip.length > 0;
38
-        // eslint-disable-next-line no-extra-parens
39
         let children = (
38
         let children = (
40
             <Fragment>
39
             <Fragment>
41
                 { this._renderIcon() }
40
                 { this._renderIcon() }
47
         );
46
         );
48
 
47
 
49
         if (useTooltip) {
48
         if (useTooltip) {
50
-            // eslint-disable-next-line no-extra-parens
51
             children = (
49
             children = (
52
                 <Tooltip
50
                 <Tooltip
53
                     content = { this.tooltip }
51
                     content = { this.tooltip }

+ 0
- 2
react/features/connection-stats/components/ConnectionStatsTable.js 查看文件

280
         if (packetLoss) {
280
         if (packetLoss) {
281
             const { download, upload } = packetLoss;
281
             const { download, upload } = packetLoss;
282
 
282
 
283
-            // eslint-disable-next-line no-extra-parens
284
             packetLossTableData = (
283
             packetLossTableData = (
285
                 <td>
284
                 <td>
286
                     <span className = 'connection-info__download'>
285
                     <span className = 'connection-info__download'>
392
         const { t, transport } = this.props;
391
         const { t, transport } = this.props;
393
 
392
 
394
         if (!transport || transport.length === 0) {
393
         if (!transport || transport.length === 0) {
395
-            // eslint-disable-next-line no-extra-parens
396
             const NA = (
394
             const NA = (
397
                 <tr key = 'address'>
395
                 <tr key = 'address'>
398
                     <td>
396
                     <td>

+ 4
- 6
react/features/desktop-picker/components/DesktopPickerPane.js 查看文件

61
         const classNames
61
         const classNames
62
             = `desktop-picker-pane default-scrollbar source-type-${type}`;
62
             = `desktop-picker-pane default-scrollbar source-type-${type}`;
63
         const previews
63
         const previews
64
-            = sources ? sources.map(
65
-                source =>
66
-
67
-                    // eslint-disable-next-line react/jsx-wrap-multilines
64
+            = sources
65
+                ? sources.map(source => (
68
                     <DesktopSourcePreview
66
                     <DesktopSourcePreview
69
                         key = { source.id }
67
                         key = { source.id }
70
                         onClick = { onClick }
68
                         onClick = { onClick }
71
                         onDoubleClick = { onDoubleClick }
69
                         onDoubleClick = { onDoubleClick }
72
                         selected = { source.id === selectedSourceId }
70
                         selected = { source.id === selectedSourceId }
73
                         source = { source }
71
                         source = { source }
74
-                        type = { type } />)
75
-                : ( // eslint-disable-line no-extra-parens
72
+                        type = { type } />))
73
+                : (
76
                     <div className = 'desktop-picker-pane-spinner'>
74
                     <div className = 'desktop-picker-pane-spinner'>
77
                         <Spinner
75
                         <Spinner
78
                             isCompleting = { false }
76
                             isCompleting = { false }

+ 2
- 4
react/features/filmstrip/components/native/Filmstrip.js 查看文件

121
                             && <LocalThumbnail />
121
                             && <LocalThumbnail />
122
                     }
122
                     }
123
                     {
123
                     {
124
-                        /* eslint-disable react/jsx-wrap-multilines */
125
 
124
 
126
                         this._sort(
125
                         this._sort(
127
                                 this.props._participants,
126
                                 this.props._participants,
128
                                 isNarrowAspectRatio_)
127
                                 isNarrowAspectRatio_)
129
-                            .map(p =>
128
+                            .map(p => (
130
                                 <Thumbnail
129
                                 <Thumbnail
131
                                     key = { p.id }
130
                                     key = { p.id }
132
-                                    participant = { p } />)
131
+                                    participant = { p } />))
133
 
132
 
134
-                        /* eslint-enable react/jsx-wrap-multilines */
135
                     }
133
                     }
136
                     {
134
                     {
137
                         !this._separateLocalThumbnail
135
                         !this._separateLocalThumbnail

+ 1
- 1
react/features/invite/components/AddPeopleDialog.web.js 查看文件

477
         const supportString = t('inlineDialogFailure.supportMsg');
477
         const supportString = t('inlineDialogFailure.supportMsg');
478
         const supportLink = interfaceConfig.SUPPORT_URL;
478
         const supportLink = interfaceConfig.SUPPORT_URL;
479
         const supportLinkContent
479
         const supportLinkContent
480
-            = ( // eslint-disable-line no-extra-parens
480
+            = (
481
                 <span>
481
                 <span>
482
                     <span>
482
                     <span>
483
                         { supportString.padEnd(supportString.length + 1) }
483
                         { supportString.padEnd(supportString.length + 1) }

+ 0
- 1
react/features/notifications/components/Notification.native.js 查看文件

76
                         pointerEvents = 'box-none'
76
                         pointerEvents = 'box-none'
77
                         style = { styles.notificationContent }>
77
                         style = { styles.notificationContent }>
78
                         {
78
                         {
79
-                            // eslint-disable-next-line no-extra-parens
80
                             this._getDescription().map((line, index) => (
79
                             this._getDescription().map((line, index) => (
81
                                 <Text
80
                                 <Text
82
                                     key = { index }
81
                                     key = { index }

+ 14
- 13
react/features/recording/components/LiveStream/BroadcastsDropdown.web.js 查看文件

86
     render() {
86
     render() {
87
         const { broadcasts, selectedBoundStreamID, t } = this.props;
87
         const { broadcasts, selectedBoundStreamID, t } = this.props;
88
 
88
 
89
-        const dropdownItems = broadcasts.map(broadcast =>
90
-            // eslint-disable-next-line react/jsx-wrap-multilines
91
-            <DropdownItem
92
-                key = { broadcast.boundStreamID }
93
-                // eslint-disable-next-line react/jsx-no-bind
94
-                onClick = { () => this._onSelect(broadcast.boundStreamID) }>
95
-                { broadcast.title }
96
-            </DropdownItem>
97
-        );
98
-        const selected = this.props.broadcasts.find(
99
-            broadcast => broadcast.boundStreamID === selectedBoundStreamID);
100
-        const triggerText = (selected && selected.title)
101
-            || t('liveStreaming.choose');
89
+        const dropdownItems
90
+            = broadcasts.map(broadcast => (
91
+                <DropdownItem
92
+                    key = { broadcast.boundStreamID }
93
+
94
+                    // eslint-disable-next-line react/jsx-no-bind
95
+                    onClick = { () => this._onSelect(broadcast.boundStreamID) }>
96
+                    { broadcast.title }
97
+                </DropdownItem>));
98
+        const selected
99
+            = this.props.broadcasts.find(
100
+                broadcast => broadcast.boundStreamID === selectedBoundStreamID);
101
+        const triggerText
102
+            = (selected && selected.title) || t('liveStreaming.choose');
102
 
103
 
103
         return (
104
         return (
104
             <div className = 'broadcast-dropdown'>
105
             <div className = 'broadcast-dropdown'>

+ 5
- 5
react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js 查看文件

237
 
237
 
238
         switch (this.props._googleAPIState) {
238
         switch (this.props._googleAPIState) {
239
         case GOOGLE_API_STATES.LOADED:
239
         case GOOGLE_API_STATES.LOADED:
240
-            googleContent = ( // eslint-disable-line no-extra-parens
240
+            googleContent = (
241
                 <GoogleSignInButton
241
                 <GoogleSignInButton
242
                     onClick = { this._onGoogleSignIn }
242
                     onClick = { this._onGoogleSignIn }
243
                     text = { t('liveStreaming.signIn') } />
243
                     text = { t('liveStreaming.signIn') } />
247
             break;
247
             break;
248
 
248
 
249
         case GOOGLE_API_STATES.SIGNED_IN:
249
         case GOOGLE_API_STATES.SIGNED_IN:
250
-            googleContent = ( // eslint-disable-line no-extra-parens
250
+            googleContent = (
251
                 <BroadcastsDropdown
251
                 <BroadcastsDropdown
252
                     broadcasts = { broadcasts }
252
                     broadcasts = { broadcasts }
253
                     onBroadcastSelected = { this._onYouTubeBroadcastIDSelected }
253
                     onBroadcastSelected = { this._onYouTubeBroadcastIDSelected }
259
              * that also accepts the anchor. This can be done using the Trans
259
              * that also accepts the anchor. This can be done using the Trans
260
              * component of react-i18next but I couldn't get it working...
260
              * component of react-i18next but I couldn't get it working...
261
              */
261
              */
262
-            helpText = ( // eslint-disable-line no-extra-parens
262
+            helpText = (
263
                 <div>
263
                 <div>
264
                     { `${t('liveStreaming.chooseCTA',
264
                     { `${t('liveStreaming.chooseCTA',
265
                         { email: _googleProfileEmail })} ` }
265
                         { email: _googleProfileEmail })} ` }
273
 
273
 
274
         case GOOGLE_API_STATES.NEEDS_LOADING:
274
         case GOOGLE_API_STATES.NEEDS_LOADING:
275
         default:
275
         default:
276
-            googleContent = ( // eslint-disable-line no-extra-parens
276
+            googleContent = (
277
                 <Spinner
277
                 <Spinner
278
                     isCompleting = { false }
278
                     isCompleting = { false }
279
                     size = 'medium' />
279
                     size = 'medium' />
283
         }
283
         }
284
 
284
 
285
         if (this.state.errorType !== undefined) {
285
         if (this.state.errorType !== undefined) {
286
-            googleContent = ( // eslint-disable-line no-extra-parens
286
+            googleContent = (
287
                 <GoogleSignInButton
287
                 <GoogleSignInButton
288
                     onClick = { this._onRequestGoogleSignIn }
288
                     onClick = { this._onRequestGoogleSignIn }
289
                     text = { t('liveStreaming.signIn') } />
289
                     text = { t('liveStreaming.signIn') } />

+ 10
- 10
react/features/settings/components/web/MoreTab.js 查看文件

143
             t
143
             t
144
         } = this.props;
144
         } = this.props;
145
 
145
 
146
-        const languageItems = languages.map(language =>
147
-            // eslint-disable-next-line react/jsx-wrap-multilines
148
-            <DropdownItem
149
-                key = { language }
150
-                // eslint-disable-next-line react/jsx-no-bind
151
-                onClick = {
152
-                    () => super._onChange({ currentLanguage: language }) }>
153
-                { t(`languages:${language}`) }
154
-            </DropdownItem>
155
-        );
146
+        const languageItems
147
+            = languages.map(language => (
148
+                <DropdownItem
149
+                    key = { language }
150
+
151
+                    // eslint-disable-next-line react/jsx-no-bind
152
+                    onClick = {
153
+                        () => super._onChange({ currentLanguage: language }) }>
154
+                    { t(`languages:${language}`) }
155
+                </DropdownItem>));
156
 
156
 
157
         return (
157
         return (
158
             <div
158
             <div

+ 1
- 1
react/features/toolbox/components/web/OverflowMenuItem.js 查看文件

101
      * @returns {ReactElement}
101
      * @returns {ReactElement}
102
      */
102
      */
103
     _renderText() {
103
     _renderText() {
104
-        const textElement = ( // eslint-disable-line no-extra-parens
104
+        const textElement = (
105
             <span className = 'overflow-menu-item-text'>
105
             <span className = 'overflow-menu-item-text'>
106
                 { this.props.text }
106
                 { this.props.text }
107
             </span>
107
             </span>

+ 0
- 2
react/features/welcome/components/WelcomePage.native.js 查看文件

230
         const { t } = this.props;
230
         const { t } = this.props;
231
         let children;
231
         let children;
232
 
232
 
233
-        /* eslint-disable no-extra-parens */
234
 
233
 
235
         if (this.state.joining) {
234
         if (this.state.joining) {
236
             // TouchableHighlight is picky about what its children can be, so
235
             // TouchableHighlight is picky about what its children can be, so
251
             );
250
             );
252
         }
251
         }
253
 
252
 
254
-        /* eslint-enable no-extra-parens */
255
 
253
 
256
         const buttonDisabled = this._isJoinDisabled();
254
         const buttonDisabled = this._isJoinDisabled();
257
 
255
 

Loading…
取消
儲存