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

throw-new-error: Check all call expressions instead of just argument of ThrowStatement #2332

Merged
merged 3 commits into from
May 7, 2024

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented May 7, 2024

It's common to create an error, and throw it later or use reject(...), this rule should not limit it to be argument of ThrowStatement.

Fixes #2320

@sindresorhus sindresorhus merged commit 1626852 into sindresorhus:main May 7, 2024
17 checks passed
@fisker fisker deleted the throw-new-error-limitation branch May 7, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check throw Object.assign(Error('...'), ...) in throw-new-error
2 participants