Browse Source

Old jQuery major versions didn't have the trailing .0 in number

Gaël Métais 10 years ago
parent
commit
c93ce684a8
1 changed files with 7 additions and 7 deletions
  1. 7 7
      lib/metadata/policies.js

+ 7 - 7
lib/metadata/policies.js

@@ -389,17 +389,17 @@ var policies = {
                     score = 70;
                     score = 70;
                 } else if (value.indexOf('1.8.') === 0) {
                 } else if (value.indexOf('1.8.') === 0) {
                     score = 50;
                     score = 50;
-                } else if (value.indexOf('1.7.') === 0) {
+                } else if (value.indexOf('1.7') === 0) {
                     score = 40;
                     score = 40;
-                } else if (value.indexOf('1.6.') === 0) {
+                } else if (value.indexOf('1.6') === 0) {
                     score = 30;
                     score = 30;
-                } else if (value.indexOf('1.5.') === 0) {
+                } else if (value.indexOf('1.5') === 0) {
                     score = 20;
                     score = 20;
-                } else if (value.indexOf('1.4.') === 0) {
+                } else if (value.indexOf('1.4') === 0) {
                     score = 10;
                     score = 10;
-                } else if (value.indexOf('1.3.') === 0) {
+                } else if (value.indexOf('1.3') === 0) {
                     score = 0;
                     score = 0;
-                } else if (value.indexOf('1.2.') === 0) {
+                } else if (value.indexOf('1.2') === 0) {
                     score = 0;
                     score = 0;
                 } else {
                 } else {
                     debug('Unknown jQuery version "%s"', value);
                     debug('Unknown jQuery version "%s"', value);
@@ -433,7 +433,7 @@ var policies = {
     "jQueryFunctionsUsed": {
     "jQueryFunctionsUsed": {
         "tool": "jsExecutionTransformer",
         "tool": "jsExecutionTransformer",
         "label": "jQuery usage",
         "label": "jQuery usage",
-        "message": "<p>This is the number of different jQuery functions called on load. This rule is not trying to blame you for using jQuery too much, but the opposite.</p><p>If only a few functions are used, why not trying to get rid of jQuery? Have a look at <a href=\"http://youmightnotneedjquery.com/\" target=\"_blank\">http://youmightnotneedjquery.com</a>.</p>",
+        "message": "<p>This is the number of different core jQuery functions called on load. This rule is not trying to blame you for using jQuery too much, but the opposite.</p><p>If only a few functions are used, why not trying to get rid of jQuery? Have a look at <a href=\"http://youmightnotneedjquery.com/\" target=\"_blank\">http://youmightnotneedjquery.com</a>.</p>",
         "isOkThreshold": 15,
         "isOkThreshold": 15,
         "isBadThreshold": 6,
         "isBadThreshold": 6,
         "isAbnormalThreshold": 0,
         "isAbnormalThreshold": 0,