Bläddra i källkod

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

master
Ritwik Heda 7 år sedan
förälder
incheckning
1d99abc4a4

+ 2
- 2
package-lock.json Visa fil

@@ -6449,8 +6449,8 @@
6449 6449
       }
6450 6450
     },
6451 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 6454
       "dev": true
6455 6455
     },
6456 6456
     "eslint-import-resolver-node": {

+ 1
- 1
package.json Visa fil

@@ -88,7 +88,7 @@
88 88
     "clean-css": "3.4.25",
89 89
     "css-loader": "0.28.7",
90 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 92
     "eslint-plugin-flowtype": "2.39.1",
93 93
     "eslint-plugin-import": "2.8.0",
94 94
     "eslint-plugin-jsdoc": "3.2.0",

+ 1
- 1
react/features/base/dialog/components/Dialog.native.js Visa fil

@@ -113,7 +113,7 @@ class Dialog extends AbstractDialog<Props, State> {
113 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 117
             <Prompt
118 118
                 cancelButtonTextStyle = { cancelButtonTextStyle }
119 119
                 cancelText = { t(cancelTitleKey) }

+ 1
- 1
react/features/base/media/components/native/Video.js Visa fil

@@ -93,7 +93,7 @@ export default class Video extends Component<*> {
93 93
                     ? 'contain'
94 94
                     : (style && style.objectFit) || 'cover';
95 95
             const rtcView
96
-                = ( // eslint-disable-line no-extra-parens
96
+                = (
97 97
                     <RTCView
98 98
                         mirror = { this.props.mirror }
99 99
                         objectFit = { objectFit }

+ 1
- 1
react/features/base/react/components/web/InlineDialogFailure.js Visa fil

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

+ 1
- 1
react/features/base/react/components/web/MultiSelectAutocomplete.js Visa fil

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

+ 0
- 2
react/features/base/react/components/web/SectionList.js Visa fil

@@ -60,7 +60,6 @@ export default class SectionList extends Component<Props> {
60 60
          */
61 61
         if (sections) {
62 62
             return (
63
-            /* eslint-disable no-extra-parens */
64 63
                 <Container
65 64
                     className = 'navigate-section-list'>
66 65
                     {
@@ -83,7 +82,6 @@ export default class SectionList extends Component<Props> {
83 82
                         )
84 83
                     }
85 84
                 </Container>
86
-            /* eslint-enable no-extra-parens */
87 85
             );
88 86
         }
89 87
 

+ 3
- 3
react/features/base/react/components/web/Watermarks.js Visa fil

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

+ 1
- 1
react/features/base/toolbox/components/ToolboxItem.native.js Visa fil

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

+ 0
- 2
react/features/base/toolbox/components/ToolboxItem.web.js Visa fil

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

+ 0
- 2
react/features/connection-stats/components/ConnectionStatsTable.js Visa fil

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

+ 4
- 6
react/features/desktop-picker/components/DesktopPickerPane.js Visa fil

@@ -61,18 +61,16 @@ class DesktopPickerPane extends Component {
61 61
         const classNames
62 62
             = `desktop-picker-pane default-scrollbar source-type-${type}`;
63 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 66
                     <DesktopSourcePreview
69 67
                         key = { source.id }
70 68
                         onClick = { onClick }
71 69
                         onDoubleClick = { onDoubleClick }
72 70
                         selected = { source.id === selectedSourceId }
73 71
                         source = { source }
74
-                        type = { type } />)
75
-                : ( // eslint-disable-line no-extra-parens
72
+                        type = { type } />))
73
+                : (
76 74
                     <div className = 'desktop-picker-pane-spinner'>
77 75
                         <Spinner
78 76
                             isCompleting = { false }

+ 2
- 4
react/features/filmstrip/components/native/Filmstrip.js Visa fil

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

+ 1
- 1
react/features/invite/components/AddPeopleDialog.web.js Visa fil

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

+ 0
- 1
react/features/notifications/components/Notification.native.js Visa fil

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

+ 14
- 13
react/features/recording/components/LiveStream/BroadcastsDropdown.web.js Visa fil

@@ -86,19 +86,20 @@ class BroadcastsDropdown extends PureComponent {
86 86
     render() {
87 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 104
         return (
104 105
             <div className = 'broadcast-dropdown'>

+ 5
- 5
react/features/recording/components/LiveStream/StartLiveStreamDialog.web.js Visa fil

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

+ 10
- 10
react/features/settings/components/web/MoreTab.js Visa fil

@@ -143,16 +143,16 @@ class MoreTab extends AbstractDialogTab<Props, State> {
143 143
             t
144 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 157
         return (
158 158
             <div

+ 1
- 1
react/features/toolbox/components/web/OverflowMenuItem.js Visa fil

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

+ 0
- 2
react/features/welcome/components/WelcomePage.native.js Visa fil

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

Laddar…
Avbryt
Spara