Browse Source

fix(eslint): Add no-extra-bind rule

dev1
hristoterezov 8 years ago
parent
commit
8a14f1e7bc
6 changed files with 6 additions and 5 deletions
  1. 1
    0
      .eslintrc.js
  2. 1
    1
      JitsiConnection.js
  3. 1
    1
      JitsiMeetJS.js
  4. 1
    1
      modules/xmpp/ChatRoom.js
  5. 1
    1
      modules/xmpp/JingleSessionPC.js
  6. 1
    1
      modules/xmpp/moderator.js

+ 1
- 0
.eslintrc.js View File

@@ -87,6 +87,7 @@ module.exports = {
87 87
         'no-eq-null': 2,
88 88
         'no-eval': 2,
89 89
         'no-extend-native': 2,
90
+        'no-extra-bind': 2,
90 91
         'no-extra-label': 2,
91 92
         'no-fallthrough': 2,
92 93
         'no-floating-decimal': 2,

+ 1
- 1
JitsiConnection.js View File

@@ -22,7 +22,7 @@ function JitsiConnection(appID, token, options) {
22 22
             // sends analytics and callstats event
23 23
             Statistics.sendEventToAll('connection.failed.' + errType,
24 24
                 {label: msg});
25
-        }.bind(this));
25
+        });
26 26
 
27 27
     this.addEventListener(JitsiConnectionEvents.CONNECTION_DISCONNECTED,
28 28
         function(msg) {

+ 1
- 1
JitsiMeetJS.js View File

@@ -322,7 +322,7 @@ const LibJitsiMeet = {
322 322
                     = window.performance.now();
323 323
 
324 324
                 return Promise.reject(error);
325
-            }.bind(this));
325
+            });
326 326
     },
327 327
     /**
328 328
      * Checks if its possible to enumerate available cameras/micropones.

+ 1
- 1
modules/xmpp/ChatRoom.js View File

@@ -207,7 +207,7 @@ export default class ChatRoom extends Listenable {
207 207
         }.bind(this), function(error) {
208 208
             GlobalOnErrorHandler.callErrorHandler(error);
209 209
             logger.error('Error getting room info: ', error);
210
-        }.bind(this));
210
+        });
211 211
     }
212 212
 
213 213
 

+ 1
- 1
modules/xmpp/JingleSessionPC.js View File

@@ -1359,7 +1359,7 @@ export default class JingleSessionPC extends JingleSession {
1359 1359
             if (failureCb) {
1360 1360
                 failureCb(error);
1361 1361
             }
1362
-        }.bind(this);
1362
+        };
1363 1363
     }
1364 1364
 
1365 1365
     static onJingleFatalError(session, error) {

+ 1
- 1
modules/xmpp/moderator.js View File

@@ -476,7 +476,7 @@ Moderator.prototype.logout = function(callback) {
476 476
             logger.info('Log out OK, url: ' + logoutUrl, result);
477 477
             Settings.clearSessionId();
478 478
             callback(logoutUrl);
479
-        }.bind(this),
479
+        },
480 480
         function(error) {
481 481
             const errmsg = 'Logout error';
482 482
             GlobalOnErrorHandler.callErrorHandler(new Error(errmsg));

Loading…
Cancel
Save