소스 검색

Fix eslint & flow errors

Prepares for the latest eslint & flow-related npm packages which cause
these errors.
master
Lyubo Marinov 8 년 전
부모
커밋
8fd91573fc

+ 1
- 1
modules/UI/etherpad/Etherpad.js 파일 보기

@@ -202,7 +202,7 @@ export default class EtherpadManager {
202 202
     }
203 203
 
204 204
     /**
205
-     * 
205
+     *
206 206
      */
207 207
     isVisible() {
208 208
         return VideoLayout.isLargeContainerTypeVisible(ETHERPAD_CONTAINER_TYPE);

+ 1
- 1
modules/UI/videolayout/VideoContainer.js 파일 보기

@@ -588,7 +588,7 @@ export class VideoContainer extends LargeContainer {
588 588
     }
589 589
 
590 590
     /**
591
-     * 
591
+     *
592 592
      */
593 593
     hide() {
594 594
         // as the container is hidden/replaced by another container

+ 1
- 1
modules/devices/mediaDeviceHelper.js 파일 보기

@@ -237,7 +237,7 @@ export default {
237 237
         }
238 238
 
239 239
         /**
240
-         * 
240
+         *
241 241
          */
242 242
         function createVideoTrack(showError) {
243 243
             return (

+ 1
- 1
modules/translation/translation.js 파일 보기

@@ -68,7 +68,7 @@ class Translation {
68 68
     }
69 69
 
70 70
     /**
71
-     * 
71
+     *
72 72
      */
73 73
     translateElement(selector: Object, options: Object) {
74 74
         // XXX i18next expects undefined if options are missing.

+ 2
- 2
react/features/app/components/AbstractApp.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global APP */
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 import { I18nextProvider } from 'react-i18next';
@@ -17,8 +19,6 @@ import { BlankPage } from '../../welcome';
17 19
 
18 20
 import { appNavigate, appWillMount, appWillUnmount } from '../actions';
19 21
 
20
-declare var APP: Object;
21
-
22 22
 /**
23 23
  * The default URL to open if no other was specified to {@code AbstractApp}
24 24
  * via props.

+ 10
- 1
react/features/base/dialog/components/Dialog.native.js 파일 보기

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React from 'react';
3 5
 import { Modal, StyleSheet, TextInput } from 'react-native';
@@ -105,6 +107,8 @@ class Dialog extends AbstractDialog {
105 107
             <Prompt
106 108
                 cancelButtonTextStyle = { cancelButtonTextStyle }
107 109
                 cancelText = { t(cancelTitleKey) }
110
+
111
+                // $FlowFixMeState
108 112
                 defaultValue = { this.state.text }
109 113
                 onCancel = { this._onCancel }
110 114
                 onChangeText = { this._onChangeText }
@@ -226,7 +230,7 @@ class Dialog extends AbstractDialog {
226 230
                 mapped
227 231
                     = React.cloneElement(
228 232
                         mapped,
229
-                        /* props */ undefined,
233
+                        /* props */ {},
230 234
                         ...React.Children.toArray(React.Children.map(
231 235
                             children,
232 236
                             function(element) { // eslint-disable-line no-shadow
@@ -240,6 +244,8 @@ class Dialog extends AbstractDialog {
240 244
         return mapped;
241 245
     }
242 246
 
247
+    _onCancel: () => void;
248
+
243 249
     _onChangeText: (string) => void;
244 250
 
245 251
     /**
@@ -254,6 +260,8 @@ class Dialog extends AbstractDialog {
254 260
         this.setState({ text });
255 261
     }
256 262
 
263
+    _onSubmit: (?string) => void;
264
+
257 265
     /**
258 266
      * Submits this {@code Dialog} with the value of the {@link TextInput}
259 267
      * rendered by {@link Prompt} unless a value is explicitly specified.
@@ -263,6 +271,7 @@ class Dialog extends AbstractDialog {
263 271
      * @returns {void}
264 272
      */
265 273
     _onSubmit(value: ?string) {
274
+        // $FlowFixMeState
266 275
         super._onSubmit(value || this.state.text);
267 276
     }
268 277
 }

+ 3
- 1
react/features/base/media/components/AbstractAudio.js 파일 보기

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 
@@ -5,7 +7,7 @@ import React, { Component } from 'react';
5 7
  * The React {@link Component} which is similar to Web's
6 8
  * {@code HTMLAudioElement}.
7 9
  */
8
-export default class AbstractAudio extends Component {
10
+export default class AbstractAudio extends Component<*> {
9 11
     /**
10 12
      * The (reference to the) {@link ReactElement} which actually implements
11 13
      * this {@code AbstractAudio}.

+ 1
- 1
react/features/conference/components/Conference.native.js 파일 보기

@@ -339,7 +339,7 @@ function _mapDispatchToProps(dispatch) {
339 339
          * @returns {void}
340 340
          * @private
341 341
          */
342
-        _setToolboxVisible(visible: boolean) {
342
+        _setToolboxVisible(visible) {
343 343
             dispatch(setToolboxVisible(visible));
344 344
         }
345 345
     };

+ 2
- 2
react/features/connection-indicator/components/ConnectionIndicator.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global interfaceConfig */
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 
@@ -8,8 +10,6 @@ import { ConnectionStatsTable } from '../../connection-stats';
8 10
 
9 11
 import statsEmitter from '../statsEmitter';
10 12
 
11
-declare var interfaceConfig: Object;
12
-
13 13
 /**
14 14
  * The connection quality percentage that must be reached to be considered of
15 15
  * good quality and can result in the connection indicator being hidden.

+ 2
- 2
react/features/device-selection/DeviceSelectionPopup.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global JitsiMeetJS */
2
+
1 3
 import Logger from 'jitsi-meet-logger';
2 4
 import React from 'react';
3 5
 import ReactDOM from 'react-dom';
@@ -11,8 +13,6 @@ import { parseURLParams } from '../base/config';
11 13
 
12 14
 import DeviceSelectionDialogBase from './components/DeviceSelectionDialogBase';
13 15
 
14
-declare var JitsiMeetJS: Object;
15
-
16 16
 const logger = Logger.getLogger(__filename);
17 17
 
18 18
 /**

+ 2
- 2
react/features/device-selection/actions.js 파일 보기

@@ -132,8 +132,8 @@ function _openDeviceSelectionDialogInPopup() {
132 132
  * @param {Function} responseCallback - The callback that will send the
133 133
  * response.
134 134
  * @returns {boolean}
135
- */ // eslint-disable-next-line max-params
136
-function _processRequest(dispatch, getState, request, responseCallback) {
135
+ */
136
+function _processRequest(dispatch, getState, request, responseCallback) { // eslint-disable-line max-len, max-params
137 137
     if (request.type === 'devices') {
138 138
         switch (request.name) {
139 139
         case 'isDeviceListAvailable':

+ 2
- 2
react/features/feedback/components/FeedbackDialog.web.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global interfaceConfig */
2
+
1 3
 import StarIcon from '@atlaskit/icon/glyph/star';
2 4
 import StarFilledIcon from '@atlaskit/icon/glyph/star-filled';
3 5
 import PropTypes from 'prop-types';
@@ -10,8 +12,6 @@ import { translate } from '../../base/i18n';
10 12
 
11 13
 import { cancelFeedback, submitFeedback } from '../actions';
12 14
 
13
-declare var interfaceConfig: Object;
14
-
15 15
 const scoreAnimationClass
16 16
     = interfaceConfig.ENABLE_FEEDBACK_ANIMATION ? 'shake-rotate' : '';
17 17
 

+ 2
- 2
react/features/invite/components/InfoDialog.web.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global interfaceConfig */
2
+
1 3
 import React, { Component } from 'react';
2 4
 import { connect } from 'react-redux';
3 5
 import PropTypes from 'prop-types';
@@ -10,8 +12,6 @@ import AddPeopleDialog from './AddPeopleDialog';
10 12
 
11 13
 const logger = require('jitsi-meet-logger').getLogger(__filename);
12 14
 
13
-declare var interfaceConfig: Object;
14
-
15 15
 /**
16 16
  * A React Component with the contents for a dialog that shows information about
17 17
  * the current conference and provides ways to invite other participants.

+ 2
- 3
react/features/invite/components/InfoDialogButton.web.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global interfaceConfig */
2
+
1 3
 import InlineDialog from '@atlaskit/inline-dialog';
2 4
 import PropTypes from 'prop-types';
3 5
 import React, { Component } from 'react';
@@ -6,11 +8,8 @@ import { connect } from 'react-redux';
6 8
 import { ToolbarButton, TOOLTIP_TO_POPUP_POSITION } from '../../toolbox';
7 9
 
8 10
 import { setInfoDialogVisibility } from '../actions';
9
-
10 11
 import InfoDialog from './InfoDialog';
11 12
 
12
-declare var interfaceConfig: Object;
13
-
14 13
 const { INITIAL_TOOLBAR_TIMEOUT } = interfaceConfig;
15 14
 
16 15
 /**

+ 2
- 2
react/features/invite/components/InviteButton.web.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global interfaceConfig */
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 import { connect } from 'react-redux';
@@ -12,8 +14,6 @@ import { AddPeopleDialog, InviteDialog } from '.';
12 14
 import { DialOutDialog } from '../../dial-out';
13 15
 import { isInviteOptionEnabled, getInviteOptionPosition } from '../functions';
14 16
 
15
-declare var interfaceConfig: Object;
16
-
17 17
 const SHARE_LINK_OPTION = 'invite';
18 18
 const DIAL_OUT_OPTION = 'dialout';
19 19
 const ADD_TO_CALL_OPTION = 'addtocall';

+ 6
- 2
react/features/notifications/components/Notification.web.js 파일 보기

@@ -1,9 +1,11 @@
1
+// @flow
2
+
1 3
 import Flag from '@atlaskit/flag';
2 4
 import EditorInfoIcon from '@atlaskit/icon/glyph/editor/info';
3
-import PropTypes from 'prop-types';
4 5
 import ErrorIcon from '@atlaskit/icon/glyph/error';
5 6
 import WarningIcon from '@atlaskit/icon/glyph/warning';
6 7
 import { colors } from '@atlaskit/theme';
8
+import PropTypes from 'prop-types';
7 9
 import React, { Component } from 'react';
8 10
 
9 11
 import { translate } from '../../base/i18n';
@@ -30,7 +32,7 @@ const ICON_COLOR = {
30 32
  *
31 33
  * @extends Component
32 34
  */
33
-class Notification extends Component {
35
+class Notification extends Component<*> {
34 36
     /**
35 37
      * Default values for {@code Notification} component's properties.
36 38
      *
@@ -163,6 +165,8 @@ class Notification extends Component {
163 165
         );
164 166
     }
165 167
 
168
+    _onDismissed: () => void;
169
+
166 170
     /**
167 171
      * Calls back into {@code FlagGroup} to dismiss the notification.
168 172
      *

+ 2
- 2
react/features/overlay/components/OverlayContainer.js 파일 보기

@@ -1,3 +1,5 @@
1
+/* global interfaceConfig */
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 import { connect } from 'react-redux';
@@ -12,8 +14,6 @@ import UserMediaPermissionsFilmstripOnlyOverlay
12 14
     from './UserMediaPermissionsFilmstripOnlyOverlay';
13 15
 import UserMediaPermissionsOverlay from './UserMediaPermissionsOverlay';
14 16
 
15
-declare var interfaceConfig: Object;
16
-
17 17
 /**
18 18
  * Implements a React Component that will display the correct overlay when
19 19
  * needed.

+ 2
- 2
react/features/overlay/components/OverlayFrame.js 파일 보기

@@ -1,8 +1,8 @@
1
+/* global interfaceConfig */
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 
4
-declare var interfaceConfig: Object;
5
-
6 6
 /**
7 7
  * Implements a React Component for the frame of the overlays.
8 8
  */

+ 2
- 2
react/features/overlay/components/ReloadTimer.js 파일 보기

@@ -1,10 +1,10 @@
1
+/* global AJS */
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 
4 6
 import { translate } from '../../base/i18n';
5 7
 
6
-declare var AJS: Object;
7
-
8 8
 /**
9 9
  * Implements a React Component for the reload timer. Starts counter from
10 10
  * props.start, adds props.step to the current value on every props.interval

+ 7
- 1
react/features/remote-control/components/RemoteControlAuthorizationDialog.js 파일 보기

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 import { connect } from 'react-redux';
@@ -11,7 +13,7 @@ declare var APP: Object;
11 13
 /**
12 14
  * Implements a dialog for remote control authorization.
13 15
  */
14
-class RemoteControlAuthorizationDialog extends Component {
16
+class RemoteControlAuthorizationDialog extends Component<*> {
15 17
     /**
16 18
      * RemoteControlAuthorizationDialog component's property types.
17 19
      *
@@ -105,6 +107,8 @@ class RemoteControlAuthorizationDialog extends Component {
105 107
         );
106 108
     }
107 109
 
110
+    _onCancel: () => boolean;
111
+
108 112
     /**
109 113
      * Notifies the remote control module about the denial of the remote control
110 114
      * request.
@@ -119,6 +123,8 @@ class RemoteControlAuthorizationDialog extends Component {
119 123
         return true;
120 124
     }
121 125
 
126
+    _onSubmit: () => boolean;
127
+
122 128
     /**
123 129
      * Notifies the remote control module that the remote control request is
124 130
      * accepted.

+ 16
- 12
react/features/remote-video-menu/components/RemoteVideoMenuTriggerButton.js 파일 보기

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import PropTypes from 'prop-types';
2 4
 import React, { Component } from 'react';
3 5
 
@@ -20,7 +22,7 @@ declare var interfaceConfig: Object;
20 22
  *
21 23
  * @extends {Component}
22 24
  */
23
-class RemoteVideoMenuTriggerButton extends Component {
25
+class RemoteVideoMenuTriggerButton extends Component<*> {
24 26
     static propTypes = {
25 27
         /**
26 28
          * A value between 0 and 1 indicating the volume of the participant's
@@ -66,25 +68,25 @@ class RemoteVideoMenuTriggerButton extends Component {
66 68
         remoteControlState: PropTypes.number
67 69
     };
68 70
 
71
+    /**
72
+     * The internal reference to topmost DOM/HTML element backing the React
73
+     * {@code Component}. Accessed directly for associating an element as
74
+     * the trigger for a popover.
75
+     *
76
+     * @private
77
+     * @type {HTMLDivElement}
78
+     */
79
+    _rootElement = null;
80
+
69 81
     /**
70 82
      * Initializes a new {#@code RemoteVideoMenuTriggerButton} instance.
71 83
      *
72 84
      * @param {Object} props - The read-only properties with which the new
73 85
      * instance is to be initialized.
74 86
      */
75
-    constructor(props) {
87
+    constructor(props: Object) {
76 88
         super(props);
77 89
 
78
-        /**
79
-         * The internal reference to topmost DOM/HTML element backing the React
80
-         * {@code Component}. Accessed directly for associating an element as
81
-         * the trigger for a popover.
82
-         *
83
-         * @private
84
-         * @type {HTMLDivElement}
85
-         */
86
-        this._rootElement = null;
87
-
88 90
         // Bind event handler so it is only bound once for every instance.
89 91
         this._onShowRemoteMenu = this._onShowRemoteMenu.bind(this);
90 92
     }
@@ -118,6 +120,8 @@ class RemoteVideoMenuTriggerButton extends Component {
118 120
         );
119 121
     }
120 122
 
123
+    _onShowRemoteMenu: () => void;
124
+
121 125
     /**
122 126
      * Opens the {@code RemoteVideoMenu}.
123 127
      *

Loading…
취소
저장