Pārlūkot izejas kodu

fix(eslint): Add no-eq-null rule

dev1
hristoterezov 8 gadus atpakaļ
vecāks
revīzija
6095a3a95d

+ 1
- 0
.eslintrc.js Parādīt failu

84
         'no-else-return': 2,
84
         'no-else-return': 2,
85
         'no-empty-function': 2,
85
         'no-empty-function': 2,
86
         'no-empty-pattern': 2,
86
         'no-empty-pattern': 2,
87
+        'no-eq-null': 2,
87
         'no-eval': 2,
88
         'no-eval': 2,
88
         'no-extend-native': 2,
89
         'no-extend-native': 2,
89
         'no-extra-label': 2,
90
         'no-extra-label': 2,

+ 1
- 1
modules/RTC/TraceablePeerConnection.js Parādīt failu

201
  * Returns a string representation of a SessionDescription object.
201
  * Returns a string representation of a SessionDescription object.
202
  */
202
  */
203
 const dumpSDP = function(description) {
203
 const dumpSDP = function(description) {
204
-    if (typeof description === 'undefined' || description == null) {
204
+    if (typeof description === 'undefined' || description === null) {
205
         return '';
205
         return '';
206
     }
206
     }
207
 
207
 

+ 1
- 1
modules/xmpp/SDP.js Parādīt failu

263
                         // but msid stands for the stream id, makes no sense ?
263
                         // but msid stands for the stream id, makes no sense ?
264
                         msid = localTrack.getTrackId();
264
                         msid = localTrack.getTrackId();
265
                     }
265
                     }
266
-                    if(msid != null) {
266
+                    if(msid !== null) {
267
                         msid = SDPUtil.filter_special_chars(msid);
267
                         msid = SDPUtil.filter_special_chars(msid);
268
                         elem.c('parameter');
268
                         elem.c('parameter');
269
                         elem.attrs({name: 'msid', value:msid});
269
                         elem.attrs({name: 'msid', value:msid});

+ 1
- 1
modules/xmpp/xmpp.js Parādīt failu

281
         }
281
         }
282
         // Constant JIDs need some random part to be appended in order to be
282
         // Constant JIDs need some random part to be appended in order to be
283
         // able to join the MUC more than once.
283
         // able to join the MUC more than once.
284
-        if (this.authenticatedUser || cfgNickname != null) {
284
+        if (this.authenticatedUser || cfgNickname !== null) {
285
             mucNickname += '-' + RandomUtil.randomHexString(6);
285
             mucNickname += '-' + RandomUtil.randomHexString(6);
286
         }
286
         }
287
 
287
 

Notiek ielāde…
Atcelt
Saglabāt