question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rule proposal: No reduce

See original GitHub issue

Using Array#reduce is in most cases not the right solution. It just makes code harder to read.

https://twitter.com/jaffathecake/status/1213077702300852224

I think it’s better to just use “eslint-disable” comments when it’s actually needed for summing number, which is rare.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:19
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
wldcordeirocommented, Jun 30, 2020

I’ve liked reduce too. This library is hitting a threshold where it’s becoming too opinionated for the recommended. 🙄

8reactions
sindresorhuscommented, Mar 23, 2020

It should be on by default as an error. I’m not concerned about angry users. We do what’s best for code readability regardless of whether it might be controversial. Users can just disable the rule.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SEC Issues Proposal to Reduce Risks in Clearance and ...
The Securities and Exchange Commission today voted to propose rule changes to reduce risks in the clearance and settlement of securities, ...
Read more >
Medicare Program: Prospective Payment ... - Regulations.gov
CMS requests comments on these proposals as well as on related subjects and ... B.5. of this proposed rule, we discuss the 2...
Read more >
The Proposed SEC Amendments to Shareholder Proposal Rule
As a result of these staff interpretations, no-action requests asserting substantial implementation have typically devolved into a subjective ...
Read more >
SEC Proposes Amendments to the Shareholder Proposal Rules
When a company intends to exclude a shareholder proposal from its proxy materials, the company typically requests no-action relief from the ...
Read more >
A Guide to the Rulemaking Process - Federal Register
Can an agency issue a final rule without a publishing a proposed rule? ... comments aimed at developing and improving the draft proposal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found