소스 검색

feat(eslint): tame the beast

master
Saúl Ibarra Corretgé 7 년 전
부모
커밋
2ae2f04f0a

+ 2
- 1
modules/API/API.js 파일 보기

112
         const { name } = request;
112
         const { name } = request;
113
 
113
 
114
         switch (name) {
114
         switch (name) {
115
-        case 'invite': // eslint-disable-line no-case-declarations
115
+        case 'invite': {
116
             const { invitees } = request;
116
             const { invitees } = request;
117
 
117
 
118
             if (!Array.isArray(invitees) || invitees.length === 0) {
118
             if (!Array.isArray(invitees) || invitees.length === 0) {
143
                     });
143
                     });
144
                 });
144
                 });
145
             break;
145
             break;
146
+        }
146
         case 'is-audio-muted':
147
         case 'is-audio-muted':
147
             callback(APP.conference.isLocalAudioMuted());
148
             callback(APP.conference.isLocalAudioMuted());
148
             break;
149
             break;

+ 5
- 4
modules/API/external/external_api.js 파일 보기

114
 
114
 
115
     switch (typeof firstArg) {
115
     switch (typeof firstArg) {
116
     case 'string': // old arguments format
116
     case 'string': // old arguments format
117
-    case undefined: // eslint-disable-line no-case-declarations
118
-    // not sure which format but we are trying to parse the old
119
-    // format because if the new format is used everything will be undefined
120
-    // anyway.
117
+    case undefined: {
118
+        // Not sure which format but we are trying to parse the old
119
+        // format because if the new format is used everything will be undefined
120
+        // anyway.
121
         const [
121
         const [
122
             roomName,
122
             roomName,
123
             width,
123
             width,
141
             jwt,
141
             jwt,
142
             onload
142
             onload
143
         };
143
         };
144
+    }
144
     case 'object': // new arguments format
145
     case 'object': // new arguments format
145
         return args[0];
146
         return args[0];
146
     default:
147
     default:

+ 1
- 0
modules/UI/etherpad/Etherpad.js 파일 보기

87
         this.container.appendChild(iframe);
87
         this.container.appendChild(iframe);
88
 
88
 
89
         iframe.onload = function() {
89
         iframe.onload = function() {
90
+            // eslint-disable-next-line no-self-assign
90
             document.domain = document.domain;
91
             document.domain = document.domain;
91
             bubbleIframeMouseMove(iframe);
92
             bubbleIframeMouseMove(iframe);
92
 
93
 

+ 4
- 1
react/.eslintrc.js 파일 보기

4
         'eslint-config-jitsi/jsdoc',
4
         'eslint-config-jitsi/jsdoc',
5
         'eslint-config-jitsi/react',
5
         'eslint-config-jitsi/react',
6
         '.eslintrc-react-native.js'
6
         '.eslintrc-react-native.js'
7
-    ]
7
+    ],
8
+    'rules': {
9
+        'react/no-deprecated': 0
10
+    }
8
 };
11
 };

+ 2
- 3
react/features/local-recording/session/SessionManager.js 파일 보기

219
 
219
 
220
         for (let i = 0; i < sessionTokens.length; ++i) {
220
         for (let i = 0; i < sessionTokens.length; ++i) {
221
             const thisSession = this._sessionsMetadata[sessionTokens[i]];
221
             const thisSession = this._sessionsMetadata[sessionTokens[i]];
222
-            const newSessionInfo : SessionInfo = {
222
+            const newSessionInfo: SessionInfo = {
223
                 start: thisSession.events[0].timestamp,
223
                 start: thisSession.events[0].timestamp,
224
                 format: thisSession.format,
224
                 format: thisSession.format,
225
                 sessionToken: sessionTokens[i],
225
                 sessionToken: sessionTokens[i],
348
 
348
 
349
         const output = [];
349
         const output = [];
350
         let sessionStartTime = null;
350
         let sessionStartTime = null;
351
-        let currentSegment : SegmentInfo = {
352
-        };
351
+        let currentSegment: SegmentInfo = {};
353
 
352
 
354
         /**
353
         /**
355
          * Helper function for adding a new {@code SegmentInfo} object to the
354
          * Helper function for adding a new {@code SegmentInfo} object to the

+ 13
- 13
react/features/welcome/roomnameGenerator.js 파일 보기

172
     '_ADJECTIVE__PLURALNOUN__VERB__ADVERB_'
172
     '_ADJECTIVE__PLURALNOUN__VERB__ADVERB_'
173
 
173
 
174
     // BeautifulFungiOrSpaghetti
174
     // BeautifulFungiOrSpaghetti
175
-//    '_ADJECTIVE__PLURALNOUN__CONJUNCTION__PLURALNOUN_',
175
+    //    '_ADJECTIVE__PLURALNOUN__CONJUNCTION__PLURALNOUN_',
176
 
176
 
177
     // AmazinglyScaryToy
177
     // AmazinglyScaryToy
178
-//    '_ADVERB__ADJECTIVE__NOUN_',
178
+    //    '_ADVERB__ADJECTIVE__NOUN_',
179
 
179
 
180
     // NeitherTrashNorRifle
180
     // NeitherTrashNorRifle
181
-//    'Neither_NOUN_Nor_NOUN_',
182
-//    'Either_NOUN_Or_NOUN_',
181
+    //    'Neither_NOUN_Nor_NOUN_',
182
+    //    'Either_NOUN_Or_NOUN_',
183
 
183
 
184
     // EitherCopulateOrInvestigate
184
     // EitherCopulateOrInvestigate
185
-//    'Either_VERB_Or_VERB_',
186
-//    'Neither_VERB_Nor_VERB_',
185
+    //    'Either_VERB_Or_VERB_',
186
+    //    'Neither_VERB_Nor_VERB_',
187
 
187
 
188
-//    'The_ADJECTIVE__ADJECTIVE__NOUN_',
189
-//    'The_ADVERB__ADJECTIVE__NOUN_',
190
-//    'The_ADVERB__ADJECTIVE__NOUN_s',
191
-//    'The_ADVERB__ADJECTIVE__PLURALNOUN__VERB_',
188
+    //    'The_ADJECTIVE__ADJECTIVE__NOUN_',
189
+    //    'The_ADVERB__ADJECTIVE__NOUN_',
190
+    //    'The_ADVERB__ADJECTIVE__NOUN_s',
191
+    //    'The_ADVERB__ADJECTIVE__PLURALNOUN__VERB_',
192
 
192
 
193
     // WolvesComputeBadly
193
     // WolvesComputeBadly
194
-//    '_PLURALNOUN__VERB__ADVERB_',
194
+    //    '_PLURALNOUN__VERB__ADVERB_',
195
 
195
 
196
     // UniteFacilitateAndMerge
196
     // UniteFacilitateAndMerge
197
-//    '_VERB__VERB_And_VERB_',
197
+    //    '_VERB__VERB_And_VERB_',
198
 
198
 
199
     // NastyWitchesAtThePub
199
     // NastyWitchesAtThePub
200
-//    '_ADJECTIVE__PLURALNOUN_AtThe_PLACE_',
200
+    //    '_ADJECTIVE__PLURALNOUN_AtThe_PLACE_',
201
 ];
201
 ];
202
 
202
 
203
 /**
203
 /**

Loading…
취소
저장