Creating an error without a message produces an exception that is nearly useless in logs and stack traces. This rule requires a non-empty string message whenever you instantiate a built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/sindresorhus/eslint-plugin-unicorn/llms.txt
Use this file to discover all available pages before exploring further.
Error or one of its subclasses.
| Recommended | ✅ recommended · ☑️ unopinionated |
| Fixable | — |
| Suggestions | — |
Examples
Covered constructors
All built-in error constructors are covered, including:ErrorTypeError,RangeError,ReferenceError,SyntaxError,URIError,EvalErrorAggregateError— message is the second argument (after the errors iterable)SuppressedError— message is the third argument