-
-
Notifications
You must be signed in to change notification settings - Fork 477
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
☂️ eslint-plugin-promise #4655
Labels
Comments
This was referenced Sep 29, 2024
Boshen
pushed a commit
that referenced
this issue
Nov 14, 2024
…ise/no-return-wrap` (#7232) part of #4655 ### Summary Logic has been added to handle bind functions, unifying the implementations of `unicorn/no-useless-promise-resolve-reject` and `promise/no-return-wrap`. This enables detection of the following code: ```javascript foo().then((function() { return Promise.resolve(4) }).bind(this)) ``` Merging this PR will allow this rule to pass all test cases of promise/no-return-wrap without options. Additionally, merging #7274 will ensure that all test cases are passed.
Dunqing
pushed a commit
that referenced
this issue
Nov 17, 2024
…ise/no-return-wrap` (#7232) part of #4655 ### Summary Logic has been added to handle bind functions, unifying the implementations of `unicorn/no-useless-promise-resolve-reject` and `promise/no-return-wrap`. This enables detection of the following code: ```javascript foo().then((function() { return Promise.resolve(4) }).bind(this)) ``` Merging this PR will allow this rule to pass all test cases of promise/no-return-wrap without options. Additionally, merging #7274 will ensure that all test cases are passed.
Dunqing
pushed a commit
that referenced
this issue
Nov 18, 2024
…ise/no-return-wrap` (#7232) part of #4655 ### Summary Logic has been added to handle bind functions, unifying the implementations of `unicorn/no-useless-promise-resolve-reject` and `promise/no-return-wrap`. This enables detection of the following code: ```javascript foo().then((function() { return Promise.resolve(4) }).bind(this)) ``` Merging this PR will allow this rule to pass all test cases of promise/no-return-wrap without options. Additionally, merging #7274 will ensure that all test cases are passed.
Dunqing
pushed a commit
that referenced
this issue
Nov 18, 2024
…ise/no-return-wrap` (#7232) part of #4655 ### Summary Logic has been added to handle bind functions, unifying the implementations of `unicorn/no-useless-promise-resolve-reject` and `promise/no-return-wrap`. This enables detection of the following code: ```javascript foo().then((function() { return Promise.resolve(4) }).bind(this)) ``` Merging this PR will allow this rule to pass all test cases of promise/no-return-wrap without options. Additionally, merging #7274 will ensure that all test cases are passed.
Boshen
pushed a commit
that referenced
this issue
Nov 22, 2024
related: #4655 This PR implements a rule to detect Promises inside error-first callbacks, preventing the mixed usage of callbacks and Promises. Example of problematic code: ```javascript a(function(err) { doThing().then(a) }); ^^^^^^^^^^^^^^ ``` [Original implementation](https://github.com/eslint-community/eslint-plugin-promise/blob/266ddbb03076c05c362a6daecb9382b80cdd7108/rules/no-promise-in-callback.js)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning
This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules
This is tracking issue for
eslint-plugin-promise
.There are 17(+ 0 deprecated) rules.
To get started, run the following command:
Then register the rule in
crates/oxc_linter/src/rules.rs
and alsodeclare_all_lint_rules
at the bottom.Recommended rules
✨: 8, 🚫: 0 / total: 12
✨ = Implemented, 🚫 = No need to implement
Not recommended rules
✨: 3, 🚫: 0 / total: 5
✨ = Implemented, 🚫 = No need to implement
The text was updated successfully, but these errors were encountered: