💼 This rule is enabled in the ✅ recommended
config.
This rule enforces a message
value to be passed in when creating an instance of a built-in Error
object, which leads to more readable and debuggable code.
throw Error();
throw Error('');
throw new TypeError();
const error = new AggregateError(errors);
throw Error('Unexpected property.');
throw new TypeError('Array expected.');
const error = new AggregateError(errors, 'Promises rejected.');