Explorar el Código

[eslint] block-spacing

dev1
Lyubo Marinov hace 8 años
padre
commit
eb0ae19d0f
Se han modificado 3 ficheros con 6 adiciones y 5 borrados
  1. 1
    0
      .eslintrc.js
  2. 4
    4
      modules/statistics/RTPStatsCollector.js
  3. 1
    1
      modules/xmpp/SDPUtil.js

+ 1
- 0
.eslintrc.js Ver fichero

153
             'always',
153
             'always',
154
             { 'objectsInArrays': true }
154
             { 'objectsInArrays': true }
155
         ],
155
         ],
156
+        'block-spacing': [ 'error', 'always' ],
156
         'brace-style': 2,
157
         'brace-style': 2,
157
         'comma-style': 2,
158
         'comma-style': 2,
158
         'eol-last': 2,
159
         'eol-last': 2,

+ 4
- 4
modules/statistics/RTPStatsCollector.js Ver fichero

424
                     'upload': Math.round(sendBandwidth / 1000)
424
                     'upload': Math.round(sendBandwidth / 1000)
425
                 };
425
                 };
426
             }
426
             }
427
-        } catch(e) {/* not supported*/}
427
+        } catch(e) { /* not supported*/ }
428
 
428
 
429
         if(now.type == 'googCandidatePair') {
429
         if(now.type == 'googCandidatePair') {
430
             let active, ip, localip, type;
430
             let active, ip, localip, type;
434
                 type = getStatValue(now, 'transportType');
434
                 type = getStatValue(now, 'transportType');
435
                 localip = getStatValue(now, 'localAddress');
435
                 localip = getStatValue(now, 'localAddress');
436
                 active = getStatValue(now, 'activeConnection');
436
                 active = getStatValue(now, 'activeConnection');
437
-            } catch(e) {/* not supported*/}
437
+            } catch(e) { /* not supported*/ }
438
             if(!ip || !type || !localip || active != 'true') {
438
             if(!ip || !type || !localip || active != 'true') {
439
                 continue;
439
                 continue;
440
             }
440
             }
560
                 resolution.height = height;
560
                 resolution.height = height;
561
                 resolution.width = width;
561
                 resolution.width = width;
562
             }
562
             }
563
-        } catch(e) {/* not supported*/}
563
+        } catch(e) { /* not supported*/ }
564
 
564
 
565
         if (resolution.height && resolution.width) {
565
         if (resolution.height && resolution.width) {
566
             ssrcStats.setResolution(resolution);
566
             ssrcStats.setResolution(resolution);
671
             audioLevel
671
             audioLevel
672
                 = getStatValue(now, 'audioInputLevel')
672
                 = getStatValue(now, 'audioInputLevel')
673
                     || getStatValue(now, 'audioOutputLevel');
673
                     || getStatValue(now, 'audioOutputLevel');
674
-        } catch(e) {/* not supported*/
674
+        } catch(e) { /* not supported*/
675
             logger.warn('Audio Levels are not available in the statistics.');
675
             logger.warn('Audio Levels are not available in the statistics.');
676
             clearInterval(this.audioLevelsIntervalId);
676
             clearInterval(this.audioLevelsIntervalId);
677
 
677
 

+ 1
- 1
modules/xmpp/SDPUtil.js Ver fichero

308
 
308
 
309
             return null;
309
             return null;
310
         }
310
         }
311
-        if (line.substring(line.length - 2) == '\r\n') {// chomp it
311
+        if (line.substring(line.length - 2) == '\r\n') { // chomp it
312
             line = line.substring(0, line.length - 2);
312
             line = line.substring(0, line.length - 2);
313
         }
313
         }
314
         const candidate = {};
314
         const candidate = {};

Loading…
Cancelar
Guardar