template-lint icon indicating copy to clipboard operation
template-lint copied to clipboard

Warning if the array value is assigned by index

Open ajayvikas opened this issue 8 years ago • 3 comments

As per aurelia/binding#64 assigning an array value by index does not notify subscribers. It would be nice if a warning could be generated if this encountered.

ajayvikas avatar Aug 12 '16 22:08 ajayvikas

@ppn2, did You close this issue by accident?

atsu85 avatar Aug 13 '16 06:08 atsu85

urr nope, says you closed it. :P

MeirionHughes avatar Aug 13 '16 17:08 MeirionHughes

What should we warn on?

viewModel: array[0] = 'bar' view: <div>${array[0]}</div> both array[0] = 'bar', only when a binding to array is detected in view;

cravet being the first two are relatively straight forward, but the third will need a separate rule; plus it could get ugly trying to track array usage and binding when slots and replacements are involved.

MeirionHughes avatar Sep 28 '16 19:09 MeirionHughes