When you use events hash, you always quote key since it contains spaces:
{
'click .foo': function ( e ) {
// ...
}
}
But if you try to set event handle on el itself, it is allowed to omit those quotes:
{
click: function ( e ) {
// ...
}
}
Suggested rule will warn user to always put quotes around events hash key to keep it consistent with majority of use cases.
Potential issue I can see is that it could clash with quote-props rule.
What do you think?
When you use events hash, you always quote key since it contains spaces:
But if you try to set event handle on
elitself, it is allowed to omit those quotes:Suggested rule will warn user to always put quotes around events hash key to keep it consistent with majority of use cases.
Potential issue I can see is that it could clash with
quote-propsrule.What do you think?