Переглянути джерело

[eslint] space-infix-ops

dev1
Lyubo Marinov 8 роки тому
джерело
коміт
324afc0caf

+ 1
- 0
.eslintrc.js Переглянути файл

@@ -157,6 +157,7 @@ module.exports = {
157 157
         'padded-blocks': 0,
158 158
         'quote-props': 0,
159 159
         'semi': [ 'error', 'always' ],
160
+        'space-infix-ops': 2,
160 161
         'space-unary-ops': 2,
161 162
         'spaced-comment': 2,
162 163
         'unicode-bom': 0,

+ 1
- 1
JitsiConference.js Переглянути файл

@@ -1196,7 +1196,7 @@ JitsiConference.prototype.isDTMFSupported = function () {
1196 1196
  * @return {string} local user's ID
1197 1197
  */
1198 1198
 JitsiConference.prototype.myUserId = function () {
1199
-    return this.room && this.room.myroomjid? Strophe.getResourceFromJid(this.room.myroomjid) : null;
1199
+    return this.room && this.room.myroomjid ? Strophe.getResourceFromJid(this.room.myroomjid) : null;
1200 1200
 };
1201 1201
 
1202 1202
 JitsiConference.prototype.sendTones = function (tones, duration, pause) {

+ 1
- 1
JitsiTrackErrors.js Переглянути файл

@@ -18,7 +18,7 @@ export const CHROME_EXTENSION_INSTALLATION_ERROR
18 18
  * selection dialog in jidesha extension for Chrome.
19 19
  */
20 20
 export const CHROME_EXTENSION_USER_CANCELED
21
-    ="gum.chrome_extension_user_canceled";
21
+    = "gum.chrome_extension_user_canceled";
22 22
 /**
23 23
  * An error which indicates that some of requested constraints in
24 24
  * getUserMedia call were not satisfied.

+ 2
- 2
doc/example/example.js Переглянути файл

@@ -106,7 +106,7 @@ function onUserLeft(id) {
106 106
         return;
107 107
     }
108 108
     var tracks = remoteTracks[id];
109
-    for(var i = 0; i< tracks.length; i++) {
109
+    for(var i = 0; i < tracks.length; i++) {
110 110
         tracks[i].detach($("#" + id + tracks[i].getType()));
111 111
     }
112 112
 }
@@ -187,7 +187,7 @@ function switchVideo() { // eslint-disable-line no-unused-vars
187 187
         localTracks[1].dispose();
188 188
         localTracks.pop();
189 189
     }
190
-    JitsiMeetJS.createLocalTracks({devices: isVideo? ["video"] : ["desktop"]}).
190
+    JitsiMeetJS.createLocalTracks({devices: isVideo ? ["video"] : ["desktop"]}).
191 191
         then(function (tracks) {
192 192
             localTracks.push(tracks[0]);
193 193
             localTracks[1].addEventListener(JitsiMeetJS.events.track.TRACK_MUTE_CHANGED,

+ 1
- 1
modules/RTC/JitsiRemoteTrack.js Переглянути файл

@@ -153,7 +153,7 @@ JitsiRemoteTrack.prototype._playCallback = function () {
153 153
         - window.connectionTimes["obtainPermissions.start"]);
154 154
     this.conference.getConnectionTimes()[type + ".ttfm"] = ttfm;
155 155
     console.log("(TIME) TTFM " + type + ":\t", ttfm);
156
-    var eventName = type +'.ttfm';
156
+    var eventName = type + '.ttfm';
157 157
     if(this.hasBeenMuted) {
158 158
         eventName += '.muted';
159 159
     }

+ 1
- 1
modules/RTC/RTC.js Переглянути файл

@@ -96,7 +96,7 @@ export default class RTC extends Listenable {
96 96
             function (tracksInfo) {
97 97
                 var tracks = createLocalTracks(tracksInfo, options);
98 98
                 return !tracks.some(track =>
99
-                    !track._isReceivingData())? tracks
99
+                    !track._isReceivingData()) ? tracks
100 100
                         : Promise.reject(new JitsiTrackError(
101 101
                             JitsiTrackErrors.NO_DATA_FROM_SOURCE));
102 102
             });

+ 2
- 2
modules/RTC/RTCUtils.js Переглянути файл

@@ -1153,7 +1153,7 @@ class RTCUtils extends Listenable {
1153 1153
             return true;
1154 1154
         }
1155 1155
         return typeof MediaStreamTrack !== "undefined" &&
1156
-            MediaStreamTrack.getSources? true : false;
1156
+            MediaStreamTrack.getSources ? true : false;
1157 1157
     }
1158 1158
 
1159 1159
     /**
@@ -1206,7 +1206,7 @@ class RTCUtils extends Listenable {
1206 1206
             : RTCBrowserType.isChrome() ||
1207 1207
                 RTCBrowserType.isFirefox() ||
1208 1208
                 RTCBrowserType.isOpera() ||
1209
-                RTCBrowserType.isTemasysPluginUsed()||
1209
+                RTCBrowserType.isTemasysPluginUsed() ||
1210 1210
                 RTCBrowserType.isNWJS() ||
1211 1211
                 RTCBrowserType.isElectron();
1212 1212
     }

+ 2
- 2
modules/RTC/TraceablePeerConnection.js Переглянути файл

@@ -535,7 +535,7 @@ var normalizePlanB = function(desc) {
535 535
 
536 536
             if (Array.isArray(mLine.ssrcs)) {
537 537
                 var i;
538
-                for (i = 0; i<mLine.ssrcs.length; i++){
538
+                for (i = 0; i < mLine.ssrcs.length; i++){
539 539
                     if (typeof mLine.ssrcs[i] === 'object'
540 540
                         && typeof mLine.ssrcs[i].id !== 'undefined'
541 541
                         && firstSsrcs.indexOf(mLine.ssrcs[i].id) >= 0) {
@@ -544,7 +544,7 @@ var normalizePlanB = function(desc) {
544 544
                     }
545 545
                 }
546 546
 
547
-                for (i = 0; i<mLine.ssrcs.length; i++){
547
+                for (i = 0; i < mLine.ssrcs.length; i++){
548 548
                     if (typeof mLine.ssrcs[i] !== 'undefined') {
549 549
                         newSsrcLines.push(mLine.ssrcs[i]);
550 550
                     }

+ 1
- 1
modules/connectivity/ConnectionQuality.js Переглянути файл

@@ -57,7 +57,7 @@ function getTarget(simulcast, resolution, millisSinceStart) {
57 57
         if (simulcastFormat) {
58 58
             // Sum the target fields from all simulcast layers for the given
59 59
             // resolution (e.g. 720p + 360p + 180p).
60
-            for (height = simulcastFormat.height; height >= 180; height /=2) {
60
+            for (height = simulcastFormat.height; height >= 180; height /= 2) {
61 61
                 simulcastFormat
62 62
                     = kSimulcastFormats.find(f => f.height == height);
63 63
                 if (simulcastFormat) {

+ 1
- 1
modules/connectivity/ParticipantConnectionStatus.js Переглянути файл

@@ -175,7 +175,7 @@ export default class ParticipantConnectionStatus {
175 175
 
176 176
         logger.debug(
177 177
             'Detector RTCEvents.ENDPOINT_CONN_STATUS_CHANGED('
178
-                + Date.now() +'): ' + endpointId + ': ' + isActive);
178
+                + Date.now() + '): ' + endpointId + ': ' + isActive);
179 179
 
180 180
         // Filter out events for the local JID for now
181 181
         if (endpointId !== this.conference.myUserId()) {

+ 1
- 1
modules/statistics/CallStats.js Переглянути файл

@@ -237,7 +237,7 @@ var reportType = {
237 237
 
238 238
 CallStats.prototype.pcCallback = _try_catch(function (err, msg) {
239 239
     if (callStats && err !== 'success') {
240
-        logger.error("Monitoring status: "+ err + " msg: " + msg);
240
+        logger.error("Monitoring status: " + err + " msg: " + msg);
241 241
     }
242 242
 });
243 243
 

+ 1
- 1
modules/statistics/RTPStatsCollector.js Переглянути файл

@@ -67,7 +67,7 @@ function calculatePacketLoss(lostPackets, totalPackets) {
67 67
     if(!totalPackets || totalPackets <= 0 || !lostPackets || lostPackets <= 0) {
68 68
         return 0;
69 69
     }
70
-    return Math.round((lostPackets/totalPackets)*100);
70
+    return Math.round((lostPackets / totalPackets) * 100);
71 71
 }
72 72
 
73 73
 /**

+ 1
- 1
modules/transcription/transcriber.js Переглянути файл

@@ -114,7 +114,7 @@ var blobCallBack = function(answer){
114 114
         answer.wordArray.forEach(function(wordObject) {
115 115
             wordObject.begin += offset;
116 116
             wordObject.end += offset;
117
-            array += wordObject.word+",";
117
+            array += wordObject.word + ",";
118 118
         });
119 119
         array += "]";
120 120
         console.log(array);

+ 1
- 1
modules/xmpp/Caps.js Переглянути файл

@@ -105,7 +105,7 @@ export default class Caps extends Listenable {
105 105
         const user
106 106
             = jid in this.jidToVersion ? this.jidToVersion[jid] : null;
107 107
         if(!user || !(user.version in this.versionToCapabilities)) {
108
-            const node = user? user.node + "#" + user.version : null;
108
+            const node = user ? user.node + "#" + user.version : null;
109 109
             return new Promise ( (resolve, reject) =>
110 110
                 this.disco.info(jid, node, response => {
111 111
                     const features = new Set();

+ 2
- 2
modules/xmpp/ChatRoom.js Переглянути файл

@@ -292,7 +292,7 @@ export default class ChatRoom extends Listenable {
292 292
         }
293 293
 
294 294
         if (from == this.myroomjid) {
295
-            var newRole = member.affiliation == "owner"? member.role : "none";
295
+            var newRole = member.affiliation == "owner" ? member.role : "none";
296 296
             if (this.role !== newRole) {
297 297
                 this.role = newRole;
298 298
                 this.eventEmitter.emit(XMPPEvents.LOCAL_ROLE_CHANGED, this.role);
@@ -572,7 +572,7 @@ export default class ChatRoom extends Listenable {
572 572
             }
573 573
         }
574 574
 
575
-        if (from==this.roomjid && $(msg).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length) {
575
+        if (from == this.roomjid && $(msg).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length) {
576 576
             this.discoRoomInfo();
577 577
         }
578 578
 

+ 1
- 1
modules/xmpp/JingleSessionPC.js Переглянути файл

@@ -1050,7 +1050,7 @@ export default class JingleSessionPC extends JingleSession {
1050 1050
                     const ssrcLines
1051 1051
                         = SDPUtil.find_lines(media, 'a=ssrc:' + ssrc);
1052 1052
                     if (ssrcLines.length) {
1053
-                        removeSsrcInfo[idx] += ssrcLines.join("\r\n")+"\r\n";
1053
+                        removeSsrcInfo[idx] += ssrcLines.join("\r\n") + "\r\n";
1054 1054
                     }
1055 1055
                 });
1056 1056
                 removeSsrcInfo[idx] += lines;

+ 1
- 1
modules/xmpp/SDP.js Переглянути файл

@@ -615,7 +615,7 @@ SDP.prototype.jingle2media = function (content) {
615 615
 
616 616
     content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]>candidate').each(function () {
617 617
         var protocol = this.getAttribute('protocol');
618
-        protocol = typeof protocol === 'string' ? protocol.toLowerCase(): '';
618
+        protocol = typeof protocol === 'string' ? protocol.toLowerCase() : '';
619 619
 
620 620
         if ((self.removeTcpCandidates
621 621
                 && (protocol === 'tcp' || protocol === 'ssltcp')) ||

+ 1
- 1
modules/xmpp/SDPDiffer.js Переглянути файл

@@ -23,7 +23,7 @@ SDPDiffer.prototype.getNewMedia = function() {
23 23
             return false;
24 24
         }
25 25
 
26
-        for (var i = 0, l=this.length; i < l; i++) {
26
+        for (var i = 0, l = this.length; i < l; i++) {
27 27
             // Check if we have nested arrays
28 28
             if (this[i] instanceof Array && array[i] instanceof Array) {
29 29
                 // recurse into the nested arrays

+ 1
- 1
modules/xmpp/moderator.js Переглянути файл

@@ -337,7 +337,7 @@ Moderator.prototype._allocateConferenceFocusError = function (error, callback) {
337 337
         return;
338 338
     }
339 339
     var waitMs = this.getNextErrorTimeout();
340
-    var errmsg = "Focus error, retry after "+ waitMs;
340
+    var errmsg = "Focus error, retry after " + waitMs;
341 341
     GlobalOnErrorHandler.callErrorHandler(new Error(errmsg));
342 342
     logger.error(errmsg, error);
343 343
     // Show message

+ 2
- 2
modules/xmpp/xmpp.js Переглянути файл

@@ -240,7 +240,7 @@ export default class XMPP extends Listenable {
240 240
         const now = this.connectionTimes["attaching"] = window.performance.now();
241 241
         logger.log("(TIME) Strophe Attaching\t:" + now);
242 242
         this.connection.attach(options.jid, options.sid,
243
-            parseInt(options.rid,10)+1,
243
+            parseInt(options.rid,10) + 1,
244 244
             this.connectionHandler.bind(this, options.password));
245 245
     }
246 246
 
@@ -296,7 +296,7 @@ export default class XMPP extends Listenable {
296 296
      */
297 297
     getJingleLog () {
298 298
         const jingle = this.connection.jingle;
299
-        return jingle? jingle.getLog() : {};
299
+        return jingle ? jingle.getLog() : {};
300 300
     }
301 301
 
302 302
     /**

Завантаження…
Відмінити
Зберегти