Explorar el Código

Cooler on global variables, not on document.write

Gaël Métais hace 9 años
padre
commit
53fd2e48e5
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      lib/metadata/policies.js

+ 4 - 4
lib/metadata/policies.js

@@ -195,8 +195,8 @@ var policies = {
         "label": "document.write calls",
         "message": "<p>They slow down the page construction, especially if they are used to insert scripts in the page. Remove them ASAP.</p><p>If you cannot remove them because they come from a third-party script (such as ads), have a look at <a href=\"https://github.com/krux/postscribe\" target=\"_blank\">PostScribe</a>.</p>",
         "isOkThreshold": 0,
-        "isBadThreshold": 10,
-        "isAbnormalThreshold": 20,
+        "isBadThreshold": 5,
+        "isAbnormalThreshold": 10,
         "hasOffenders": true,
         "offendersTransformFn": function(offenders) {
             return {
@@ -254,8 +254,8 @@ var policies = {
         "tool": "phantomas",
         "label": "Global variables",
         "message": "<p>It is a bad practice because they clutter up the global namespace. If two scripts use the same variable name in the global scope, it can cause conflicts and it is generally hard to debug.</p><p>Global variables also take a (very) little bit longer to be accessed than variables in the local scope of a function.</p>",
-        "isOkThreshold": 30,
-        "isBadThreshold": 150,
+        "isOkThreshold": 40,
+        "isBadThreshold": 200,
         "isAbnormalThreshold": 700,
         "hasOffenders": true,
         "offendersTransformFn": function(offenders) {