Parcourir la source

ESLint

Enable ESLint on jitsi-meet with the same configuration and the same
goals as in lib-jitsi-meet.
j8
Lyubomir Marinov il y a 8 ans
Parent
révision
a2b076985a
47 fichiers modifiés avec 192 ajouts et 213 suppressions
  1. 11
    0
      .eslintignore
  2. 37
    0
      .eslintrc.js
  3. 6
    0
      analytics.js
  4. 1
    1
      app.js
  5. 18
    38
      conference.js
  6. 3
    2
      config.js
  7. 2
    2
      interface_config.js
  8. 0
    1
      modules/API/external/external_api.js
  9. 7
    6
      modules/FollowMe.js
  10. 27
    39
      modules/UI/UI.js
  11. 1
    6
      modules/UI/authentication/AuthHandler.js
  12. 2
    2
      modules/UI/authentication/LoginDialog.js
  13. 1
    1
      modules/UI/authentication/RoomLocker.js
  14. 1
    1
      modules/UI/etherpad/Etherpad.js
  15. 2
    2
      modules/UI/feedback/Feedback.js
  16. 12
    8
      modules/UI/feedback/FeedbackWindow.js
  17. 2
    2
      modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js
  18. 2
    2
      modules/UI/recording/Recording.js
  19. 2
    2
      modules/UI/shared_video/SharedVideo.js
  20. 0
    1
      modules/UI/side_pannels/chat/Commands.js
  21. 0
    5
      modules/UI/side_pannels/contactlist/ContactList.js
  22. 2
    3
      modules/UI/side_pannels/profile/Profile.js
  23. 2
    2
      modules/UI/side_pannels/settings/SettingsMenu.js
  24. 7
    4
      modules/UI/toolbars/Toolbar.js
  25. 1
    2
      modules/UI/toolbars/ToolbarToggler.js
  26. 3
    3
      modules/UI/util/MessageHandler.js
  27. 1
    1
      modules/UI/util/UIUtil.js
  28. 1
    1
      modules/UI/videolayout/ConnectionIndicator.js
  29. 1
    1
      modules/UI/videolayout/FilmStrip.js
  30. 5
    4
      modules/UI/videolayout/LargeContainer.js
  31. 0
    3
      modules/UI/videolayout/LargeVideoManager.js
  32. 2
    18
      modules/UI/videolayout/LocalVideo.js
  33. 1
    4
      modules/UI/videolayout/RemoteVideo.js
  34. 3
    4
      modules/UI/videolayout/SmallVideo.js
  35. 1
    6
      modules/UI/videolayout/VideoContainer.js
  36. 6
    12
      modules/UI/videolayout/VideoLayout.js
  37. 0
    2
      modules/UI/welcome_page/WelcomePage.js
  38. 2
    2
      modules/config/HttpConfigFetch.js
  39. 1
    1
      modules/config/URLProcessor.js
  40. 1
    2
      modules/config/Util.js
  41. 0
    2
      modules/connectionquality/connectionquality.js
  42. 2
    2
      modules/devices/mediaDeviceHelper.js
  43. 2
    3
      modules/recorder/Recorder.js
  44. 5
    7
      modules/translation/translation.js
  45. 2
    1
      package.json
  46. 2
    1
      utils.js
  47. 2
    1
      webpack.config.babel.js

+ 11
- 0
.eslintignore Voir le fichier

@@ -0,0 +1,11 @@
1
+# The build artifacts of the jitsi-meet project.
2
+build/*
3
+
4
+# Third-party source code which we (1) do not want to modify or (2) try to
5
+# modify as little as possible.
6
+libs/*
7
+
8
+# ESLint will by default ignore its own configuration file. However, there does
9
+# not seem to be a reason why we will want to risk being inconsistent with our
10
+# remaining JavaScript source code.
11
+!.eslintrc.js

+ 37
- 0
.eslintrc.js Voir le fichier

@@ -0,0 +1,37 @@
1
+module.exports = {
2
+    'env': {
3
+        'browser': true,
4
+        'commonjs': true,
5
+        'es6': true
6
+    },
7
+    'extends': 'eslint:recommended',
8
+    'globals': {
9
+        // The globals that (1) are accessed but not defined within many of our
10
+        // files, (2) are certainly defined, and (3) we would like to use
11
+        // without explicitly specifying them (using a comment) inside of our
12
+        // files.
13
+        '__filename': false
14
+    },
15
+    'parserOptions': {
16
+        'ecmaFeatures': {
17
+            'experimentalObjectRestSpread': true
18
+        },
19
+        'sourceType': 'module'
20
+    },
21
+    'rules': {
22
+        'new-cap': [
23
+            'error',
24
+            {
25
+                'capIsNew': false // Behave like JSHint's newcap.
26
+            }
27
+        ],
28
+        // While it is considered a best practice to avoid using methods on
29
+        // console in JavaScript that is designed to be executed in the browser
30
+        // and ESLint includes the rule among its set of recommended rules, (1)
31
+        // the general practice is to strip such calls before pushing to
32
+        // production and (2) we prefer to utilize console in lib-jitsi-meet
33
+        // (and jitsi-meet).
34
+        'no-console': 'off',
35
+        'semi': 'error'
36
+    }
37
+};

+ 6
- 0
analytics.js Voir le fichier

@@ -1,5 +1,9 @@
1
+/* global ga */
2
+
1 3
 (function (ctx) {
2 4
   function Analytics() {
5
+    /* eslint-disable */
6
+
3 7
     /**
4 8
      * Google Analytics
5 9
      */
@@ -8,6 +12,8 @@
8 12
     })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
9 13
     ga('create', 'UA-319188-14', 'jit.si');
10 14
     ga('send', 'pageview');
15
+
16
+    /* eslint-enable */
11 17
   }
12 18
 
