瀏覽代碼

Re-enable jshint with a minimal configuration

dev1
Lyubo Marinov 8 年之前
父節點
當前提交
72290d937e
共有 5 個文件被更改,包括 11 次插入44 次删除
  1. 0
    24
      .jshintignore
  2. 2
    12
      .jshintrc
  3. 7
    4
      JitsiConferenceEventManager.js
  4. 0
    2
      modules/RTC/JitsiRemoteTrack.js
  5. 2
    2
      modules/RTC/RTCUtils.js

+ 0
- 24
.jshintignore 查看文件

9
 # The following are checked by ESLint and take advantage of advanced language
9
 # The following are checked by ESLint and take advantage of advanced language
10
 # features such as Facebook Flow which are not supported by JSHint.
10
 # features such as Facebook Flow which are not supported by JSHint.
11
 flow-typed/
11
 flow-typed/
12
-
13
-JitsiConference.js
14
-JitsiConnection.js
15
-JitsiMeetJS.js
16
-JitsiParticipant.js
17
-modules/RTC/JitsiLocalTrack.js
18
-modules/RTC/JitsiRemoteTrack.js
19
-modules/RTC/JitsiTrack.js
20
-modules/RTC/DataChannels.js
21
-modules/RTC/adapter.screenshare.js
22
-modules/RTC/RTC.js
23
-modules/RTC/RTCUtils.js
24
-modules/RTC/TraceablePeerConnection.js
25
-modules/statistics/LocalStatsCollector.js
26
-modules/statistics/RTPStatsCollector.js
27
-modules/statistics/statistics.js
28
-modules/xmpp/ChatRoom.js
29
-modules/xmpp/JingleSessionPC.js
30
-modules/xmpp/LocalSSRCReplacement.js
31
-modules/xmpp/SDP.js
32
-modules/xmpp/SDPUtil.js
33
-modules/xmpp/strophe.emuc.js
34
-modules/xmpp/strophe.jingle.js
35
-modules/xmpp/xmpp.js

+ 2
- 12
.jshintrc 查看文件

1
 {
1
 {
2
-    // Refer to http://jshint.com/docs/options/ for an exhaustive list of options
3
-    "asi": false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
4
     "browser": true, // Web Browser (window, document, etc)
2
     "browser": true, // Web Browser (window, document, etc)
5
-    "curly": false, // true: Require {} for every new block or scope
6
     "esversion": 6,
3
     "esversion": 6,
7
-    "evil": true, // true: Tolerate use of `eval` and `new Function()`
8
     "expr": true, // true: Tolerate `ExpressionStatement` as Programs
4
     "expr": true, // true: Tolerate `ExpressionStatement` as Programs
9
-    "indent": 4, // {int} Number of spaces to use for indentation
5
+    "jasmine": true,
10
     "latedef": false, //This option prohibits the use of a variable before it was defined
6
     "latedef": false, //This option prohibits the use of a variable before it was defined
11
     "laxbreak": true, //Ignore line breaks around "=", "==", "&&", etc.
7
     "laxbreak": true, //Ignore line breaks around "=", "==", "&&", etc.
12
     "loopfunc": true, // true: Tolerate functions being defined in loops
8
     "loopfunc": true, // true: Tolerate functions being defined in loops
13
-    "maxlen": 80, // {int} Max number of characters per line
14
-    "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()`
15
-    "node": true, // Node.js
16
-    "trailing": true,
17
-    "undef": true, // true: Require all non-global variables to be declared (prevents global leaks)
18
-    "white": true,
19
-    "jasmine": true
9
+    "node": true // Node.js
20
 }
10
 }

+ 7
- 4
JitsiConferenceEventManager.js 查看文件

500
 
500
 
501
     conference.xmpp.caps.addListener(XMPPEvents.PARTCIPANT_FEATURES_CHANGED,
501
     conference.xmpp.caps.addListener(XMPPEvents.PARTCIPANT_FEATURES_CHANGED,
502
         from => {
502
         from => {
503
-            const participant = conference.getParticipantId(
504
-                Strophe.getResourceFromJid(from));
503
+            const participant
504
+                = conference.getParticipantId(
505
+                    Strophe.getResourceFromJid(from));
505
 
506
 
506
             if (participant) {
507
             if (participant) {
507
                 conference.eventEmitter.emit(
508
                 conference.eventEmitter.emit(
510
             }
511
             }
511
         });
512
         });
512
     conference.xmpp.addListener(
513
     conference.xmpp.addListener(
513
-        XMPPEvents.CALL_INCOMING, conference.onIncomingCall.bind(conference));
514
+        XMPPEvents.CALL_INCOMING,
515
+        conference.onIncomingCall.bind(conference));
514
     conference.xmpp.addListener(
516
     conference.xmpp.addListener(
515
-        XMPPEvents.CALL_ENDED, conference.onCallEnded.bind(conference));
517
+        XMPPEvents.CALL_ENDED,
518
+        conference.onCallEnded.bind(conference));
516
 
519
 
517
     conference.xmpp.addListener(XMPPEvents.START_MUTED_FROM_FOCUS,
520
     conference.xmpp.addListener(XMPPEvents.START_MUTED_FROM_FOCUS,
518
         (audioMuted, videoMuted) => {
521
         (audioMuted, videoMuted) => {

+ 0
- 2
modules/RTC/JitsiRemoteTrack.js 查看文件

1
-/* global */
2
-
3
 const JitsiTrack = require('./JitsiTrack');
1
 const JitsiTrack = require('./JitsiTrack');
4
 
2
 
5
 import * as JitsiTrackEvents from '../../JitsiTrackEvents';
3
 import * as JitsiTrackEvents from '../../JitsiTrackEvents';

+ 2
- 2
modules/RTC/RTCUtils.js 查看文件

2
           __filename,
2
           __filename,
3
           attachMediaStream,
3
           attachMediaStream,
4
           MediaStreamTrack,
4
           MediaStreamTrack,
5
-          RTCIceCandidate,
5
+          RTCIceCandidate: true,
6
           RTCPeerConnection,
6
           RTCPeerConnection,
7
-          RTCSessionDescription,
7
+          RTCSessionDescription: true,
8
           mozRTCIceCandidate,
8
           mozRTCIceCandidate,
9
           mozRTCPeerConnection,
9
           mozRTCPeerConnection,
10
           mozRTCSessionDescription,
10
           mozRTCSessionDescription,

Loading…
取消
儲存