no-throw-literal
Configuration
rslint.config.ts
Rule Details
This rule restricts what can be thrown as an exception. When ESLint was originally written, only literals were forbidden, but the rule has since been expanded to disallow any expression which cannot possibly be an Error object.
Examples of incorrect code for this rule:
Examples of correct code for this rule: