-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(linter): warning eslint/no-throw-literal rule to be deprecated, better use typescript/only-throw-error
#19593
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,9 @@ declare_oxc_lint!( | |
| /// | ||
| /// Disallows throwing literals or non-Error objects as exceptions. | ||
| /// | ||
| /// WARNING: This rule has been deprecated, please instead use [typescript/only-throw-error](https://oxc.rs/docs/guide/usage/linter/rules/typescript/only-throw-error.html). | ||
| /// The typescript rule is more reliable than the Javascript version, as it has less false positive, and can catch more cases. | ||
| /// | ||
|
Comment on lines
+25
to
+28
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this missing the closing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep you're right - my fault
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| /// ### Why is this bad? | ||
| /// | ||
| /// It is considered good practice to only throw the Error object itself or an object using | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.