Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 673 Bytes

no-trailing-comma-after-selector.md

File metadata and controls

33 lines (25 loc) · 673 Bytes

No trailing commas after selector in JMVC event listeners

jQuery 1.9+ will throw a parsing error if a selector contains a trailing comma.

This rule ensures JMVC event listeners do not have a trailing comma after the selector.

Rule Details

Examples of incorrect code for this rule:

$.Controller('MyController', {
}, {
  "div.something, click": function() { /* ...snip... */ }
})

Examples of correct code for this rule:

$.Controller('MyController', {
}, {
  "div.something click": function() { /* ...snip... */ }
})
$.Controller('MyController', {
}, {
  "div.something,div.another click": function() { /* ...snip... */ }
})