New jQuery usage rule
This commit is contained in:
@@ -66,7 +66,7 @@ var policies = {
|
||||
};
|
||||
}
|
||||
},
|
||||
"DOMaccesses": {
|
||||
/*"DOMaccesses": {
|
||||
"tool": "jsExecutionTransformer",
|
||||
"label": "DOM access",
|
||||
"message": "<p>TODO</p><p>TODO</p>",
|
||||
@@ -74,7 +74,7 @@ var policies = {
|
||||
"isBadThreshold": 2000,
|
||||
"isAbnormalThreshold": 3000,
|
||||
"hasOffenders": false
|
||||
},
|
||||
},*/
|
||||
"DOMinserts": {
|
||||
"tool": "phantomas",
|
||||
"label": "DOM inserts",
|
||||
@@ -430,6 +430,15 @@ var policies = {
|
||||
"isAbnormalThreshold": 2,
|
||||
"hasOffenders": true
|
||||
},
|
||||
"jQueryFunctionsUsed": {
|
||||
"tool": "jsExecutionTransformer",
|
||||
"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>",
|
||||
"isOkThreshold": 15,
|
||||
"isBadThreshold": 6,
|
||||
"isAbnormalThreshold": 0,
|
||||
"hasOffenders": true
|
||||
},
|
||||
"cssParsingErrors": {
|
||||
"tool": "phantomas",
|
||||
"label": "CSS syntax error",
|
||||
|
||||
@@ -35,11 +35,12 @@
|
||||
"globalVariables": 0.5
|
||||
}
|
||||
},
|
||||
"jQueryVersion": {
|
||||
"label": "jQuery version",
|
||||
"jQuery": {
|
||||
"label": "jQuery",
|
||||
"policies": {
|
||||
"jQueryVersion": 5,
|
||||
"jQueryVersionsLoaded": 0.1
|
||||
"jQueryVersion": 10,
|
||||
"jQueryVersionsLoaded": 1,
|
||||
"jQueryFunctionsUsed": 1
|
||||
}
|
||||
},
|
||||
"cssComplexity": {
|
||||
@@ -109,7 +110,7 @@
|
||||
"domManipulations": 2,
|
||||
"scroll": 1,
|
||||
"badJavascript": 1,
|
||||
"jQueryVersion": 1,
|
||||
"jQuery": 1,
|
||||
"cssSyntaxError": 1,
|
||||
"cssComplexity": 1,
|
||||
"badCSS": 1,
|
||||
|
||||
Reference in New Issue
Block a user