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

feat(linter): implement eslint:prefer-promise-reject-errors #8254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tbashiyy
Copy link
Contributor

@tbashiyy tbashiyy commented Jan 5, 2025

Copy link

graphite-app bot commented Jan 5, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Jan 5, 2025
@tbashiyy tbashiyy changed the title feat(linter): implement eslint/prefer-promise-reject-errors feat(linter): implement eslint:prefer-promise-reject-errors Jan 5, 2025
Copy link

codspeed-hq bot commented Jan 5, 2025

CodSpeed Performance Report

Merging #8254 will not alter performance

Comparing tbashiyy:feat/eslint-prefer-promise-reject-errors (522c9ad) with main (e84f267)

Summary

✅ 29 untouched benchmarks

Copy link
Contributor

@baseballyama baseballyama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

* Port from eslint.
* @see <https://github.com/eslint/eslint/blob/36ef8bbeab495ef2598a4b1f52e32b4cb50be5e2/lib/rules/utils/ast-utils.js#L2079>
*/
fn could_be_error(expr: &Expression) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ask]

I think we can declare this function in ast_util but why did you choose to declare this in this file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants