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

Add support for Promise.allSettled() and Promise.any() #367

Closed
ota-meshi opened this issue Oct 1, 2022 · 1 comment · Fixed by #370
Closed

Add support for Promise.allSettled() and Promise.any() #367

ota-meshi opened this issue Oct 1, 2022 · 1 comment · Fixed by #370
Labels

Comments

@ota-meshi
Copy link
Member

Description

I want the plugin to add support for Promise.allSettled() and Promise.any().
Those Promise features were added in ES2020 and later, but this plugin doesn't seem to support them yet.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/any

Steps to Reproduce

/* eslint promise/valid-params: error */

Promise.all([p1, p2]); // OK
Promise.all(p1, p2); // NG

Promise.any([p1, p2]); // OK
Promise.any(p1, p2); // NG: False negative

Promise.allSettled([p1, p2]); // OK
Promise.allSettled(p1, p2); // NG: False negative

Online DEMO

Expected behavior: [What you expect to happen]

I expect to be warned even if I use the new API.

Actual behavior: [What actually happens]

The plugin does not support new APIs.

Versions

[Please fill this in if you are submitting a bug report]

  • Node version: v18.4.0
  • ESLint version: v8.24.0
  • eslint-plugin-promise version: v6.0.1

Additional Information

[Any additional information, configuration or data that might be necessary to
reproduce the issue]

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 6.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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