Ver código fonte

[eslint] block-spacing

dev1
Lyubo Marinov 8 anos atrás
pai
commit
eb0ae19d0f
3 arquivos alterados com 6 adições e 5 exclusões
  1. 1
    0
      .eslintrc.js
  2. 4
    4
      modules/statistics/RTPStatsCollector.js
  3. 1
    1
      modules/xmpp/SDPUtil.js

+ 1
- 0
.eslintrc.js Ver arquivo

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

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

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

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

@@ -308,7 +308,7 @@ const SDPUtil = {
308 308
 
309 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 312
             line = line.substring(0, line.length - 2);
313 313
         }
314 314
         const candidate = {};

Carregando…
Cancelar
Salvar