3 ms·
> 95% of this is covered by a warning that says "I won't merge any PR that a) does not pass linting (configured to my liking) and b) introduces extra deps" May
by OkayPhysicist 6mo ago
> 95% of this is covered by a warning that says "I won't merge any PR that a) does not pass linting (configured to my liking) and b) introduces extra deps"
Maybe I'm not up to date with the bleeding edge of linters, but I've never seen one that adequately flags
let out = []
for(let x of arr){
if(x > 3){
out.append(x + 5)
}
}
Into
let out = arr
.filter(x => x > 3)
.map(x => x + 3)
There's all sorts of architectural decisions at even higher levels than that.
- well_ackshually 6mo agoIndeed, yours has both more allocations and a bug (+3 instead of +5)
- sodapopcan 6mo agoMore allocations is a good point but you're being pedantic about the bug... how do you know the +5 isn't the bug? :P