Be Careful with Array Mutators
A while ago, I wrote a linting rule to highlight an error that I’d made on a few occasions. Let’s look at the error — and its variations — and then at the rule that prevents it.
If you are used to working with fluent APIs — perhaps with D3 or lodash — it feels natural to write
Array-based code like this:
const developers = employees…