瀏覽代碼

Merge branch 'master' into eslint_improvements

dev1
Lyubo Marinov 8 年之前
父節點
當前提交
e7324b04d8
共有 2 個檔案被更改,包括 4 行新增1 行删除
  1. 1
    0
      .eslintrc.js
  2. 3
    1
      modules/statistics/RTPStatsCollector.js

+ 1
- 0
.eslintrc.js 查看文件

@@ -116,6 +116,7 @@ module.exports = {
116 116
         'no-self-assign': 2,
117 117
         'no-self-compare': 2,
118 118
         'no-sequences': 2,
119
+        'no-throw-literal': 2,
119 120
         'no-unmodified-loop-condition': 2,
120 121
         'no-unused-expressions': [
121 122
             'error',

+ 3
- 1
modules/statistics/RTPStatsCollector.js 查看文件

@@ -186,6 +186,7 @@ function StatsCollector(
186 186
     const keys = KEYS_BY_BROWSER_TYPE[this._browserType];
187 187
 
188 188
     if (!keys) {
189
+        // eslint-disable-next-line no-throw-literal
189 190
         throw `The browser type '${this._browserType}' isn't supported!`;
190 191
     }
191 192
 
@@ -328,8 +329,9 @@ StatsCollector.prototype._defineGetStatValueMethod = function(keys) {
328 329
         if (key) {
329 330
             return key;
330 331
         }
331
-        throw `The property '${name}' isn't supported!`;
332 332
 
333
+        // eslint-disable-next-line no-throw-literal
334
+        throw `The property '${name}' isn't supported!`;
333 335
     };
334 336
 
335 337
     // Define the function which retrieves the value from a specific report

Loading…
取消
儲存