소스 검색

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",
         "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,
-        "isBadThreshold": 1500,
-        "isAbnormalThreshold": 2000
+        "isBadThreshold": 800,
+        "isAbnormalThreshold": 1500
     },
     "jsErrors": {
         "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>",
         "isOkThreshold": 0,
         "isBadThreshold": 1,
-        "isAbnormalThreshold": 2
+        "isAbnormalThreshold": 4
     },
     "evalCalls": {
         "tool": "phantomas",

+ 1 - 1
lib/metadata/scoreProfileGeneric.json

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