unicorn/no-for-loop
: option to ignore cases uses index
#2664
Labels
unicorn/no-for-loop
: option to ignore cases uses index
#2664
Description
The rule itself is great and works correct, it is just a bit strict for some code bases.
I would like to activate the rule, while only partially for now where all regular iterations would change.
Adding an option to deactivate the rule for cases that would end up as:
for (const [index, element] of array.entries())
would be great!Something like:
{ noArrayEntriesTransformations: true }
I guess this pattern also has a performance overhead, while I must admit that I didn't check that and it's probably acceptable compared to the application code.
Examples
Additional Info
No response
The text was updated successfully, but these errors were encountered: