Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to Promise.prototype.%somethingStandard% trigger promise/spec-only #533

Closed
zloirock opened this issue Aug 6, 2024 · 2 comments · Fixed by #535
Closed

Access to Promise.prototype.%somethingStandard% trigger promise/spec-only #533

zloirock opened this issue Aug 6, 2024 · 2 comments · Fixed by #535

Comments

@zloirock
Copy link
Contributor

zloirock commented Aug 6, 2024

x:y  error  Avoid using non-standard 'Promise.prototype'  promise/spec-only
@voxpelli
Copy link
Member

voxpelli commented Aug 6, 2024

Why are you accessing Promise.prototype? 🤔

@zloirock
Copy link
Contributor Author

zloirock commented Aug 6, 2024

It's a very strange question.

At first, because methods like .catch and .finally are generics and can be applied on non-native promises. At second, for caching for avoiding unneeded observable side effects, for preventing breakage in case of patching, etc. I have many other reasons to get access to methods from Promise.prototype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants