-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Describe the rule you'd like to see implemented
Include as much detail as you can.
Using users.first instead of users[0] isn't exactly that important, but it might be something that a team wants to enforce in order to be more consistent or adhering more to a "pick one and stick to it" philosophy.
I think this rule is the next logical step after prefer_is_empty and prefer_is_not_empty.
This should include a description of who would use the lint (such as if it's
specific to a framework like Flutter), what conditions the rule should look
for, and what conditions the rule should ignore.
Such a rule should catch users[0] as well as users[users.length - 1]
Examples
Ideally, provide motivating examples w/ rationale.
Additional context
Add any other considerations or context here.