Removing the jQuery Usage rule

This commit is contained in:
Gaël Métais
2016-12-20 15:20:16 +08:00
parent 90f6fd83ba
commit f2f27ac639
3 changed files with 0 additions and 28 deletions
-18
View File
@@ -25,11 +25,8 @@ var jsExecutionTransformer = function() {
var hasjQuery = (data.toolsResults.phantomas.metrics.jQueryVersionsLoaded > 0);
if (hasjQuery) {
metrics.jQueryCalls = 0;
metrics.jQueryFunctionsUsed = 0;
metrics.jQueryCallsOnEmptyObject = 0;
metrics.jQueryNotDelegatedEvents = 0;
offenders.jQueryFunctionsUsed = [];
}
try {
@@ -102,21 +99,6 @@ var jsExecutionTransformer = function() {
metrics.DOMaccesses += countTreeLeafs(node);
});
// Count the number of different jQuery functions called
if (hasjQuery) {
jQueryFunctionsCollection.sort().forEach(function(fnName, cnt) {
if (fnName === 'jQuery - find') {
fnName = 'jQuery - $';
}
metrics.jQueryFunctionsUsed ++;
offenders.jQueryFunctionsUsed.push({
functionName: fnName.substring(9),
count: cnt
});
});
}
}
debug('JS execution transformation complete');