ソースを参照

Reduce the weight of jsErrors in score

Gaël Métais 10 年 前
コミット
aabbf882df
2 ファイル変更4 行追加4 行削除
  1. 3 3
      lib/metadata/policies.js
  2. 1 1
      lib/metadata/scoreProfileGeneric.json

+ 3 - 3
lib/metadata/policies.js

@@ -71,8 +71,8 @@ var policies = {
         "label": "Events bound",
         "label": "Events bound",
         "message": "<p>Binding too many events has a cost.</p><p>It can be avoided by using \"event delegation\". Instead of binding events on each element one by one, events delegation binds them on the top level document element and uses the bubbling principle. It will imperceptibly slow down the event when it occurs, but the loading of the page will speed-up.</p>",
         "message": "<p>Binding too many events has a cost.</p><p>It can be avoided by using \"event delegation\". Instead of binding events on each element one by one, events delegation binds them on the top level document element and uses the bubbling principle. It will imperceptibly slow down the event when it occurs, but the loading of the page will speed-up.</p>",
         "isOkThreshold": 100,
         "isOkThreshold": 100,
-        "isBadThreshold": 1500,
-        "isAbnormalThreshold": 2000
+        "isBadThreshold": 800,
+        "isAbnormalThreshold": 1500
     },
     },
     "jsErrors": {
     "jsErrors": {
         "tool": "phantomas",
         "tool": "phantomas",
@@ -80,7 +80,7 @@ var policies = {
         "message": "<p>Just to let you know there are some errors on the page.</p><p><b>Please note that some errors only occur in the PhantomJS browser, so you might need to double check on other browsers.</b></p>",
         "message": "<p>Just to let you know there are some errors on the page.</p><p><b>Please note that some errors only occur in the PhantomJS browser, so you might need to double check on other browsers.</b></p>",
         "isOkThreshold": 0,
         "isOkThreshold": 0,
         "isBadThreshold": 1,
         "isBadThreshold": 1,
-        "isAbnormalThreshold": 2
+        "isAbnormalThreshold": 4
     },
     },
     "evalCalls": {
     "evalCalls": {
         "tool": "phantomas",
         "tool": "phantomas",

+ 1 - 1
lib/metadata/scoreProfileGeneric.json

@@ -22,7 +22,7 @@
         "badJavascript": {
         "badJavascript": {
             "label": "Bad JavaScript",
             "label": "Bad JavaScript",
             "policies": {
             "policies": {
-                "jsErrors": 2,
+                "jsErrors": 1,
                 "documentWriteCalls": 2,
                 "documentWriteCalls": 2,
                 "consoleMessages": 0.5,
                 "consoleMessages": 0.5,
                 "globalVariables": 0.5
                 "globalVariables": 0.5