Ver código fonte

[eslint] no-mixed-operators

tags/v0.0.2
Lyubo Marinov 8 anos atrás
pai
commit
6fcad0c307

+ 1
- 0
.eslintrc.js Ver arquivo

151
         'new-parens': 2,
151
         'new-parens': 2,
152
         'no-array-constructor': 2,
152
         'no-array-constructor': 2,
153
         'no-inline-comments': 0,
153
         'no-inline-comments': 0,
154
+        'no-mixed-operators': 2,
154
         'no-mixed-spaces-and-tabs': 2,
155
         'no-mixed-spaces-and-tabs': 2,
155
         'no-multiple-empty-lines': 2,
156
         'no-multiple-empty-lines': 2,
156
         'no-negated-condition': 2,
157
         'no-negated-condition': 2,

+ 7
- 5
modules/connectivity/ConnectionQuality.js Ver arquivo

321
             const maxIncreasePerSecond = 2;
321
             const maxIncreasePerSecond = 2;
322
             const prevConnectionQuality = this._localStats.connectionQuality;
322
             const prevConnectionQuality = this._localStats.connectionQuality;
323
             const diffSeconds
323
             const diffSeconds
324
-                = (window.performance.now()
325
-                    - this._lastConnectionQualityUpdate) / 1000;
326
-            quality = Math.min(
327
-                quality,
328
-                prevConnectionQuality + diffSeconds * maxIncreasePerSecond);
324
+                = (window.performance.now() - this._lastConnectionQualityUpdate)
325
+                    / 1000;
326
+            quality
327
+                = Math.min(
328
+                    quality,
329
+                    prevConnectionQuality
330
+                        + (diffSeconds * maxIncreasePerSecond));
329
         }
331
         }
330
 
332
 
331
         return Math.min(100, quality);
333
         return Math.min(100, quality);

+ 3
- 2
modules/xmpp/SdpTransformUtil.js Ver arquivo

196
      */
196
      */
197
     findGroup(semantics, ssrcs) {
197
     findGroup(semantics, ssrcs) {
198
         return this.ssrcGroups.find(
198
         return this.ssrcGroups.find(
199
-            group => group.semantics === semantics
200
-                && !ssrcs || ssrcs === group.ssrcs);
199
+            group =>
200
+                group.semantics === semantics
201
+                    && (!ssrcs || ssrcs === group.ssrcs));
201
     }
202
     }
202
 
203
 
203
     /**
204
     /**

+ 1
- 3
modules/xmpp/recording.js Ver arquivo

6
 const JitsiRecorderErrors = require('../../JitsiRecorderErrors');
6
 const JitsiRecorderErrors = require('../../JitsiRecorderErrors');
7
 const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
7
 const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
8
 
8
 
9
-
10
 function Recording(type, eventEmitter, connection, focusMucJid, jirecon,
9
 function Recording(type, eventEmitter, connection, focusMucJid, jirecon,
11
     roomjid) {
10
     roomjid) {
12
     this.eventEmitter = eventEmitter;
11
     this.eventEmitter = eventEmitter;
18
     this.type = type;
17
     this.type = type;
19
     this._isSupported
18
     this._isSupported
20
         = !(
19
         = !(
21
-            type === Recording.types.JIRECON
22
-                && !this.jirecon
20
+            (type === Recording.types.JIRECON && !this.jirecon)
23
                 || (type !== Recording.types.JIBRI
21
                 || (type !== Recording.types.JIBRI
24
                     && type !== Recording.types.COLIBRI));
22
                     && type !== Recording.types.COLIBRI));
25
 
23
 

Carregando…
Cancelar
Salvar