13 19
   Analytics.prototype.sendEvent = function (action, data, label, browserName) {

+ 1
- 1
app.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, JitsiMeetJS, config, getRoomName */
1
+/* global $, config, getRoomName */
2 2
 /* application specific logic */
3 3
 
4 4
 import "babel-polyfill";

+ 18
- 38
conference.js Voir le fichier

@@ -19,7 +19,6 @@ import {reportError} from './modules/util/helpers';
19 19
 import UIErrors from './modules/UI/UIErrors';
20 20
 import UIUtil from './modules/UI/util/UIUtil';
21 21
 
22
-const ConnectionEvents = JitsiMeetJS.events.connection;
23 22
 const ConnectionErrors = JitsiMeetJS.errors.connection;
24 23
 
25 24
 const ConferenceEvents = JitsiMeetJS.events.conference;
@@ -159,29 +158,24 @@ function getDisplayName (id) {
159 158
 
160 159
 /**
161 160
  * Mute or unmute local audio stream if it exists.
162
- * @param {boolean} muted if audio stream should be muted or unmuted.
163
- * @param {boolean} indicates if this local audio mute was a result of user
164
- * interaction
165
- *
161
+ * @param {boolean} muted - if audio stream should be muted or unmuted.
162
+ * @param {boolean} userInteraction - indicates if this local audio mute was a
163
+ * result of user interaction
166 164
  */
167
-function muteLocalAudio (muted, userInteraction) {
168
-    if (!localAudio) {
165
+function muteLocalAudio (muted) {
166
+    muteLocalMedia(localAudio, muted, 'Audio');
167
+}
168
+
169
+function muteLocalMedia(localMedia, muted, localMediaTypeString) {
170
+    if (!localMedia) {
169 171
         return;
170 172
     }
171 173
 
172
-    if (muted) {
173
-        localAudio.mute().then(function(value) {},
174
-            function(value) {
175
-                console.warn('Audio Mute was rejected:', value);
176
-            }
177
-        );
178
-    } else {
179
-        localAudio.unmute().then(function(value) {},
180
-            function(value) {
181
-                console.warn('Audio unmute was rejected:', value);
182
-            }
183
-        );
184
-    }
174
+    const method = muted ? 'mute' : 'unmute';
175
+
176
+    localMedia[method]().catch(reason => {
177
+        console.warn(`${localMediaTypeString} ${method} was rejected:`, reason);
178
+    });
185 179
 }
186 180
 
187 181
 /**
@@ -189,23 +183,7 @@ function muteLocalAudio (muted, userInteraction) {
189 183
  * @param {boolean} muted if video stream should be muted or unmuted.
190 184
  */
191 185
 function muteLocalVideo (muted) {
192
-    if (!localVideo) {
193
-        return;
194
-    }
195
-
196
-    if (muted) {
197
-        localVideo.mute().then(function(value) {},
198
-            function(value) {
199
-                console.warn('Video mute was rejected:', value);
200
-            }
201
-        );
202
-    } else {
203
-        localVideo.unmute().then(function(value) {},
204
-            function(value) {
205
-                console.warn('Video unmute was rejected:', value);
206
-            }
207
-        );
208
-    }
186
+    muteLocalMedia(localVideo, muted, 'Video');
209 187
 }
210 188
 
211 189
 /**
@@ -433,7 +411,7 @@ class ConferenceConnector {
433 411
         room.on(ConferenceEvents.CONFERENCE_ERROR,
434 412
             this._onConferenceError.bind(this));
435 413
     }
436
-    _handleConferenceFailed(err, msg) {
414
+    _handleConferenceFailed(err) {
437 415
         this._unsubscribe();
438 416
         this._reject(err);
439 417
     }
@@ -1284,6 +1262,7 @@ export default {
1284 1262
             UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000);
1285 1263
         });
1286 1264
 
1265
+/*
1287 1266
         room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => {
1288 1267
             //FIXME
1289 1268
             if (config.muteLocalVideoIfNotInLastN) {
@@ -1292,6 +1271,7 @@ export default {
1292 1271
                 // APP.UI.markVideoMuted(true/false);
1293 1272
             }
1294 1273
         });
1274
+*/
1295 1275
         room.on(
1296 1276
             ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, (ids, enteringIds) => {
1297 1277
             APP.UI.handleLastNEndpoints(ids, enteringIds);

+ 3
- 2
config.js Voir le fichier

@@ -1,5 +1,6 @@
1
-/* jshint -W101 */
2
-var config = {
1
+/* jshint maxlen:false */
2
+
3
+var config = { // eslint-disable-line no-unused-vars
3 4
 //    configLocation: './config.json', // see ./modules/HttpConfigFetch.js
4 5
     hosts: {
5 6
         domain: 'jitsi-meet.example.com',

+ 2
- 2
interface_config.js Voir le fichier

@@ -1,4 +1,4 @@
1
-var interfaceConfig = {
1
+var interfaceConfig = { // eslint-disable-line no-unused-vars
2 2
     CANVAS_EXTRA: 104,
3 3
     CANVAS_RADIUS: 0,
4 4
     SHADOW_COLOR: '#ffffff',
@@ -44,4 +44,4 @@ var interfaceConfig = {
44 44
     DISABLE_FOCUS_INDICATOR: false,
45 45
     AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)",
46 46
     AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)"
47
-};
47
+};

+ 0
- 1
modules/API/external/external_api.js Voir le fichier

@@ -336,7 +336,6 @@ JitsiMeetExternalAPI.prototype.removeEventListener = function(event) {
336 336
  * @param events array with the names of the events.
337 337
  */
338 338
 JitsiMeetExternalAPI.prototype.removeEventListeners = function(events) {
339
-    var eventsArray = [];
340 339
     for(var i = 0; i < events.length; i++)
341 340
         this.removeEventListener(events[i]);
342 341
 };

+ 7
- 6
modules/FollowMe.js Voir le fichier

@@ -261,25 +261,26 @@ class FollowMe {
261 261
      * @param newValue the new value
262 262
      * @private
263 263
      */
264
+    // eslint-disable-next-line no-unused-vars
264 265
     _localPropertyChange (property, oldValue, newValue) {
265 266
         // Only a moderator is allowed to send commands.
266
-        var conference = this._conference;
267
+        const conference = this._conference;
267 268
         if (!conference.isModerator)
268 269
             return;
269 270
 
270
-        var commands = conference.commands;
271
+        const commands = conference.commands;
271 272
         // XXX The "Follow Me" command represents a snapshot of all states
272 273
         // which are to be followed so don't forget to removeCommand before
273 274
         // sendCommand!
274 275
         commands.removeCommand(_COMMAND);
275
-        var self = this;
276
+        const local = this._local;
276 277
         commands.sendCommandOnce(
277 278
                 _COMMAND,
278 279
                 {
279 280
                     attributes: {
280
-                        filmStripVisible: self._local.filmStripVisible,
281
-                        nextOnStage: self._local.nextOnStage,
282
-                        sharedDocumentVisible: self._local.sharedDocumentVisible
281
+                        filmStripVisible: local.filmStripVisible,
282
+                        nextOnStage: local.nextOnStage,
283
+                        sharedDocumentVisible: local.sharedDocumentVisible
283 284
                     }
284 285
                 });
285 286
     }

+ 27
- 39
modules/UI/UI.js Voir le fichier

@@ -1,5 +1,4 @@
1 1
 /* global APP, JitsiMeetJS, $, config, interfaceConfig, toastr */
2
-/* jshint -W101 */
3 2
 var UI = {};
4 3
 
5 4
 import Chat from "./side_pannels/chat/Chat";
@@ -10,11 +9,11 @@ import Avatar from "./avatar/Avatar";
10 9
 import SideContainerToggler from "./side_pannels/SideContainerToggler";
11 10
 import UIUtil from "./util/UIUtil";
12 11
 import UIEvents from "../../service/UI/UIEvents";
13
-import CQEvents from '../../service/connectionquality/CQEvents';
14 12
 import EtherpadManager from './etherpad/Etherpad';
15 13
 import SharedVideoManager from './shared_video/SharedVideo';
16 14
 import Recording from "./recording/Recording";
17
-import GumPermissionsOverlay from './gum_overlay/UserMediaPermissionsGuidanceOverlay';
15
+import GumPermissionsOverlay
16
+    from './gum_overlay/UserMediaPermissionsGuidanceOverlay';
18 17
 
19 18
 import VideoLayout from "./videolayout/VideoLayout";
20 19
 import FilmStrip from "./videolayout/FilmStrip";
@@ -194,21 +193,16 @@ UI.notifyReservationError = function (code, msg) {
194 193
         "dialog.reservationError");
195 194
     var message = APP.translation.generateTranslationHTML(
196 195
         "dialog.reservationErrorMsg", {code: code, msg: msg});
197
-    messageHandler.openDialog(
198
-        title,
199
-        message,
200
-        true, {},
201
-        function (event, value, message, formVals) {
202
-            return false;
203
-        }
204
-    );
196
+    messageHandler.openDialog(title, message, true, {}, () => false);
205 197
 };
206 198
 
207 199
 /**
208 200
  * Notify user that he has been kicked from the server.
209 201
  */
210 202
 UI.notifyKicked = function () {
211
-    messageHandler.openMessageDialog("dialog.sessTerminated", "dialog.kickMessage");
203
+    messageHandler.openMessageDialog(
204
+            "dialog.sessTerminated",
205
+            "dialog.kickMessage");
212 206
 };
213 207
 
214 208
 /**
@@ -218,13 +212,9 @@ UI.notifyKicked = function () {
218 212
 UI.notifyConferenceDestroyed = function (reason) {
219 213
     //FIXME: use Session Terminated from translation, but
220 214
     // 'reason' text comes from XMPP packet and is not translated
221
-    var title = APP.translation.generateTranslationHTML("dialog.sessTerminated");
222
-    messageHandler.openDialog(
223
-        title, reason, true, {},
224
-        function (event, value, message, formVals) {
225
-            return false;
226
-        }
227
-    );
215
+    const title
216
+        = APP.translation.generateTranslationHTML("dialog.sessTerminated");
217
+    messageHandler.openDialog(title, reason, true, {}, () => false);
228 218
 };
229 219
 
230 220
 /**
@@ -287,7 +277,9 @@ UI.setRaisedHandStatus = (participant, raisedHandStatus) => {
287 277
  * Sets the local "raised hand" status.
288 278
  */
289 279
 UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
290
-    VideoLayout.setRaisedHandStatus(APP.conference.getMyUserId(), raisedHandStatus);
280
+    VideoLayout.setRaisedHandStatus(
281
+            APP.conference.getMyUserId(),
282
+            raisedHandStatus);
291 283
 };
292 284
 
293 285
 /**
@@ -579,10 +571,6 @@ UI.removeRemoteStream = function (track) {
579 571
     VideoLayout.onRemoteStreamRemoved(track);
580 572
 };
581 573
 
582
-function chatAddError(errorMessage, originalText) {
583
-    return Chat.chatAddError(errorMessage, originalText);
584
-}
585
-
586 574
 /**
587 575
  * Update chat subject.
588 576
  * @param {string} subject new chat subject
@@ -959,9 +947,7 @@ UI.notifyConnectionFailed = function (stropheErrorMsg) {
959 947
             "dialog.connectError");
960 948
     }
961 949
 
962
-    messageHandler.openDialog(
963
-        title, message, true, {}, function (e, v, m, f) { return false; }
964
-    );
950
+    messageHandler.openDialog(title, message, true, {}, () => false);
965 951
 };
966 952
 
967 953
 
@@ -975,9 +961,7 @@ UI.notifyMaxUsersLimitReached = function () {
975 961
     var message = APP.translation.generateTranslationHTML(
976 962
             "dialog.maxUsersLimitReached");
977 963
 
978
-    messageHandler.openDialog(
979
-        title, message, true, {}, function (e, v, m, f) { return false; }
980
-    );
964
+    messageHandler.openDialog(title, message, true, {}, () => false);
981 965
 };
982 966
 
983 967
 /**
@@ -985,8 +969,12 @@ UI.notifyMaxUsersLimitReached = function () {
985 969
  */
986 970
 UI.notifyInitiallyMuted = function () {
987 971
     messageHandler.notify(
988
-        null, "notify.mutedTitle", "connected", "notify.muted", null, {timeOut: 120000}
989
-    );
972
+        null,
973
+        "notify.mutedTitle",
974
+        "connected",
975
+        "notify.muted",
976
+        null,
977
+        { timeOut: 120000 });
990 978
 };
991 979
 
992 980
 /**
@@ -1089,6 +1077,7 @@ UI.addMessage = function (from, displayName, message, stamp) {
1089 1077
     Chat.updateChatConversation(from, displayName, message, stamp);
1090 1078
 };
1091 1079
 
1080
+// eslint-disable-next-line no-unused-vars
1092 1081
 UI.updateDTMFSupport = function (isDTMFSupported) {
1093 1082
     //TODO: enable when the UI is ready
1094 1083
     //Toolbar.showDialPadButton(dtmfSupport);
@@ -1105,7 +1094,7 @@ UI.requestFeedback = function () {
1105 1094
     else if (Feedback.isEnabled() && Feedback.isSubmitted())
1106 1095
         return Promise.resolve();
1107 1096
     else
1108
-        return new Promise(function (resolve, reject) {
1097
+        return new Promise(function (resolve) {
1109 1098
             if (Feedback.isEnabled()) {
1110 1099
                 // If the user has already entered feedback, we'll show the
1111 1100
                 // window and immidiately start the conference dispose timeout.
@@ -1272,7 +1261,7 @@ UI.showExtensionExternalInstallationDialog = function (url) {
1272 1261
         null,
1273 1262
         true,
1274 1263
         "dialog.goToStore",
1275
-         function(e,v,m,f){
1264
+        function(e,v) {
1276 1265
             if (v) {
1277 1266
                 e.preventDefault();
1278 1267
                 eventEmitter.emit(UIEvents.OPEN_EXTENSION_STORE, url);
@@ -1407,13 +1396,12 @@ UI.showDeviceErrorDialog = function (micError, cameraError) {
1407 1396
         let title = "dialog.error";
1408 1397
 
1409 1398
         if (micError && micError.name === TrackErrors.PERMISSION_DENIED) {
1410
-            if (cameraError && cameraError.name === TrackErrors.PERMISSION_DENIED) {
1411
-                title = "dialog.permissionDenied";
1412
-            } else if (!cameraError) {
1399
+            if (!cameraError
1400
+                    || cameraError.name === TrackErrors.PERMISSION_DENIED) {
1413 1401
                 title = "dialog.permissionDenied";
1414 1402
             }
1415
-        } else if (cameraError &&
1416
-            cameraError.name === TrackErrors.PERMISSION_DENIED) {
1403
+        } else if (cameraError
1404
+                && cameraError.name === TrackErrors.PERMISSION_DENIED) {
1417 1405
             title = "dialog.permissionDenied";
1418 1406
         }
1419 1407
 

+ 1
- 6
modules/UI/authentication/AuthHandler.js Voir le fichier

@@ -4,7 +4,6 @@ import LoginDialog from './LoginDialog';
4 4
 import UIUtil from '../util/UIUtil';
5 5
 import {openConnection} from '../../../connection';
6 6
 
7
-const ConferenceEvents = JitsiMeetJS.events.conference;
8 7
 const ConnectionErrors = JitsiMeetJS.errors.connection;
9 8
 
10 9
 let externalAuthWindow;
@@ -73,7 +72,6 @@ function redirectToTokenAuthService(roomName) {
73 72
  * @param room the name fo the conference room.
74 73
  */
75 74
 function initJWTTokenListener(room) {
76
-    var self = this;
77 75
     var listener = function (event) {
78 76
         if (externalAuthWindow !== event.source) {
79 77
             console.warn("Ignored message not coming " +
@@ -279,15 +277,12 @@ function showXmppPasswordPrompt(roomName, connect) {
279 277
 function requestAuth(roomName, connect) {
280 278
     if (isTokenAuthEnabled) {
281 279
         // This Promise never resolves as user gets redirected to another URL
282
-        return new Promise(function (resolve, reject) {
283
-            redirectToTokenAuthService(roomName);
284
-        });
280
+        return new Promise(() => redirectToTokenAuthService(roomName));
285 281
     } else {
286 282
         return showXmppPasswordPrompt(roomName, connect);
287 283
     }
288 284
 }
289 285
 
290
-
291 286
 export default {
292 287
     authenticate,
293 288
     requireAuth,

+ 2
- 2
modules/UI/authentication/LoginDialog.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, APP, config*/
1
+/* global APP, config */
2 2
 
3 3
 /**
4 4
  * Build html for "password required" dialog.
@@ -109,7 +109,7 @@ function LoginDialog(successCallback, cancelCallback) {
109 109
             html:   '<div id="errorMessage"></div>',
110 110
             buttons: finishedButtons,
111 111
             defaultButton: 0,
112
-            submit: function (e, v, m, f) {
112
+            submit: function (e, v) {
113 113
                 e.preventDefault();
114 114
                 if (v === 'retry') {
115 115
                     connDialog.goToState('login');

+ 1
- 1
modules/UI/authentication/RoomLocker.js Voir le fichier

@@ -51,7 +51,7 @@ function askForPassword () {
51 51
         APP.UI.messageHandler.openTwoButtonDialog(
52 52
             null, null, null, msg,
53 53
             true, "dialog.Ok",
54
-            function (e, v, m, f) {}, null,
54
+            function () {}, null,
55 55
             function (e, v, m, f) {
56 56
                 if (v && f.lockKey) {
57 57
                     resolve(UIUtil.escapeHtml(f.lockKey));

+ 1
- 1
modules/UI/etherpad/Etherpad.js Voir le fichier

@@ -2,7 +2,6 @@
2 2
 
3 3
 import VideoLayout from "../videolayout/VideoLayout";
4 4
 import LargeContainer from '../videolayout/LargeContainer';
5
-import UIUtil from "../util/UIUtil";
6 5
 import UIEvents from "../../../service/UI/UIEvents";
7 6
 import FilmStrip from '../videolayout/FilmStrip';
8 7
 
@@ -101,6 +100,7 @@ class Etherpad extends LargeContainer {
101 100
         return document.getElementById('etherpad');
102 101
     }
103 102
 
103
+    // eslint-disable-next-line no-unused-vars
104 104
     resize (containerWidth, containerHeight, animate) {
105 105
         let height = containerHeight - FilmStrip.getFilmStripHeight();
106 106
         let width = containerWidth;

+ 2
- 2
modules/UI/feedback/Feedback.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, APP, config, interfaceConfig, JitsiMeetJS */
1
+/* global $, APP, JitsiMeetJS */
2 2
 import UIEvents from "../../../service/UI/UIEvents";
3 3
 import FeedabckWindow from "./FeedbackWindow";
4 4
 
@@ -125,4 +125,4 @@ var Feedback = {
125 125
     }
126 126
 };
127 127
 
128
-module.exports = Feedback;
128
+module.exports = Feedback;

+ 12
- 8
modules/UI/feedback/FeedbackWindow.js Voir le fichier

@@ -1,5 +1,4 @@
1 1
 /* global $, APP, interfaceConfig, AJS */
2
-/* jshint -W101 */
3 2
 
4 3
 const selector = '#aui-feedback-dialog';
5 4
 
@@ -9,21 +8,21 @@ const selector = '#aui-feedback-dialog';
9 8
  *
10 9
  * @param starCount the number of stars, for which to toggle the css class
11 10
  */
12
-let toggleStars = function(starCount) {
11
+function toggleStars(starCount) {
13 12
     $('#stars > a').each(function(index, el) {
14 13
         if (index <= starCount) {
15 14
             el.classList.add("starHover");
16 15
         } else
17 16
             el.classList.remove("starHover");
18 17
     });
19
-};
18
+}
20 19
 
21 20
 /**
22 21
  * Constructs the html for the rated feedback window.
23 22
  *
24 23
  * @returns {string} the contructed html string
25 24
  */
26
-let createRateFeedbackHTML = function (Feedback) {
25
+function createRateFeedbackHTML() {
27 26
     let rateExperience
28 27
             = APP.translation.translateString('dialog.rateExperience'),
29 28
         feedbackHelp = APP.translation.translateString('dialog.feedbackHelp');
@@ -58,17 +57,22 @@ let createRateFeedbackHTML = function (Feedback) {
58 57
                     <p>&nbsp;</p>
59 58
                     <p>${ feedbackHelp }</p>
60 59
                 </div>
61
-                <textarea id="feedbackTextArea" rows="10" cols="40" autofocus></textarea>
60
+                <textarea id="feedbackTextArea" rows="10" cols="40" autofocus>
61
+                </textarea>
62 62
             </form>
63 63
             <footer class="aui-dialog2-footer feedback__footer">
64 64
                 <div class="aui-dialog2-footer-actions">
65
-                    <button id="dialog-close-button" class="aui-button aui-button_close">Close</button>
66
-                    <button id="dialog-submit-button" class="aui-button aui-button_submit">Submit</button>
65
+                    <button
66
+                        id="dialog-close-button"
67
+                        class="aui-button aui-button_close">Close</button>
68
+                    <button
69
+                        id="dialog-submit-button"
70
+                        class="aui-button aui-button_submit">Submit</button>
67 71
                 </div>
68 72
             </footer>
69 73
         </div>
70 74
 `;
71
-};
75
+}
72 76
 
73 77
 /**
74 78
  * Callback for Rate Feedback

+ 2
- 2
modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, APP, JitsiMeetJS */
1
+/* global $, APP */
2 2
 
3 3
 let $overlay;
4 4
 
@@ -43,4 +43,4 @@ export default {
43 43
     hide() {
44 44
         $overlay && $overlay.detach();
45 45
     }
46
-};
46
+};

+ 2
- 2
modules/UI/recording/Recording.js Voir le fichier

@@ -97,7 +97,7 @@ function _requestLiveStreamId() {
97 97
                 ],
98 98
                 focus: ':input:first',
99 99
                 defaultButton: 1,
100
-                submit: function (e, v, m, f) {
100
+                submit: function (e, v) {
101 101
                     e.preventDefault();
102 102
                     if (v === 0) {
103 103
                         reject(APP.UI.messageHandler.CANCEL);
@@ -177,7 +177,7 @@ function _showStopRecordingPrompt (recordingType) {
177 177
             null,
178 178
             false,
179 179
             buttonKey,
180
-            function(e,v,m,f) {
180
+            function(e,v) {
181 181
                 if (v) {
182 182
                     resolve();
183 183
                 } else {

+ 2
- 2
modules/UI/shared_video/SharedVideo.js Voir le fichier

@@ -729,7 +729,7 @@ function showStopVideoPropmpt() {
729 729
             null,
730 730
             false,
731 731
             "dialog.Remove",
732
-            function(e,v,m,f) {
732
+            function(e,v) {
733 733
                 if (v) {
734 734
                     resolve();
735 735
                 } else {
@@ -811,7 +811,7 @@ function requestVideoLink() {
811 811
                 ],
812 812
                 focus: ':input:first',
813 813
                 defaultButton: 1,
814
-                submit: function (e, v, m, f) {
814
+                submit: function (e, v) {
815 815
                     e.preventDefault();
816 816
                     if (v === 0) {
817 817
                         reject();

+ 0
- 1
modules/UI/side_pannels/chat/Commands.js Voir le fichier

@@ -1,4 +1,3 @@
1
-/* global APP */
2 1
 import UIUtil from '../../util/UIUtil';
3 2
 import UIEvents from '../../../../service/UI/UIEvents';
4 3
 

+ 0
- 5
modules/UI/side_pannels/contactlist/ContactList.js Voir le fichier

@@ -4,7 +4,6 @@ import UIEvents from '../../../../service/UI/UIEvents';
4 4
 import UIUtil from '../../util/UIUtil';
5 5
 
6 6
 let numberOfContacts = 0;
7
-let notificationInterval;
8 7
 
9 8
 /**
10 9
  * Updates the number of participants in the contact list button and sets
@@ -61,10 +60,6 @@ function getContactEl (id) {
61 60
     return $(`#contacts>li[id="${id}"]`);
62 61
 }
63 62
 
64
-function contactElExists (id) {
65
-    return getContactEl(id).length > 0;
66
-}
67
-
68 63
 /**
69 64
  * Contact list.
70 65
  */

+ 2
- 3
modules/UI/side_pannels/profile/Profile.js Voir le fichier

@@ -1,7 +1,6 @@
1
-/* global APP, $, JitsiMeetJS */
1
+/* global $ */
2 2
 import UIUtil from "../../util/UIUtil";
3 3
 import UIEvents from "../../../../service/UI/UIEvents";
4
-import languages from "../../../../service/translation/languages";
5 4
 import Settings from '../../../settings/Settings';
6 5
 
7 6
 export default {
@@ -58,4 +57,4 @@ export default {
58 57
     changeAvatar (avatarUrl) {
59 58
         $('#avatar').attr('src', avatarUrl);
60 59
     }
61
-};
60
+};

+ 2
- 2
modules/UI/side_pannels/settings/SettingsMenu.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global APP, $, JitsiMeetJS, interfaceConfig */
1
+/* global APP, $, JitsiMeetJS */
2 2
 import UIUtil from "../../util/UIUtil";
3 3
 import UIEvents from "../../../../service/UI/UIEvents";
4 4
 import languages from "../../../../service/translation/languages";
@@ -268,4 +268,4 @@ export default {
268 268
 
269 269
         APP.translation.translateElement($('#settings_container option'));
270 270
     }
271
-};
271
+};

+ 7
- 4
modules/UI/toolbars/Toolbar.js Voir le fichier

@@ -1,5 +1,4 @@
1 1
 /* global APP, $, config, interfaceConfig, JitsiMeetJS */
2
-/* jshint -W101 */
3 2
 import UIUtil from '../util/UIUtil';
4 3
 import UIEvents from '../../../service/UI/UIEvents';
5 4
 import SideContainerToggler from "../side_pannels/SideContainerToggler";
@@ -350,7 +349,11 @@ function showSipNumberInput () {
350 349
     APP.UI.messageHandler.openTwoButtonDialog(
351 350
         null, null, null,
352 351
         `<h2>${sipMsg}</h2>
353
-            <input name="sipNumber" type="text" value="${defaultNumber}" autofocus>`,
352
+            <input
353
+                name="sipNumber"
354
+                type="text"
355
+                value="${defaultNumber}"
356
+                autofocus>`,
354 357
         false, "dialog.Dial",
355 358
         function (e, v, m, f) {
356 359
             if (v && f.sipNumber) {
@@ -739,7 +742,7 @@ const Toolbar = {
739 742
     /**
740 743
      * Handles the side toolbar toggle.
741 744
      */
742
-    _handleSideToolbarContainerToggled(containerId, isVisible) {
745
+    _handleSideToolbarContainerToggled(containerId) {
743 746
         Object.keys(defaultToolbarButtons).forEach(
744 747
             id => {
745 748
                 if (!UIUtil.isButtonEnabled(id))
@@ -819,4 +822,4 @@ const Toolbar = {
819 822
     }
820 823
 };
821 824
 
822
-export default Toolbar;
825
+export default Toolbar;

+ 1
- 2
modules/UI/toolbars/ToolbarToggler.js Voir le fichier

@@ -3,7 +3,6 @@
3 3
 import UIUtil from '../util/UIUtil';
4 4
 import Toolbar from './Toolbar';
5 5
 import SideContainerToggler from "../side_pannels/SideContainerToggler";
6
-import FilmStrip from '../videolayout/FilmStrip.js';
7 6
 
8 7
 let toolbarTimeoutObject;
9 8
 let toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
@@ -27,7 +26,7 @@ function showDesktopSharingButton() {
27 26
  * @param force {true} to force the hiding of the toolbar without caring about
28 27
  * the extended toolbar side panels.
29 28
  */
30
-function hideToolbar(force) {
29
+function hideToolbar(force) { // eslint-disable-line no-unused-vars
31 30
     if (alwaysVisibleToolbar) {
32 31
         return;
33 32
     }

+ 3
- 3
modules/UI/util/MessageHandler.js Voir le fichier

@@ -1,5 +1,4 @@
1
-/* global $, APP, jQuery, toastr, Impromptu */
2
-/* jshint -W101 */
1
+/* global $, APP, toastr, Impromptu */
3 2
 
4 3
 import UIUtil from './UIUtil';
5 4
 
@@ -274,7 +273,8 @@ var messageHandler = {
274 273
             displayNameSpan + '<br>' +
275 274
             '<span class=' + cls + ' data-i18n="' + messageKey + '"' +
276 275
                 (messageArguments?
277
-                    " data-i18n-options='" + JSON.stringify(messageArguments) + "'"
276
+                    " data-i18n-options='" + JSON.stringify(messageArguments)
277
+                        + "'"
278 278
                     : "") + ">" +
279 279
             APP.translation.translateString(messageKey,
280 280
                 messageArguments) +

+ 1
- 1
modules/UI/util/UIUtil.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, APP, config, AJS, interfaceConfig */
1
+/* global $, APP, AJS, interfaceConfig */
2 2
 
3 3
 import KeyboardShortcut from '../../keyboardshortcut/keyboardshortcut';
4 4
 

+ 1
- 1
modules/UI/videolayout/ConnectionIndicator.js Voir le fichier

@@ -416,7 +416,7 @@ ConnectionIndicator.prototype.updateResolutionIndicator = function () {
416 416
         else if (this.resolution !== null) {
417 417
             let resolutions = this.resolution || {};
418 418
             Object.keys(resolutions).map(function (ssrc) {
419
-                    let {width, height} = resolutions[ssrc];
419
+                    const { height } = resolutions[ssrc];
420 420
                     if (height >= config.minHDHeight)
421 421
                         showResolutionLabel = true;
422 422
                 });

+ 1
- 1
modules/UI/videolayout/FilmStrip.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, APP, interfaceConfig, config*/
1
+/* global $, interfaceConfig */
2 2
 
3 3
 import UIEvents from "../../../service/UI/UIEvents";
4 4
 import UIUtil from "../util/UIUtil";

+ 5
- 4
modules/UI/videolayout/LargeContainer.js Voir le fichier

@@ -24,19 +24,20 @@ export default class LargeContainer {
24 24
      * @param {number} containerHeight available height
25 25
      * @param {boolean} animate if container should animate it's resize process
26 26
      */
27
+    // eslint-disable-next-line no-unused-vars
27 28
     resize (containerWidth, containerHeight, animate) {
28 29
     }
29 30
 
30 31
     /**
31 32
      * Handler for "hover in" events.
32 33
      */
33
-    onHoverIn (e) {
34
+    onHoverIn (e) { // eslint-disable-line no-unused-vars
34 35
     }
35 36
 
36 37
     /**
37 38
      * Handler for "hover out" events.
38 39
      */
39
-    onHoverOut (e) {
40
+    onHoverOut (e) { // eslint-disable-line no-unused-vars
40 41
     }
41 42
 
42 43
     /**
@@ -44,14 +45,14 @@ export default class LargeContainer {
44 45
      * @param {JitsiTrack?} stream new stream
45 46
      * @param {string} videoType video type
46 47
      */
47
-    setStream (stream, videoType) {
48
+    setStream (stream, videoType) { // eslint-disable-line no-unused-vars
48 49
     }
49 50
 
50 51
     /**
51 52
      * Show or hide user avatar.
52 53
      * @param {boolean} show
53 54
      */
54
-    showAvatar (show) {
55
+    showAvatar (show) { // eslint-disable-line no-unused-vars
55 56
     }
56 57
 
57 58
     /**

+ 0
- 3
modules/UI/videolayout/LargeVideoManager.js Voir le fichier

@@ -1,13 +1,10 @@
1 1
 /* global $, APP, interfaceConfig */
2
-/* jshint -W101 */
3 2
 
4 3
 import Avatar from "../avatar/Avatar";
5 4
 import {createDeferred} from '../../util/helpers';
6 5
 import UIUtil from "../util/UIUtil";
7 6
 import {VideoContainer, VIDEO_CONTAINER_TYPE} from "./VideoContainer";
8 7
 
9
-import LargeContainer from "./LargeContainer";
10
-
11 8
 import AudioLevels from "../audio_levels/AudioLevels";
12 9
 
13 10
 /**

+ 2
- 18
modules/UI/videolayout/LocalVideo.js Voir le fichier

@@ -34,26 +34,10 @@ function LocalVideo(VideoLayout, emitter) {
34 34
 LocalVideo.prototype = Object.create(SmallVideo.prototype);
35 35
 LocalVideo.prototype.constructor = LocalVideo;
36 36
 
37
-/**
38
- * Creates the edit display name button.
39
- *
40
- * @returns {object} the edit button
41
- */
42
-function createEditDisplayNameButton() {
43
-    var editButton = document.createElement('a');
44
-    editButton.className = 'displayname';
45
-    UIUtil.setTooltip(editButton,
46
-        "videothumbnail.editnickname",
47
-        "left");
48
-    editButton.innerHTML = '<i class="icon-edit"></i>';
49
-
50
-    return editButton;
51
-}
52
-
53 37
 /**
54 38
  * Sets the display name for the given video span id.
55 39
  */
56
-LocalVideo.prototype.setDisplayName = function(displayName, key) {
40
+LocalVideo.prototype.setDisplayName = function(displayName) {
57 41
     if (!this.container) {
58 42
         console.warn(
59 43
                 "Unable to set displayName - " + this.videoSpanId +
@@ -138,7 +122,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
138 122
                 $editDisplayName.focus();
139 123
                 $editDisplayName.select();
140 124
 
141
-                $editDisplayName.one("focusout", function (e) {
125
+                $editDisplayName.one("focusout", function () {
142 126
                     self.emitter.emit(UIEvents.NICKNAME_CHANGED, this.value);
143 127
                     $editDisplayName.hide();
144 128
                     $localDisplayName.show();

+ 1
- 4
modules/UI/videolayout/RemoteVideo.js Voir le fichier

@@ -3,7 +3,6 @@
3 3
 import ConnectionIndicator from './ConnectionIndicator';
4 4
 
5 5
 import SmallVideo from "./SmallVideo";
6
-import AudioLevels from "../audio_levels/AudioLevels";
7 6
 import UIUtils from "../util/UIUtil";
8 7
 import UIEvents from '../../../service/UI/UIEvents';
9 8
 import JitsiPopover from "../util/JitsiPopover";
@@ -61,8 +60,7 @@ RemoteVideo.prototype.addRemoteVideoContainer = function() {
61 60
         this.addRemoteVideoMenu();
62 61
     }
63 62
 
64
-    let { remoteVideo } = this.VideoLayout.resizeThumbnails(false, true);
65
-    let { thumbHeight, thumbWidth } = remoteVideo;
63
+    this.VideoLayout.resizeThumbnails(false, true);
66 64
 
67 65
     this.addAudioLevelIndicator();
68 66
 
@@ -429,7 +427,6 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) {
429 427
         return;
430 428
 
431 429
     let streamElement = SmallVideo.createStreamElement(stream);
432
-    let newElementId = streamElement.id;
433 430
 
434 431
     // Put new stream element always in front
435 432
     UIUtils.prependChild(this.container, streamElement);

+ 3
- 4
modules/UI/videolayout/SmallVideo.js Voir le fichier

@@ -574,7 +574,6 @@ SmallVideo.prototype.getIndicatorSpan = function(id) {
574 574
  * is added, and will fire a RESOLUTION_CHANGED event.
575 575
  */
576 576
 SmallVideo.prototype.waitForResolutionChange = function() {
577
-    let self = this;
578 577
     let beforeChange = window.performance.now();
579 578
     let videos = this.selectVideoElement();
580 579
     if (!videos || !videos.length || videos.length <= 0)
@@ -582,17 +581,17 @@ SmallVideo.prototype.waitForResolutionChange = function() {
582 581
     let video = videos[0];
583 582
     let oldWidth = video.videoWidth;
584 583
     let oldHeight = video.videoHeight;
585
-    video.onresize = (event) => {
584
+    video.onresize = () => {
586 585
         if (video.videoWidth != oldWidth || video.videoHeight != oldHeight) {
587 586
             // Only run once.
588 587
             video.onresize = null;
589 588
 
590 589
             let delay = window.performance.now() - beforeChange;
591
-            let emitter = self.VideoLayout.getEventEmitter();
590
+            let emitter = this.VideoLayout.getEventEmitter();
592 591
             if (emitter) {
593 592
                 emitter.emit(
594 593
                         UIEvents.RESOLUTION_CHANGED,
595
-                        self.getId(),
594
+                        this.getId(),
596 595
                         oldWidth + "x" + oldHeight,
597 596
                         video.videoWidth + "x" + video.videoHeight,
598 597
                         delay);

+ 1
- 6
modules/UI/videolayout/VideoContainer.js Voir le fichier

@@ -139,11 +139,7 @@ function getCameraVideoPosition(videoWidth,
139 139
  * @return an array with 2 elements, the horizontal indent and the vertical
140 140
  * indent
141 141
  */
142
-function getDesktopVideoPosition(videoWidth,
143
-                                 videoHeight,
144
-                                 videoSpaceWidth,
145
-                                 videoSpaceHeight) {
146
-
142
+function getDesktopVideoPosition(videoWidth, videoHeight, videoSpaceWidth) {
147 143
     let horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
148 144
 
149 145
     let verticalIndent = 0;// Top aligned
@@ -428,7 +424,6 @@ export class VideoContainer extends LargeContainer {
428 424
             return Promise.resolve();
429 425
         }
430 426
 
431
-        let $wrapper = this.$wrapper;
432 427
         return new Promise((resolve) => {
433 428
             this.$wrapper.css('visibility', 'visible').fadeTo(
434 429
                 FADE_DURATION_MS,

+ 6
- 12
modules/UI/videolayout/VideoLayout.js Voir le fichier

@@ -1,7 +1,5 @@
1
-/* global config, APP, $, interfaceConfig, JitsiMeetJS */
2
-/* jshint -W101 */
1
+/* global config, APP, $, interfaceConfig */
3 2
 
4
-import Avatar from "../avatar/Avatar";
5 3
 import FilmStrip from "./FilmStrip";
6 4
 import UIEvents from "../../../service/UI/UIEvents";
7 5
 import UIUtil from "../util/UIUtil";
@@ -9,11 +7,8 @@ import UIUtil from "../util/UIUtil";
9 7
 import RemoteVideo from "./RemoteVideo";
10 8
 import LargeVideoManager  from "./LargeVideoManager";
11 9
 import {VIDEO_CONTAINER_TYPE} from "./VideoContainer";
12
-import {SHARED_VIDEO_CONTAINER_TYPE} from '../shared_video/SharedVideo';
13 10
 import LocalVideo from "./LocalVideo";
14 11
 
15
-const RTCUIUtil = JitsiMeetJS.util.RTCUIHelper;
16
-
17 12
 var remoteVideos = {};
18 13
 var localVideoThumbnail = null;
19 14
 
@@ -106,7 +101,7 @@ var VideoLayout = {
106 101
         localVideoThumbnail.setVideoType(VIDEO_CONTAINER_TYPE);
107 102
         // if we do not resize the thumbs here, if there is no video device
108 103
         // the local video thumb maybe one pixel
109
-        let { localVideo } = this.resizeThumbnails(false, true);
104
+        this.resizeThumbnails(false, true);
110 105
 
111 106
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
112 107
         this.lastNCount = config.channelLastN;
@@ -316,7 +311,8 @@ var VideoLayout = {
316 311
     onRemoteStreamRemoved (stream) {
317 312
         let id = stream.getParticipantId();
318 313
         let remoteVideo = remoteVideos[id];
319
-        if (remoteVideo) { // remote stream may be removed after participant left the conference
314
+        // Remote stream may be removed after participant left the conference.
315
+        if (remoteVideo) {
320 316
             remoteVideo.removeRemoteStreamElement(stream);
321 317
         }
322 318
     },
@@ -519,12 +515,9 @@ var VideoLayout = {
519 515
     resizeThumbnails (  animate = false,
520 516
                         forceUpdate = false,
521 517
                         onComplete = null) {
522
-
523
-        let { localVideo, remoteVideo }
518
+        const { localVideo, remoteVideo }
524 519
             = FilmStrip.calculateThumbnailSize();
525 520
 
526
-        let {thumbWidth, thumbHeight} = remoteVideo;
527
-
528 521
         FilmStrip.resizeThumbnails(localVideo, remoteVideo,
529 522
             animate, forceUpdate)
530 523
             .then(function () {
@@ -653,6 +646,7 @@ var VideoLayout = {
653 646
      * @param {boolean} isActive true if the connection is ok or false when
654 647
      * the user is having connectivity issues.
655 648
      */
649
+    // eslint-disable-next-line no-unused-vars
656 650
     onParticipantConnectionStatusChanged (id, isActive) {
657 651
         // Show/hide warning on the large video
658 652
         if (this.isCurrentlyOnLarge(id)) {

+ 0
- 2
modules/UI/welcome_page/WelcomePage.js Voir le fichier

@@ -75,8 +75,6 @@ function setupWelcomePage() {
75 75
     });
76 76
 
77 77
     if (interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE !== false) {
78
-        var updateTimeout;
79
-        var animateTimeout;
80 78
         var selector = $("#reload_roomname");
81 79
         selector.click(function () {
82 80
             clearTimeout(updateTimeout);

+ 2
- 2
modules/config/HttpConfigFetch.js Voir le fichier

@@ -32,7 +32,7 @@ var HttpConfig = {
32 32
                     var error = "Get config response status: " + textStatus;
33 33
                     complete(false, error);
34 34
                 },
35
-                success: function(data, textStatus, jqXHR) {
35
+                success: function(data) {
36 36
                     try {
37 37
                         configUtil.overrideConfigJSON(
38 38
                             config, interfaceConfig, data);
@@ -48,4 +48,4 @@ var HttpConfig = {
48 48
     }
49 49
 };
50 50
 
51
-module.exports = HttpConfig;
51
+module.exports = HttpConfig;

+ 1
- 1
modules/config/URLProcessor.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, $iq, config, interfaceConfig, getConfigParamsFromUrl */
1
+/* global config, interfaceConfig, getConfigParamsFromUrl */
2 2
 var configUtils = require('./Util');
3 3
 var params = {};
4 4
 

+ 1
- 2
modules/config/Util.js Voir le fichier

@@ -1,4 +1,3 @@
1
-/* global $ */
2 1
 var ConfigUtil = {
3 2
     /**
4 3
      * Method overrides JSON properties in <tt>config</tt> and
@@ -42,4 +41,4 @@ var ConfigUtil = {
42 41
     }
43 42
 };
44 43
 
45
-module.exports = ConfigUtil;
44
+module.exports = ConfigUtil;

+ 0
- 2
modules/connectionquality/connectionquality.js Voir le fichier

@@ -1,5 +1,3 @@
1
-/* global APP, require */
2
-/* jshint -W101 */
3 1
 import EventEmitter from "events";
4 2
 
5 3
 import CQEvents from "../../service/connectionquality/CQEvents";

+ 2
- 2
modules/devices/mediaDeviceHelper.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global $, APP, JitsiMeetJS, config, interfaceConfig */
1
+/* global APP, JitsiMeetJS */
2 2
 
3 3
 let currentAudioInputDevices,
4 4
     currentVideoInputDevices,
@@ -243,4 +243,4 @@ export default {
243 243
                 });
244 244
         }
245 245
     }
246
-};
246
+};

+ 2
- 3
modules/recorder/Recorder.js Voir le fichier

@@ -1,4 +1,4 @@
1
-/* global APP, $, config */
1
+/* global APP, config */
2 2
 
3 3
 /**
4 4
  * The (name of the) command which transports the recorder info.
@@ -26,7 +26,6 @@ class Recorder {
26 26
         // which are to be followed so don't forget to removeCommand before
27 27
         // sendCommand!
28 28
         commands.removeCommand(_USER_INFO_COMMAND);
29
-        var self = this;
30 29
         commands.sendCommand(
31 30
             _USER_INFO_COMMAND,
32 31
             {
@@ -38,4 +37,4 @@ class Recorder {
38 37
     }
39 38
 }
40 39
 
41
-export default Recorder;
40
+export default Recorder;

+ 5
- 7
modules/translation/translation.js Voir le fichier

@@ -3,11 +3,9 @@ var i18n = require("i18next-client");
3 3
 var languages = require("../../service/translation/languages");
4 4
 var DEFAULT_LANG = languages.EN;
5 5
 
6
-i18n.addPostProcessor("resolveAppName", function(value, key, options) {
7
-    return value.replace("__app__", interfaceConfig.APP_NAME);
8
-});
9
-
10
-
6
+i18n.addPostProcessor(
7
+    "resolveAppName",
8
+    value => value.replace("__app__", interfaceConfig.APP_NAME));
11 9
 
12 10
 var defaultOptions = {
13 11
     detectLngQS: "lang",
@@ -34,7 +32,7 @@ var defaultOptions = {
34 32
                                                  { lng: lng, ns: ns });
35 33
         i18n.functions.ajax({
36 34
             url: url,
37
-            success: function(data, status, xhr) {
35
+            success: function(data) {
38 36
                 i18n.functions.log('loaded: ' + url);
39 37
                 done(null, data);
40 38
             },
@@ -63,7 +61,7 @@ var defaultOptions = {
63 61
 //                localStorageExpirationTime: 86400000 // in ms, default 1 week
64 62
 };
65 63
 
66
-function initCompleted(t) {
64
+function initCompleted() {
67 65
     $("[data-i18n]").i18n();
68 66
 }
69 67
 

+ 2
- 1
package.json Voir le fichier

@@ -44,6 +44,7 @@
44 44
     "babel-register": "*",
45 45
     "clean-css": "*",
46 46
     "css-loader": "*",
47
+    "eslint": "*",
47 48
     "expose-loader": "*",
48 49
     "file-loader": "*",
49 50
     "imports-loader": "*",
@@ -56,7 +57,7 @@
56 57
   },
57 58
   "license": "Apache-2.0",
58 59
   "scripts": {
59
-    "lint": "jshint .",
60
+    "lint": "jshint . && eslint .",
60 61
     "validate": "npm ls"
61 62
   },
62 63
   "pre-commit": [

+ 2
- 1
utils.js Voir le fichier

@@ -9,7 +9,7 @@
9 9
 /**
10 10
  * Builds and returns the room name.
11 11
  */
12
-function getRoomName () {
12
+function getRoomName () { // eslint-disable-line no-unused-vars
13 13
     var path = window.location.pathname;
14 14
     var roomName;
15 15
 
@@ -42,6 +42,7 @@ function getRoomName () {
42 42
  * @param dontParse if false or undefined some transformations
43 43
  * (for parsing the value as JSON) are going to be executed
44 44
  */
45
+// eslint-disable-next-line no-unused-vars
45 46
 function getConfigParamsFromUrl(source, dontParse) {
46 47
     var paramStr = (source === "search")? location.search : location.hash;
47 48
     if (!paramStr)

+ 2
- 1
webpack.config.babel.js Voir le fichier

@@ -1,5 +1,6 @@
1
+/* global __dirname */
2
+
1 3
 import process from 'process';
2
-import webpack from 'webpack';
3 4
 
4 5
 const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
5 6
 const minimize

Chargement…
Annuler
Enregistrer