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.

[no-promise-reject] Remove this rule - it's not in the scope of this project.

See original GitHub issue

Promises are a type of monad which are definitely a part of functional programming.

The no-promise-reject rule is not only outside the scope of this project but it encourages promise antipatterns.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
whatisaphonecommented, Jun 9, 2020

Since you asked for feedback, I’ll write a bit.

We use this rule at $DAY_JOB. Generally I prefer using monadic error types (a sum type à la Haskell’s Either or Rust’s Option). There are many benefits to treating errors as ordinary values instead of giving them a special form of control flow. Notably in typescript you cannot annotate the type of a Promise rejection (we have Promise<T>, not Promise<T, E>). Promise.reject is the async equivalent of throw, so imo this rule belongs here just as much as the no-throw rule does.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Promise rejection type. · Issue #39680 · microsoft/TypeScript
[no-promise-reject] Remove this rule - it's not in the scope of this project. eslint-functional/eslint-plugin-functional#102.
Read more >
Automatically remove project references from rule scope when ...
If one of these projects is trashed/deleted, the JQL returns an error, which is fed to Automation which then errors out the rule....
Read more >
Messages on Do you remove tasks from your project plan that ...
Do you remove tasks from your project plan that have been identified as no longer relevant?
Read more >
Delete a Site from Scope - HRSA
1. OVERVIEW: Provide brief background/justification for why the health center is proposing to delete this site from its scope of project (e.g., major...
Read more >
Deadlines & Plannings - Bissuh
Closed scope projects: those ones are common in software houses. ... Prototypes: they are small projects, with few or almost no definition.
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