Преглед изворни кода

fix(eslint): Add dot-location rule

dev1
hristoterezov пре 8 година
родитељ
комит
5ac13a304e
2 измењених фајлова са 6 додато и 5 уклоњено
  1. 1
    0
      .eslintrc.js
  2. 5
    5
      doc/example/example.js

+ 1
- 0
.eslintrc.js Прегледај датотеку

@@ -74,6 +74,7 @@ module.exports = {
74 74
         'consistent-return': 0,
75 75
         'curly': 2,
76 76
         'default-case': 0,
77
+        'dot-location': [ 'error', 'property' ],
77 78
         'no-caller': 2,
78 79
         'no-case-declarations': 2,
79 80
         'no-div-regex': 0,

+ 5
- 5
doc/example/example.js Прегледај датотеку

@@ -187,8 +187,8 @@ 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']}).
191
-        then(function(tracks) {
190
+    JitsiMeetJS.createLocalTracks({devices: isVideo ? ['video'] : ['desktop']})
191
+        .then(function(tracks) {
192 192
             localTracks.push(tracks[0]);
193 193
             localTracks[1].addEventListener(JitsiMeetJS.events.track.TRACK_MUTE_CHANGED,
194 194
                 function() {
@@ -249,8 +249,8 @@ JitsiMeetJS.init(initOptions).then(function() {
249 249
     JitsiMeetJS.mediaDevices.addEventListener(JitsiMeetJS.events.mediaDevices.DEVICE_LIST_CHANGED, onDeviceListChanged);
250 250
 
251 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 254
             throw error;
255 255
         });
256 256
 }).catch(function(error) {
@@ -260,7 +260,7 @@ JitsiMeetJS.init(initOptions).then(function() {
260 260
 if (JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
261 261
     JitsiMeetJS.mediaDevices.enumerateDevices(function(devices) {
262 262
         var audioOutputDevices = devices.filter(function(d) {
263
-            return d.kind === 'audiooutput'; 
263
+            return d.kind === 'audiooutput';
264 264
         });
265 265
 
266 266
         if (audioOutputDevices.length > 1) {

Loading…
Откажи
Сачувај