Giter Site home page Giter Site logo

Comments (2)

cartant avatar cartant commented on June 7, 2024 2

Given that TSLint was deprecated some time ago and that the TSLint repo is now archived. I do not plan on adding any additional features/rules to rxjs-tslint-rules.

Beyond that, I'm not sure that a rule that enforces the presence of catchError in all observables would be something that I would want to implement or encourage people to use. While it might be well intentioned, I think that it would be awkward in practice, as observables are often composed from other observables and where the catchError should be placed isn't straightforward. There is also the issue that files are linted one by one and what if an observable in one file doesn't have a catchError, but is never subscribed to directly and is instead composed into observable chains in other files?

from rxjs-tslint-rules.

yuwu9145 avatar yuwu9145 commented on June 7, 2024

HI @cartant ,

Thanks for your comprehensive explain.

The problem for our team is not everyone wants to construct error handler for http request observable failures, and unhandled http fail status like 400, 500 would cause dead front end UI, which is why we want to have a lint rule to enforce http fail handling. We have centralised all these http request observables into certain files. I guess realistically we could firstly construct our own lint rule applied to these http observable files and see how does it go.

from rxjs-tslint-rules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.