Browse Source

fix(eslint): Add dot-location rule

dev1
hristoterezov 8 years ago
parent
commit
5ac13a304e
2 changed files with 6 additions and 5 deletions
  1. 1
    0
      .eslintrc.js
  2. 5
    5
      doc/example/example.js

+ 1
- 0
.eslintrc.js View File

74
         'consistent-return': 0,
74
         'consistent-return': 0,
75
         'curly': 2,
75
         'curly': 2,
76
         'default-case': 0,
76
         'default-case': 0,
77
+        'dot-location': [ 'error', 'property' ],
77
         'no-caller': 2,
78
         'no-caller': 2,
78
         'no-case-declarations': 2,
79
         'no-case-declarations': 2,
79
         'no-div-regex': 0,
80
         'no-div-regex': 0,

+ 5
- 5
doc/example/example.js View File

187
         localTracks[1].dispose();
187
         localTracks[1].dispose();
188
         localTracks.pop();
188
         localTracks.pop();
189
     }
189
     }
190
-    JitsiMeetJS.createLocalTracks({devices: isVideo ? ['video'] : ['desktop']}).
191
-        then(function(tracks) {
190
+    JitsiMeetJS.createLocalTracks({devices: isVideo ? ['video'] : ['desktop']})
191
+        .then(function(tracks) {
192
             localTracks.push(tracks[0]);
192
             localTracks.push(tracks[0]);
193
             localTracks[1].addEventListener(JitsiMeetJS.events.track.TRACK_MUTE_CHANGED,
193
             localTracks[1].addEventListener(JitsiMeetJS.events.track.TRACK_MUTE_CHANGED,
194
                 function() {
194
                 function() {
249
     JitsiMeetJS.mediaDevices.addEventListener(JitsiMeetJS.events.mediaDevices.DEVICE_LIST_CHANGED, onDeviceListChanged);
249
     JitsiMeetJS.mediaDevices.addEventListener(JitsiMeetJS.events.mediaDevices.DEVICE_LIST_CHANGED, onDeviceListChanged);
250
 
250
 
251
     connection.connect();
251
     connection.connect();
252
-    JitsiMeetJS.createLocalTracks({devices: ['audio', 'video']}).
253
-        then(onLocalTracks).catch(function(error) {
252
+    JitsiMeetJS.createLocalTracks({devices: ['audio', 'video']})
253
+        .then(onLocalTracks).catch(function(error) {
254
             throw error;
254
             throw error;
255
         });
255
         });
256
 }).catch(function(error) {
256
 }).catch(function(error) {
260
 if (JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
260
 if (JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
261
     JitsiMeetJS.mediaDevices.enumerateDevices(function(devices) {
261
     JitsiMeetJS.mediaDevices.enumerateDevices(function(devices) {
262
         var audioOutputDevices = devices.filter(function(d) {
262
         var audioOutputDevices = devices.filter(function(d) {
263
-            return d.kind === 'audiooutput'; 
263
+            return d.kind === 'audiooutput';
264
         });
264
         });
265
 
265
 
266
         if (audioOutputDevices.length > 1) {
266
         if (audioOutputDevices.length > 1) {

Loading…
Cancel
Save