DEV Community

Discussion on: What s wrong with Array.reduce ?

Collapse
 
leob profile image
leob • Edited

Goes too far that a linter (just a tool) is trying to force its questionable opinion on the developer ... that tool can't be reconfigured to just take this rule out?

Collapse
 
dvddpl profile image
Davide de Paolis • Edited

of course it can. as they mention in the Repo: XO is a Opinionated but configurable ESLint wrapper :-)

Collapse
 
leob profile image
leob • Edited

Well problem solved then :-)

Anyway yes, I do see a potential problem with Array.reduce - it's so generic that it can be misused ... but for a linter to tell me not to use it, that feels a bit patronizing.

Thread Thread
 
sduduzog profile image
Sdu

but linters also suggest not to use many other practices when programming. And as a Junior I appreciate such as should I be able to justify the use of something blocked by a linter, I will then adjust linter rules to say I know what I'm doing