New Events Not Delegated rule

This commit is contained in:
Gaël Métais
2015-05-12 09:12:10 +02:00
parent d7d4fb36ad
commit 9bc6d2928b
6 changed files with 78 additions and 18 deletions
+9
View File
@@ -439,6 +439,15 @@ var policies = {
"isAbnormalThreshold": 0,
"hasOffenders": true
},
"jQueryNotDelegatedEvents": {
"tool": "jsExecutionTransformer",
"label": "Events not delegated",
"message": "<p>This is the number of events that are bound with the .bind() or the .on() function without using <a href=\"https://learn.jquery.com/events/event-delegation/\" target=\"_blank\">event delegation</a>.</p><p>This means jQuery binds each element contained in the object one by one. This is bad for performance.</p>",
"isOkThreshold": 1,
"isBadThreshold": 100,
"isAbnormalThreshold": 180,
"hasOffenders": true
},
"cssParsingErrors": {
"tool": "phantomas",
"label": "CSS syntax error",
+3 -2
View File
@@ -38,9 +38,10 @@
"jQuery": {
"label": "jQuery",
"policies": {
"jQueryVersion": 10,
"jQueryVersion": 1,
"jQueryVersionsLoaded": 1,
"jQueryFunctionsUsed": 1
"jQueryFunctionsUsed": 1,
"jQueryNotDelegatedEvents": 1
}
},
"cssComplexity": {