Indexing a collection using [0] is unsafe and could cause a crash if the collection is empty
Bad
let value = array[0]
let something = resource.collection[0].group.value
Good
let value = array.first
let something = resource.collection.first.group.value
No
I think this rule should be enabled by default for the index-at-zero case. If the rule is expanded beyond that, I think it should be opt-in.
This should be opt-in if implemented.
Most helpful comment
This should be opt-in if implemented.