Comments (9)
@feross Yeah catch
is maybe slightly better, because it will also catch programmer errors in the doSomething
code, but it's certainly better than nothing. Maybe I can add an exception or something. Thanks for the idea. Will mull it over a bit.
from eslint-plugin-promise.
Yep, I understand. I just couldn't enable this rule without causing tons of standard
users' code to fail. If there's a way to just check that there's any catch handler in then()
or catch()
, that would be a good candidate to enable for all standard
users.
from eslint-plugin-promise.
I'll add a configurable exception "always-catch": [2, { allowThen: true }]
. Think that might work?
from eslint-plugin-promise.
@xjamundx Yep, that'd work.
from eslint-plugin-promise.
K give me a week if it don't forget !
On Tue, Feb 23, 2016 at 1:07 PM, Feross Aboukhadijeh <
[email protected]> wrote:
@xjamundx https://github.com/xjamundx Yep, that'd work.
—
Reply to this email directly or view it on GitHub
#4 (comment)
.
from eslint-plugin-promise.
A lot of people are also saying if the promise is returned it doesn't need
to be caught. I may also add this exception
On Tue, Feb 23, 2016 at 1:07 PM, Jamund Ferguson [email protected] wrote:
K give me a week if it don't forget !
On Tue, Feb 23, 2016 at 1:07 PM, Feross Aboukhadijeh <
[email protected]> wrote:@xjamundx https://github.com/xjamundx Yep, that'd work.
—
Reply to this email directly or view it on GitHub
#4 (comment)
.
from eslint-plugin-promise.
Started on this
from eslint-plugin-promise.
Closed by 41f1c02
from eslint-plugin-promise.
Nice, will try to release this in standard v7!
from eslint-plugin-promise.
Related Issues (20)
- Feature proposal: no-double-resolve. Warn against resolving a promise twice, or execution after resolve. HOT 4
- Rule Idea: No Await in Loop HOT 2
- apple clone HOT 1
- DR. Babasaheb Ambedkar softwair enginiaring collage chandrapur HOT 2
- > @xjamundx what can we do to help to get this merged? HOT 1
- > @xjamundx what can we do to help to get this merged? HOT 1
- > > @xjamundx what can we do to help to get this merged? HOT 1
- No tag for v5.2.0 HOT 5
- prefer-await-to-then doesn't enforce .then/.catch/.finally HOT 2
- Invitation to move to official `eslint-community` org
- Consider automatic releases HOT 1
- Add support for Promise.allSettled() and Promise.any() HOT 1
- `no-multiple-resolved` wrongly reports `reject` in try/catch block HOT 6
- .github/workflows/CI.yml
- `promise/prefer-await-to-then` ignore constructor scope HOT 1
- Rule to require that Promise executor function calls resolve
- `no-multiple-resolved` wrongly reports `reject` in try/catch block
- False positive of `isInsideCallback` for functions with first arg named `err`/`error`
- does it support typescript?
- New Rule: Prefer `Promise.resolve(foo)` to `new Promise((resolve) => resolve(foo))`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-promise.