瀏覽代碼

Fixes warnings, sets up .jshintrc and ignores files in .jshintignore.

dev1
Boris Grozev 10 年之前
父節點
當前提交
d6f62feb4e

+ 30
- 4
.jshintignore 查看文件

@@ -1,6 +1,32 @@
1 1
 node_modules
2 2
 libs
3
-replacement.js
4
-prezi.js
5
-muc.js
6
-app.js
3
+lib-jitsi-meet.js
4
+doc
5
+
6
+
7
+modules/xmpp/xmpp.js
8
+modules/xmpp/strophe.jingle.js
9
+modules/xmpp/TraceablePeerConnection.js
10
+modules/xmpp/SDPUtil.js
11
+modules/xmpp/SDP.js
12
+modules/xmpp/strophe.emuc.js
13
+modules/xmpp/JingleSessionPC.js
14
+modules/xmpp/LocalSSRCReplacement.js
15
+modules/xmpp/ChatRoom.js
16
+modules/xmpp/ChatRoom.js
17
+modules/statistics/RTPStatsCollector.js
18
+modules/statistics/LocalStatsCollector.js
19
+modules/settings/Settings.js
20
+modules/connectionquality/connectionquality.js
21
+modules/RTC/adapter.screenshare.js
22
+modules/statistics/statistics.js
23
+modules/RTC/RTC.js
24
+modules/RTC/RTCUtils.js
25
+modules/RTC/DataChannels.js
26
+modules/RTC/JitsiLocalTrack.js
27
+modules/RTC/JitsiRemoteTrack.js
28
+modules/RTC/JitsiTrack.js
29
+JitsiParticipant.js
30
+JitsiMeetJS.js
31
+JitsiConnection.js
32
+JitsiConference.js

+ 5
- 2
.jshintrc 查看文件

@@ -1,4 +1,5 @@
1 1
 {
2
+    // Refer to http://jshint.com/docs/options/ for an exhaustive list of options
2 3
     "asi": false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
3 4
     "expr": true, // true: Tolerate `ExpressionStatement` as Programs
4 5
     "loopfunc": true, // true: Tolerate functions being defined in loops
@@ -12,5 +13,7 @@
12 13
     "indent": 4, // {int} Number of spaces to use for indentation
13 14
     "latedef": true, // true: Require variables/functions to be defined before being used
14 15
     "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
15
-    "maxlen": 80    // {int} Max number of characters per line
16
-}
16
+    "maxlen": 80, // {int} Max number of characters per line
17
+    "latedef": false, //This option prohibits the use of a variable before it was defined
18
+    "laxbreak": true //Ignore line breaks around "=", "==", "&&", etc.
19
+}

+ 2
- 1
JitsiConferenceErrors.js 查看文件

@@ -8,7 +8,8 @@ var JitsiConferenceErrors = {
8 8
      */
9 9
     PASSWORD_REQUIRED: "conference.passwordRequired",
10 10
     /**
11
-     * Indicates that a connection error occurred when trying to join a conference.
11
+     * Indicates that a connection error occurred when trying to join a
12
+     * conference.
12 13
      */
13 14
     CONNECTION_ERROR: "conference.connectionError",
14 15
     /**

+ 2
- 1
JitsiConferenceEvents.js 查看文件

@@ -56,7 +56,8 @@ var JitsiConferenceEvents = {
56 56
      */
57 57
     TRACK_AUDIO_LEVEL_CHANGED: "conference.audioLevelsChanged",
58 58
     /**
59
-     * Indicates that the connection to the conference has been interrupted for some reason.
59
+     * Indicates that the connection to the conference has been interrupted
60
+     * for some reason.
60 61
      */
61 62
     CONNECTION_INTERRUPTED: "conference.connecionInterrupted",
62 63
     /**

+ 2
- 1
JitsiConnectionErrors.js 查看文件

@@ -8,7 +8,8 @@ var JitsiConnectionErrors = {
8 8
      */
9 9
     PASSWORD_REQUIRED: "connection.passwordRequired",
10 10
     /**
11
-     * Indicates that a connection error occurred when trying to join a conference.
11
+     * Indicates that a connection error occurred when trying to join a
12
+     * conference.
12 13
      */
13 14
     CONNECTION_ERROR: "connection.connectionError",
14 15
     /**

+ 3
- 2
modules/xmpp/strophe.moderate.js 查看文件

@@ -22,7 +22,8 @@ module.exports = function (XMPP, eventEmitter) {
22 22
         },
23 23
         setMute: function (jid, mute) {
24 24
             logger.info("set mute", mute);
25
-            var iqToFocus = $iq({to: this.connection.emuc.focusMucJid, type: 'set'})
25
+            var iqToFocus = $iq(
26
+                {to: this.connection.emuc.focusMucJid, type: 'set'})
26 27
                 .c('mute', {
27 28
                     xmlns: 'http://jitsi.org/jitmeet/audio',
28 29
                     jid: jid
@@ -59,4 +60,4 @@ module.exports = function (XMPP, eventEmitter) {
59 60
             this.connection.emuc.kick(jid);
60 61
         }
61 62
     });
62
-}
63
+};

+ 3
- 2
modules/xmpp/strophe.rayo.js 查看文件

@@ -13,7 +13,8 @@ module.exports = function() {
13 13
                 }
14 14
 
15 15
                 this.connection.addHandler(
16
-                    this.onRayo.bind(this), this.RAYO_XMLNS, 'iq', 'set', null, null);
16
+                    this.onRayo.bind(this),
17
+                    this.RAYO_XMLNS, 'iq', 'set', null, null);
17 18
             },
18 19
             onRayo: function (iq) {
19 20
                 logger.info("Rayo IQ", iq);
@@ -55,7 +56,7 @@ module.exports = function() {
55 56
                         var resource = $(result).find('ref').attr('uri');
56 57
                         this.call_resource = resource.substr('xmpp:'.length);
57 58
                         logger.info(
58
-                                "Received call resource: " + this.call_resource);
59
+                            "Received call resource: " + this.call_resource);
59 60
                     },
60 61
                     function (error) {
61 62
                         logger.info('Dial error ', error);

+ 1
- 0
modules/xmpp/strophe.util.js 查看文件

@@ -1,3 +1,4 @@
1
+/* global Strophe */
1 2
 /**
2 3
  * Strophe logger implementation. Logs from level WARN and above.
3 4
  */

Loading…
取消
儲存