-
-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(linter): support bind function case for compatibility with `prom…
…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.
- Loading branch information
Showing
3 changed files
with
324 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.