[no-throw-literal] Allow DOMException to be thrown in browser env #3712
Labels
enhancement: plugin rule option
New rule option for an existing eslint-plugin rule
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
Expected Result
No error.
Actual Result
Error, expected an error object to be thrown.
Additional Info
This seems more like a design problem. ESLint passes as their limitations of static analysis. ESLint isn't about to change the designed behaviour now. eslint/eslint#14880
It is not always a good practice to only throw
Error
in browser environment, as it is encouraged to write a function like:Versions
@typescript-eslint/eslint-plugin
4.29.0
@typescript-eslint/parser
4.29.0
TypeScript
4.3.5
ESLint
7.32.0
node
14.15.0
The text was updated successfully, but these errors were encountered: