瀏覽代碼

feat(eslint): tame the beast

master
Saúl Ibarra Corretgé 7 年之前
父節點
當前提交
2ae2f04f0a

+ 2
- 1
modules/API/API.js 查看文件

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

+ 5
- 4
modules/API/external/external_api.js 查看文件

@@ -114,10 +114,10 @@ function parseArguments(args) {
114 114
 
115 115
     switch (typeof firstArg) {
116 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 121
         const [
122 122
             roomName,
123 123
             width,
@@ -141,6 +141,7 @@ function parseArguments(args) {
141 141
             jwt,
142 142
             onload
143 143
         };
144
+    }
144 145
     case 'object': // new arguments format
145 146
         return args[0];
146 147
     default:

+ 1
- 0
modules/UI/etherpad/Etherpad.js 查看文件

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

+ 4
- 1
react/.eslintrc.js 查看文件

@@ -4,5 +4,8 @@ module.exports = {
4 4
         'eslint-config-jitsi/jsdoc',
5 5
         'eslint-config-jitsi/react',
6 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,7 +219,7 @@ class SessionManager {
219 219
 
220 220
         for (let i = 0; i < sessionTokens.length; ++i) {
221 221
             const thisSession = this._sessionsMetadata[sessionTokens[i]];
222
-            const newSessionInfo : SessionInfo = {
222
+            const newSessionInfo: SessionInfo = {
223 223
                 start: thisSession.events[0].timestamp,
224 224
                 format: thisSession.format,
225 225
                 sessionToken: sessionTokens[i],
@@ -348,8 +348,7 @@ class SessionManager {
348 348
 
349 349
         const output = [];
350 350
         let sessionStartTime = null;
351
-        let currentSegment : SegmentInfo = {
352
-        };
351
+        let currentSegment: SegmentInfo = {};
353 352
 
354 353
         /**
355 354
          * Helper function for adding a new {@code SegmentInfo} object to the

+ 13
- 13
react/features/welcome/roomnameGenerator.js 查看文件

@@ -172,32 +172,32 @@ const PATTERNS = [
172 172
     '_ADJECTIVE__PLURALNOUN__VERB__ADVERB_'
173 173
 
174 174
     // BeautifulFungiOrSpaghetti
175
-//    '_ADJECTIVE__PLURALNOUN__CONJUNCTION__PLURALNOUN_',
175
+    //    '_ADJECTIVE__PLURALNOUN__CONJUNCTION__PLURALNOUN_',
176 176
 
177 177
     // AmazinglyScaryToy
178
-//    '_ADVERB__ADJECTIVE__NOUN_',
178
+    //    '_ADVERB__ADJECTIVE__NOUN_',
179 179
 
180 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 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 193
     // WolvesComputeBadly
194
-//    '_PLURALNOUN__VERB__ADVERB_',
194
+    //    '_PLURALNOUN__VERB__ADVERB_',
195 195
 
196 196
     // UniteFacilitateAndMerge
197
-//    '_VERB__VERB_And_VERB_',
197
+    //    '_VERB__VERB_And_VERB_',
198 198
 
199 199
     // NastyWitchesAtThePub
200
-//    '_ADJECTIVE__PLURALNOUN_AtThe_PLACE_',
200
+    //    '_ADJECTIVE__PLURALNOUN_AtThe_PLACE_',
201 201
 ];
202 202
 
203 203
 /**

Loading…
取消
儲存