Просмотр исходного кода

[eslint] no-useless-concat, no-useless-escape

dev1
Lyubo Marinov 8 лет назад
Родитель
Сommit
69e82e9fa6
3 измененных файлов: 4 добавлений и 1 удалений
  1. 2
    0
      .eslintrc.js
  2. 1
    1
      modules/xmpp/SDP.js
  3. 1
    0
      modules/xmpp/SDPUtil.js

+ 2
- 0
.eslintrc.js Просмотреть файл

@@ -121,6 +121,8 @@ module.exports = {
121 121
         ],
122 122
         'no-unused-labels': 2,
123 123
         'no-useless-call': 2,
124
+        'no-useless-concat': 2,
125
+        'no-useless-escape': 2,
124 126
         'no-void': 2,
125 127
         'no-warning-comments': 0,
126 128
         'no-with': 2,

+ 1
- 1
modules/xmpp/SDP.js Просмотреть файл

@@ -481,7 +481,7 @@ SDP.prototype.rtcpFbFromJingle = function(elem, payloadtype) { // XEP-0293
481 481
     let tmp = elem.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');
482 482
 
483 483
     if (tmp.length) {
484
-        media += 'a=rtcp-fb:' + '*' + ' ' + 'trr-int' + ' ';
484
+        media += 'a=rtcp-fb:* trr-int ';
485 485
         if (tmp.attr('value')) {
486 486
             media += tmp.attr('value');
487 487
         } else {

+ 1
- 0
modules/xmpp/SDPUtil.js Просмотреть файл

@@ -8,6 +8,7 @@ const SDPUtil = {
8 8
     filter_special_chars(text) {
9 9
         // XXX Neither one of the falsy values (e.g. null, undefined, false,
10 10
         // "", etc.) "contain" special chars.
11
+        // eslint-disable-next-line no-useless-escape
11 12
         return text ? text.replace(/[\\\/\{,\}\+]/g, '') : text;
12 13
     },
13 14
     iceparams(mediadesc, sessiondesc) {

Загрузка…
Отмена
Сохранить